Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. static uint8_t aBlock[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  2. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  3. };
  4.  
  5. after this
  6.  
  7. aBlock[5] = dir; ( direction of message)
  8. aBlock[6] = ( address ) & 0xFF; (Hardware address of device)
  9. aBlock[7] = ( address >> 8 ) & 0xFF; (Hardware address of device)
  10. aBlock[8] = ( address >> 16 ) & 0xFF; (Hardware address of device)
  11. aBlock[9] = ( address >> 24 ) & 0xFF; (Hardware address of device)
  12. aBlock[10] = ( sequenceCounter ) & 0xFF; (counter that never repeats)
  13. aBlock[11] = ( sequenceCounter >> 8 ) & 0xFF; (counter that never repeats)
  14. aBlock[12] = ( sequenceCounter >> 16 ) & 0xFF; (counter that never repeats)
  15. aBlock[13] = ( sequenceCounter >> 24 ) & 0xFF; (counter that never repeats)
  16. aBlock[15] = ( ( ctr ) & 0xFF ); ( a counter value that is incremented for every 16 Byte Block)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement