Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int send_response(int socketfd, uint8_t *ti, uint8_t *op, uint16_t *st, uint16_t *n, uint8_t **val){
  2. uint8_t *apdu, len;
  3. if(op == 10){
  4. len = 5;
  5. apdu = (uint8_t *) malloc(5);
  6. apdu[0] = *op;
  7. apdu[1] = *st >> 8;
  8. apdu[2] = *st;
  9. apdu[3] = *n >> 8;
  10. apdu[4] = *n;
  11. send_modbus_response(socketfd,&apdu,len, ti)
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement