You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.1 KiB
107 lines
3.1 KiB
<HTML><HEAD><TITLE>Manpage of XBEE_PKT</TITLE> |
|
</HEAD><BODY> |
|
<H1>XBEE_PKT</H1> |
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2009-11-01<BR><A HREF="#index">Index</A> |
|
<A HREF="../index.html">Return to Main Contents</A><HR> |
|
|
|
<A NAME="lbAB"> </A> |
|
<H2>NAME</H2> |
|
|
|
xbee_pkt |
|
<A NAME="lbAC"> </A> |
|
<H2>SYNOPSIS</H2> |
|
|
|
<B>#include <<A HREF="file:/usr/include/xbee.h">xbee.h</A>></B> |
|
|
|
|
|
<A NAME="lbAD"> </A> |
|
<H2>DESCRIPTION</H2> |
|
|
|
This is the packet structure. If you want to get more advanced information from connections (such as RSSI) then this is where it lives. |
|
<P> |
|
|
|
<PRE> |
|
struct xbee_pkt { |
|
unsigned char frameID; /* AT Status */ |
|
unsigned char atCmd[2]; /* AT */ |
|
unsigned char status; /* AT Data Status */ /* status / options */ |
|
unsigned char Addr64[8]; /* AT Data */ |
|
unsigned char Addr16[2]; /* AT Data */ |
|
unsigned char data[128]; /* AT Data */ |
|
unsigned char RSSI; /* Data */ |
|
unsigned int datalen; |
|
|
|
/* X A5 A4 A3 A2 A1 A0 D8 D7 D6 D5 D4 D3 D2 D1 D0 */ |
|
unsigned short IOmask; /* IO */ |
|
|
|
/* X X X X X X X D8 D7 D6 D5 D4 D3 D2 D1 D0 */ |
|
unsigned short IOdata; /* IO */ |
|
|
|
/* X X X X X D D D D D D D D D D D */ |
|
unsigned short IOanalog[6]; /* IO */ |
|
}; |
|
typedef struct xbee_pkt xbee_pkt; |
|
</PRE> |
|
|
|
|
|
<P> |
|
Most of these fields are fairly self explanatory, however some need attention brought to them |
|
and others need explaining. I will touch on the most important here: |
|
<DL COMPACT> |
|
<DT><B>atCmd</B> |
|
|
|
<DD> |
|
This is the 2 character identifier for the AT command response you just recieved. |
|
Of course if you didnt setup an AT connection, you should never see, or try to see data here. |
|
<DT><B>Addr64</B> and <B>Addr16</B> |
|
|
|
<DD> |
|
These contain the address of the XBee that you recieved the packet from. You should really know this |
|
because you setup the connection. However remote AT packets will contain both 16 and 64 bit |
|
addresses. |
|
<DT><B>data</B> |
|
|
|
<DD> |
|
This is the data you just recieved. Either the AT reponse, or the data from the remote XBee node. |
|
<DT><B>datalen</B> |
|
|
|
<DD> |
|
Would you be suprised if I told you this is how much data there is?... Dont try and |
|
<B>printf</B>() |
|
|
|
the |
|
<B>data</B> |
|
|
|
as it isn't null terminated. Use this for processing instead. |
|
|
|
|
|
</DL> |
|
<A NAME="lbAE"> </A> |
|
<H2>AUTHOR</H2> |
|
|
|
Attie Grande <<A HREF="mailto:attie@attie.co.uk">attie@attie.co.uk</A>> |
|
<A NAME="lbAF"> </A> |
|
<H2>SEE ALSO</H2> |
|
|
|
<B><A HREF="../man3/libxbee.3.html">libxbee</A></B>(3), |
|
|
|
<B><A HREF="../man3/xbee_getpacket.3.html">xbee_getpacket</A></B>(3) |
|
|
|
<P> |
|
|
|
<HR> |
|
<A NAME="index"> </A><H2>Index</H2> |
|
<DL> |
|
<DT><A HREF="#lbAB">NAME</A><DD> |
|
<DT><A HREF="#lbAC">SYNOPSIS</A><DD> |
|
<DT><A HREF="#lbAD">DESCRIPTION</A><DD> |
|
<DT><A HREF="#lbAE">AUTHOR</A><DD> |
|
<DT><A HREF="#lbAF">SEE ALSO</A><DD> |
|
</DL> |
|
<HR> |
|
This document was created by |
|
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>, |
|
using the manual pages.<BR> |
|
Time: 00:08:23 GMT, March 30, 2011 |
|
</BODY> |
|
</HTML>
|
|
|