Loading...
Pages: [1]   Go Down
Author Topic: Xbee frame ID best practices  (Read 541 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all!
I am currently working on a xbee sensor with multiple input buttons. Each time one of them is pressed, I send a packet to the coordinator and wait for the TxStatusResponse before acting on it.

Each packet is sent with a different frame ID to differentiate them. The problem is that the TxStatusResponse may not come in the same order as sent.

My problem is how to associate each TxStatusResponse with the appropriate packet sent? I thought about using an associative array to associate each frameID to the proper action code, but I'm not sure if it's the best practice.

And the only associative array I found is the HashMap library (http://www.arduino.cc/playground/Code/HashMap) wich I am not sure is proper for the job.

Any ideas?
Logged

Pages: [1]   Go Up
Print
 
Jump to: