22 #ifndef PXBEE_OTA_CLIENT_H 23 #define PXBEE_OTA_CLIENT_H 33 #define PXBEE_OTA_MAX_AUTH_LENGTH 64 40 #define PXBEE_OTA_FLAG_APS_ENCRYPT 0x0001 112 #define PXBEE_OTA_DATA_CLIENT_CLUST_ENTRY(ota, flags) \ 113 { DIGI_CLUST_SERIAL, _pxbee_ota_transparent_rx, ota, \ 114 WPAN_CLUST_FLAG_INOUT | WPAN_CLUST_FLAG_NOT_ZCL | flags } 118 #define PXBEE_OTA_CMD_CLIENT_CLUST_ENTRY(handler, context, flag) \ 119 { DIGI_CLUST_PROG_XBEE_OTA_UPD, handler, \ 120 context, (flag) | WPAN_CLUST_FLAG_CLIENT | WPAN_CLUST_FLAG_NOT_ZCL } 126 #use "pxbee_ota_client.c" 129 #endif // PXBEE_OTA_CLIENT_H defined Structure used to track the state of an Xmodem send.
Definition: xmodem.h:114
#define FAR
On platforms with "far" pointers, define to the proper keyword; empty definition if not required...
Definition: platform.h:396
int _pxbee_ota_transparent_rx(const wpan_envelope_t FAR *envelope, void FAR *context)
Cluster handler for "Digi Transparent Serial" cluster.
Definition: pxbee_ota_client.c:47
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
#define XBEE_CBUF_OVERHEAD
XBEE_CBUF_OVERHEAD is used when allocating memory for a circular buffer.
Definition: cbuf.h:65
Structure for tracking state of over-the-air update.
Definition: pxbee_ota_client.h:36
Makes use of xbee/serial.h API for sending and receiving serial data.
Support code for the "Digi Transparent Serial" cluster (cluster 0x0011 of endpoint 0xE8)...
addr64 target
network device to update
Definition: pxbee_ota_client.h:38
int pxbee_ota_init(pxbee_ota_t *ota, wpan_dev_t *dev, const addr64 *target)
Initialize an pxbee_ota_t structure to send firmware updates to target using dev. ...
Definition: pxbee_ota_client.c:157
unsigned short uint16_t
16-bit unsigned integer
Definition: platform_config.h:41
uint8_t raw[255+XBEE_CBUF_OVERHEAD]
buffer for xbee_cbuf_t structure and bytes received from target
Definition: pxbee_ota_client.h:46
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
xbee_xmodem_state_t xbxm
track state of Xmodem transfer
Definition: pxbee_ota_client.h:48
Cluster/Endpoint layer for WPAN networks (ZigBee and DigiMesh).
wpan_dev_t * dev
local device to send updates through
Definition: pxbee_ota_client.h:37
uint16_t flags
combination of PXBEE_OTA_FLAG_* values
Definition: pxbee_ota_client.h:39
uint8_t auth_length
Number of bytes in auth_data.
Definition: pxbee_ota_client.h:52
Typedef used to hold a 64-bit IEEE address, represented as 8 bytes, 4 16-bit values or 2 32-bit value...
Definition: types.h:34
Circular buffer used by transparent serial cluster handler.
Definition: cbuf.h:31
xbee_cbuf_t cbuf
track state of circular buffer
Definition: pxbee_ota_client.h:44
The "envelope" is used to gather all necessary information about a given frame on the network...
Definition: aps.h:40
Structure used by the WPAN/ZigBee layers.
Definition: aps.h:390
uint8_t auth_data[PXBEE_OTA_MAX_AUTH_LENGTH]
Payload used to initiate update.
Definition: pxbee_ota_client.h:51