39#if defined(__cplusplus)
64 bool (*init)(
XBee* self, uint32_t baudrate,
void* device);
65 bool (*connect)(
XBee* self);
66 bool (*disconnect)(
XBee* self);
67 uint8_t (*sendData)(
XBee* self,
const void* data);
68 bool (*softReset)(
XBee* self);
69 void (*hardReset)(
XBee* self);
70 void (*process)(
XBee* self);
71 bool (*connected)(
XBee* self);
72 void (*handleRxPacketFrame)(
XBee* self,
void *frame);
73 void (*handleTransmitStatusFrame)(
XBee* self,
void *frame);
88 int (*PortUartRead)(uint8_t *buffer,
int length);
89 int (*PortUartWrite)(
const uint8_t *buf, uint16_t len);
90 uint32_t (*PortMillis)(void);
91 void (*PortFlushRx)(void);
92 int (*PortUartInit)(uint32_t baudrate,
void *device);
93 void (*PortDelay)(uint32_t ms);
107 void (*OnReceiveCallback)(
XBee* self,
void * data);
108 void (*OnConnectCallback)(
XBee* self);
109 void (*OnDisconnectCallback)(
XBee* self);
110 void (*OnSendCallback)(
XBee* self,
void * data);
133bool XBeeInit(
XBee* self, uint32_t baudrate,
void* device);
145#if defined(__cplusplus)
Define library configurations.
Platform-specific abstraction layer for hardware interfaces.
uint8_t frameIdCntr
Definition: xbee.h:126
const XBeeCTable * ctable
Definition: xbee.h:125
const XBeeHTable * htable
Definition: xbee.h:124
const XBeeVTable * vtable
Definition: xbee.h:123
bool txStatusReceived
Flag to indicate if TX Status frame was received.
Definition: xbee.h:127
uint8_t deliveryStatus
Stores the delivery status of the transmitted frame.
Definition: xbee.h:128
bool XBeeInit(XBee *self, uint32_t baudrate, void *device)
Initializes the XBee module.
Definition: xbee.c:53
bool XBeeConnect(XBee *self)
Connects the XBee to the network.
Definition: xbee.c:68
void XBeeProcess(XBee *self)
Calls the XBee subclass's process implementation.
Definition: xbee.c:142
bool XBeeDisconnect(XBee *self)
Disconnects the XBee from the network.
Definition: xbee.c:82
bool XBeeApplyChanges(XBee *self)
Sends the ATAC command to apply pending configuration changes on the XBee module.
Definition: xbee.c:195
bool XBeeSoftReset(XBee *self)
Performs a soft reset of the XBee module.
Definition: xbee.c:111
bool XBeeConnected(XBee *self)
Checks if the XBee module is connected to the network.
Definition: xbee.c:157
bool XBeeSetAPIOptions(XBee *self, const uint8_t value)
Sends the AT_AO command to set API Options.
Definition: xbee.c:219
uint8_t XBeeSendData(XBee *self, const void *)
Request XBee to send data over network.
Definition: xbee.c:96
bool XBeeWriteConfig(XBee *self)
Sends the ATWR command to write the current configuration to the XBee module's non-volatile memory.
Definition: xbee.c:173
void XBeeHardReset(XBee *self)
Performs a hard reset of the XBee module.
Definition: xbee.c:126