APP3 / Zigbee_communication

Dependents:   Coordinator_node Router_node

Committer:
ShaolinPoutine
Date:
Tue Feb 14 21:05:16 2017 +0000
Revision:
15:04e892ae9361
Parent:
9:902d0f74333c
Child:
19:8da8068315da
Added web comm

Who changed what in which revision?

UserRevisionLine numberNew 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 15:04e892ae9361 11 Mail<char[256], 16>* webmail;
ShaolinPoutine 15:04e892ae9361 12 char buffer[256];
ShaolinPoutine 15:04e892ae9361 13
ShaolinPoutine 15:04e892ae9361 14 XBee(PinName reset, PinName transfer, PinName receive, Mail<char, 250>* m, Mail<char[256], 16>* w);
ShaolinPoutine 2:0000443a78fe 15 void SendATCommand(char firstChar, char secondChar, char *optionalParam = NULL, int paramLen = 0);
EmileArseneault 9:902d0f74333c 16 void ZigBeeTransmit(int adresse16, int adresse64msb, int adresse64lsb, char *data, int dataLength);
EmileArseneault 9:902d0f74333c 17 void BroadcastHelloWorld();
ShaolinPoutine 2:0000443a78fe 18 char* InterpretMessage();
ShaolinPoutine 15:04e892ae9361 19
ShaolinPoutine 15:04e892ae9361 20 void appendBuffer(char* c);
ShaolinPoutine 15:04e892ae9361 21 void sendBuffer();
ShaolinPoutine 2:0000443a78fe 22
ShaolinPoutine 2:0000443a78fe 23 private:
ShaolinPoutine 2:0000443a78fe 24 void ATCommandResponse(int len);
ShaolinPoutine 3:4c1dec78117b 25 void ZigBeeTransmitStatus(int len);
ShaolinPoutine 3:4c1dec78117b 26 void ZigBeeReceivePacket(int len);
ShaolinPoutine 2:0000443a78fe 27 void ModemStatus(int len);
ShaolinPoutine 2:0000443a78fe 28 void printHexa(char c);
EmileArseneault 5:9b4d93bd6725 29 void printInt(int i);
EmileArseneault 5:9b4d93bd6725 30 void pcPrint(char* c);
EmileArseneault 9:902d0f74333c 31 char getChar();
ShaolinPoutine 2:0000443a78fe 32 };