forked from YoyodyneMonkeyWorks/DuinoZigBeeAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZigBeeAPI.h
45 lines (40 loc) · 1.11 KB
/
ZigBeeAPI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef ZigBeeAPI_h
#define ZigBeeAPI_h
#include <Arduino.h>
#include <SoftwareSerial.h>
const byte xBuffSize = 128;
const byte strBuffSize = 128;
class ZigBeeAPI : public Stream
{
public:
ZigBeeAPI();
ZigBeeAPI(Stream& port);
void begin(Stream &serial);
void setSerial(Stream &serial);
int available();
int read();
size_t write(uint8_t val);
void flush();
int peek();
byte* _PktData();
boolean AT(const char *CmdStrPtr);
boolean ATbyte(const char *CmdStrPtr, byte ValueByte);
boolean ATqueue(const char *CmdStrPtr, const uint8_t ByteArryPtr[], word ArrySize);
//void begin (byte xBeeRx, byte xBeeTx, uint16_t xBeeBaud);
void RxFlush();
boolean TX(long DAddHi, long DAddLo, word NetAdd, byte sEP, byte dEP, word Prfl, word Clstr, unsigned char BuffAdd[], byte BuffSize);
boolean TX_Indirect(byte sEP, word Prfl, word Clstr, unsigned char BuffAdd[], byte BuffSize);
int RX(int TimeMS);
int _PktDataSize();
long _PktIEEEAddHi();
long _PktIEEEAddLo();
long _PktNetAdd();
byte _PktDEP();
byte _PktSEP();
word _PktProfile();
word _PktCluster();
char* _ReadLog();
private:
Stream *_port;
};
#endif