9 #ifndef _GXPL_DEFS_HEADER_ 10 #define _GXPL_DEFS_HEADER_ 15 #include <sysio/defs.h> 16 #include <sysio/log.h> 17 #include <sysio/dlist.h> 18 #include <sysio/vector.h> 19 #include <sysio/serial.h> 20 #include <sysio/delay.h> 21 #if defined(ARCH_ARM_RASPBERRYPI) 22 #include <sysio/doutput.h> 24 #define GXPL_TARGET_STR "unix" 28 #elif defined(__AVR__) 29 #include <avrio/defs.h> 30 #include <avrio/vector.h> 31 #include <avrio/dlist.h> 33 #include <avrio/dpin.h> 34 #include <avrio/assert.h> 35 #include <avrio/log.h> 36 #include <avrio/delay.h> 38 #define GXPL_TARGET_STR "avr" 40 #error This target platform is not supported. 48 typedef struct _gxPLApplication gxPLApplication;
49 typedef struct _gxPLIo gxPLIo;
50 typedef struct _gxPLMessage gxPLMessage;
51 typedef struct _gxPLDevice gxPLDevice;
52 typedef struct _gxPLDeviceConfig gxPLDeviceConfig;
53 typedef struct _gxPLHub gxPLHub;
54 typedef struct _gxPLBridge gxPLBridge;
76 #define GXPL_VENDORID_MAX 8 81 #define GXPL_DEVICEID_MAX 8 86 #define GXPL_INSTANCEID_MAX 16 91 #define GXPL_CLASS_MAX 8 96 #define GXPL_TYPE_MAX 8 101 #define GXPL_NAME_MAX 16 106 #define GXPL_HOP_MAX 9 111 #define GXPL_GETOPT "i:n:B:W:dDr" 116 #define GXPL_DEFAULT_BAUDRATE 38400 121 #define GXPL_DEFAULT_FLOW SERIAL_FLOW_RTSCTS 141 gxPLMessageUnknown = -1
152 gxPLIoFuncGetBcastAddr,
153 gxPLIoFuncGetNetInfo,
154 gxPLIoFuncGetLocalAddrList,
155 gxPLIoFuncNetAddrToString,
156 gxPLIoFuncNetAddrFromString,
164 gxPLNetFamilyUnknown = 0,
168 gxPLNetFamilyZigbee = 4,
169 gxPLNetFamilyZigbee16 = gxPLNetFamilyZigbee,
170 gxPLNetFamilyZigbee64 = gxPLNetFamilyZigbee | 1
177 gxPLMessageStateInit = 0,
178 gxPLMessageStateHeader,
179 gxPLMessageStateHeaderHop,
180 gxPLMessageStateHeaderSource,
181 gxPLMessageStateHeaderTarget,
182 gxPLMessageStateHeaderEnd,
183 gxPLMessageStateSchema,
184 gxPLMessageStateBodyBegin,
185 gxPLMessageStateBody,
186 gxPLMessageStateBodyEnd,
188 gxPLMessageStateError = -1
195 gxPLHeartbeatHello = 0,
196 gxPLHeartbeatGoodbye = 1,
220 uint8_t coordinator: 1;
221 uint8_t new_panid: 1;
227 #define GXPL_XBEEZB_HAS_HWRESET 1 229 #elif defined(ARCH_ARM_RASPBERRYPI) 230 #define GXPL_XBEEZB_HAS_HWRESET 1 240 char iface[NAME_MAX];
241 char iolayer[NAME_MAX];
248 uint16_t nodaemon: 1;
250 uint16_t broadcast: 1;
271 uint16_t isbroadcast: 1;
gxPLConfigurableType
xPL Configurable Type
gxPLHeartbeatType
Heartbeat type.
#define GXPL_DEVICEID_MAX
Maximum number of characters allowed for device ID.
struct _gxPLSetting gxPLSetting
Describe a gxPLApplication configuration.
struct _gxPLFilter gxPLFilter
Describe a xPL filter.
#define GXPL_TYPE_MAX
Maximum number of characters allowed for schema type.
gxPLMessageType
Possible xPL message types.
Describe a source or destination xPL identifier.
struct _gxPLIoAddr gxPLIoAddr
Describe a network address.
struct _gxPLIoXBeeSetting gxPLIoXBeeSetting
Describe a XBee configuration.
gxPLNetFamily
Net families.
gxPLConnectType
xPL Connection mode
Describe a gxPLApplication configuration.
struct _gxPLSchema gxPLSchema
Describe a xPL schema.
gxPLIoFunc
Possible xPL ioctl call.
struct _gxPLId gxPLId
Describe a source or destination xPL identifier.
Describe a network address.
Describe a XBee configuration.
#define GXPL_CLASS_MAX
Maximum number of characters allowed for schema class.
#define GXPL_INSTANCEID_MAX
Maximum number of characters allowed for instance ID.
gxPLMessageState
Decoding states of a message.
#define GXPL_VENDORID_MAX
Maximum number of characters allowed for vendor ID.