xbee in api mode library
Fork of xbee_lib by
Revision 10:61e607fa8621, committed 2014-01-26
- Comitter:
- noname77
- Date:
- Sun Jan 26 17:19:28 2014 +0000
- Parent:
- 9:08ccd085662f
- Commit message:
- some working code
Changed in this revision
diff -r 08ccd085662f -r 61e607fa8621 xbee.h --- a/xbee.h Sun Jan 26 15:00:52 2014 +0000 +++ b/xbee.h Sun Jan 26 17:19:28 2014 +0000 @@ -17,14 +17,6 @@ */ #include "mbed.h" -#define FRAME_SIZE 127 -#define STARTBYTE 0x7E -#define MAX_DATA_LEN 70 - -#define TX_STATUS 0x89 -#define TX_REQUEST_64 000 -#define RX_PACKET_64 0x80 - /** Xbee interface class for configuring, sending and recieving data using an Xbee */ class xbee {
diff -r 08ccd085662f -r 61e607fa8621 xbeeFrame.cpp --- a/xbeeFrame.cpp Sun Jan 26 15:00:52 2014 +0000 +++ b/xbeeFrame.cpp Sun Jan 26 17:19:28 2014 +0000 @@ -86,6 +86,16 @@ return len; } +int xbeeFrame::GetType(void) +{ + return _frameType; +} + +int xbeeFrame::GetStatus(void) +{ + return _status; +} + void xbeeFrame::SetDestination(unsigned char* dest) { char i;
diff -r 08ccd085662f -r 61e607fa8621 xbeeFrame.h --- a/xbeeFrame.h Sun Jan 26 15:00:52 2014 +0000 +++ b/xbeeFrame.h Sun Jan 26 17:19:28 2014 +0000 @@ -1,3 +1,11 @@ +#define FRAME_SIZE 127 +#define STARTBYTE 0x7E +#define MAX_DATA_LEN 70 + +#define TX_STATUS 0x89 +#define TX_REQUEST_64 0x00 +#define RX_PACKET_64 0x80 + class xbeeFrame : public xbee { private: @@ -44,6 +52,14 @@ * @return Returns the length of the packet */ int GetLength(void); + /** Get the type of the frame + * @return Returns the type of the packet + */ + int GetType(void); + /** Get the status of the sent frame + * @return Returns the status of sent packet + */ + int GetStatus(void); /** Set the packet destination address * @param dest_address Pointer to a array storing destination address */