diff options
author | Martin Peach <mrpeach@users.sourceforge.net> | 2013-10-01 20:07:01 +0000 |
---|---|---|
committer | Martin Peach <mrpeach@users.sourceforge.net> | 2013-10-01 20:07:01 +0000 |
commit | d0344a49e71fa7d59f5de09fa0c2319ce92a836a (patch) | |
tree | c9c0337c31b006c4acc4d0124dbdb7f701978e63 | |
parent | bb9fd3bb8bf40418fe3ecfa81d6ef508fb516612 (diff) |
Added handler for Transmit Status (series 1) packet.
svn path=/trunk/externals/mrpeach/; revision=17207
-rw-r--r-- | xbee/pdxbee.h | 1 | ||||
-rw-r--r-- | xbee/unpackxbee.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/xbee/pdxbee.h b/xbee/pdxbee.h index 2ce65fa..1096dd6 100644 --- a/xbee/pdxbee.h +++ b/xbee/pdxbee.h @@ -26,6 +26,7 @@ #define Receive_Packet_64_Bit_Address_IO 0x82 #define Receive_Packet_16_Bit_Address_IO 0x83 #define AT_Command_Response 0x88 +#define Transmit_Status 0x89 #define Modem_Status 0x8A #define ZigBee_Transmit_Status 0x8B #define ZigBee_Receive_Packet 0x90 diff --git a/xbee/unpackxbee.c b/xbee/unpackxbee.c index c7eb6c2..f49885d 100644 --- a/xbee/unpackxbee.c +++ b/xbee/unpackxbee.c @@ -197,6 +197,9 @@ static void unpackxbee_input(t_unpackxbee *x, t_symbol *s, int argc, t_atom *arg case Modem_Status:
type_selector = gensym("Modem_Status");
break;
+ case Transmit_Status:
+ type_selector = gensym("Transmit_Status");
+ break;
case ZigBee_Transmit_Status:
type_selector = gensym("ZigBee_Transmit_Status");
break;
@@ -444,6 +447,15 @@ buf[18...] data payloadstart = 18;
break;
/* RAT */
+ case Transmit_Status:
+ if (x->x_verbosity > 0)
+ post("Transmit_Status statuslength %d", statuslength);
+ SETFLOAT(&status_atoms[statuslength], x->x_frame_ID);
+ statuslength++;
+ SETFLOAT(&status_atoms[statuslength], x->x_message[5]);/* Delivery Status */
+ statuslength++;
+ payloadstart = 0; /* no payload */
+ break;
case ZigBee_Transmit_Status:
if (x->x_verbosity > 0)
post("ZigBee_Transmit_Status statuslength %d", statuslength);
|