Class containing functions usefull to communication between PC and Xbee device
Dependents: Coordinator_node Router_node
xbee.h@6:3b97770f30e6, 2017-02-14 (annotated)
- Committer:
- ShaolinPoutine
- Date:
- Tue Feb 14 04:03:55 2017 +0000
- Revision:
- 6:3b97770f30e6
- Parent:
- 3:4c1dec78117b
- Child:
- 7:78985e92c1c5
Added Zigbee transmit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ShaolinPoutine | 2:0000443a78fe | 1 | #include "mbed.h" |
ShaolinPoutine | 2:0000443a78fe | 2 | #include "rtos.h" |
ShaolinPoutine | 2:0000443a78fe | 3 | #define FRAMEDELIMITER 0x7E |
ShaolinPoutine | 2:0000443a78fe | 4 | |
ShaolinPoutine | 2:0000443a78fe | 5 | |
ShaolinPoutine | 2:0000443a78fe | 6 | class XBee { |
ShaolinPoutine | 2:0000443a78fe | 7 | public: |
ShaolinPoutine | 2:0000443a78fe | 8 | DigitalOut rst; // Pin corresponding to the reset pin |
ShaolinPoutine | 2:0000443a78fe | 9 | Serial comm; // UART communication |
ShaolinPoutine | 2:0000443a78fe | 10 | Mail<char, 250>* mail; |
ShaolinPoutine | 2:0000443a78fe | 11 | |
ShaolinPoutine | 2:0000443a78fe | 12 | XBee(PinName reset, PinName transfer, PinName receive, Mail<char, 250>* m); |
ShaolinPoutine | 2:0000443a78fe | 13 | void SendATCommand(char firstChar, char secondChar, char *optionalParam = NULL, int paramLen = 0); |
ShaolinPoutine | 6:3b97770f30e6 | 14 | void ZigBeeTransmit(int adresse16, int adresse64, char *data, int dataLength); |
ShaolinPoutine | 2:0000443a78fe | 15 | char* InterpretMessage(); |
ShaolinPoutine | 2:0000443a78fe | 16 | |
ShaolinPoutine | 2:0000443a78fe | 17 | private: |
ShaolinPoutine | 2:0000443a78fe | 18 | void ATCommandResponse(int len); |
ShaolinPoutine | 3:4c1dec78117b | 19 | void ZigBeeTransmitStatus(int len); |
ShaolinPoutine | 3:4c1dec78117b | 20 | void ZigBeeReceivePacket(int len); |
ShaolinPoutine | 2:0000443a78fe | 21 | void ModemStatus(int len); |
ShaolinPoutine | 2:0000443a78fe | 22 | void printHexa(char c); |
ShaolinPoutine | 2:0000443a78fe | 23 | void XBee::pcPrint(char* c); |
ShaolinPoutine | 2:0000443a78fe | 24 | }; |