Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. void receive(char* buffer, unsigned int bufferLength);
  2.  
  3. void send(char* buffer,unsigned int bufferLength);
  4.  
  5. ////////////////////////////////////////////
  6. void receive(char* buffer, unsigned int bufferLength)
  7. {
  8. uint8_t headerSize = 2;
  9. if (bufferLength >= headerSize){
  10. uint8_t actiune = buffer[0];
  11. uint8_t lungimePayload = buffer[1];
  12. switch(actiune){
  13. case 1:
  14. break;
  15. }
  16. }
  17. }
  18.  
  19. void send(char* buffer,unsigned int bufferLength){
  20. /*
  21. const int payLoadSize=20;
  22. buffer[0]=9; //comanda
  23. buffer[1]=payLoadSize;
  24. Joc *p=new Joc();
  25. buffer[2]=p->getWord();
  26. */
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement