XBee modules

Dependencies:   DigiLogger

Fork of XBeeLib by Digi International Inc.

Embed: (wiki syntax)

« Back to documentation index

XBeeZB Class Reference

Class for XBee ZigBee modules, derived from XBee. More...

#include <XBeeZB.h>

Inherits XBeeLib::XBee.

Public Types

enum  IoLine {
  DIO0_AD0 = 0, DIO1_AD1 = 1, DIO2_AD2 = 2, DIO3_AD3 = 3,
  DIO4 = 4, DIO5 = 5, DIO6 = 6, DIO7 = 7,
  DIO10 = 10, DIO11 = 11, DIO12 = 12, SUPPLY_VOLTAGE = 7
}
 

IoLine for XBeeZB Modules.

More...
enum  AssocStatus {
  ErrorReading = -1, Joined = 0x00, NoPANs = 0x21, NoValidPAN = 0x22,
  JoinNotAllowed = 0x23, NoBeacons = 0x24, Unexpected = 0x25, JoinFailed = 0x27,
  CoordStartFail = 0x2A, CheckingCoord = 0x2B, LeaveFail = 0x2C, JoinNoResponse = 0xAB,
  SecKeyUnsec = 0xAC, SecKeyNotRec = 0xAD, SecBadKey = 0xAF, Scanning = 0xFF
}
enum  RadioMode {
  ModeUnknown = 0, ModeAPI1 = 1, ModeAPI2 = 2, ModeTransparent = 3,
  ModeBootloader = 4
}
 

RadioMode.

More...

Public Member Functions

 XBeeZB (PinName tx, PinName rx, PinName reset=NC, PinName rts=NC, PinName cts=NC, int baud=9600)
 Class constructor.
virtual ~XBeeZB ()
 Class destructor.
RadioStatus init ()
 init- initializes object This function must be called just after creating the object so it initializes internal data.
RadioStatus set_panid (uint64_t panid)
 set_panid - sets the 64bit extended PAN ID.
RadioStatus get_configured_panid (uint64_t *const panid)
 get_configured_panid - gets the configured PAN ID, as it was set by set_panid().
RadioStatus get_operating_panid (uint64_t *const panid)
 get_operating_panid - gets the operating 64bit extended PAN ID the module is running on.
RadioStatus set_panid (const RemoteXBee &remote, uint64_t panid)
 set_panid - sets the 64bit extended PAN ID.
RadioStatus get_configured_panid (const RemoteXBee &remote, uint64_t *const panid)
 get_configured_panid - gets the configured PAN ID in a remote node, as it was set by set_panid()
RadioStatus get_operating_panid (const RemoteXBee &remote, uint64_t *const panid)
 get_operating_panid - gets the operating 64bit extended PAN ID in which a remote node is running on.
RadioStatus set_channel_mask (uint16_t const chmask)
 set_channel_mask - sets the channel mask in which the module will scan for the PAN ID (if it is a router or end-device) or start the network (if it is a coordinator).
RadioStatus get_channel_mask (uint16_t *const chmask)
 get_channel_mask - gets the channel mask in which the module will scan for the PAN ID (if it is a router or end-device) or start the network (if it is a coordinator).
RadioStatus get_network_address (uint16_t *const addr)
 get_network_address - gets the 16bit network address of the device
RadioStatus check_for_coordinator_at_start (bool enable)
 check_for_coordinator_at_start - (Routers only) If enabled, a router will verify the coordinator is on its operating channel when joining or coming up from a power cycle.
RadioStatus set_network_security_key (const uint8_t *const key, const uint16_t length)
 set_network_security_key - (Coordinator only) Set the 128-bit AES network encryption key.
RadioStatus set_encryption_options (const uint8_t options)
 set_encryption_options - Configure options for encryption.
void register_node_discovery_cb (node_discovery_zb_cb_t function)
 register_node_discovery_cb - registers the callback function that will be called when the responses to the node discovery command arrive
void unregister_node_discovery_cb ()
 unregister_node_discovery_cb - removes the node discovery callback
void register_receive_cb (receive_zb_cb_t function)
 register_receive_cb - registers the callback function that will be called when a data packet is received
void unregister_receive_cb ()
 unregister_receive_cb - removes the rx packet callback
void register_io_sample_cb (io_data_cb_zb_t function)
 register_io_sample_cb - registers the callback function that will be called when a IO Sample Data packet is received
void unregister_io_sample_cb ()
 unregister_io_sample_cb - removes the IO Sample Data reception callback
virtual TxStatus send_data (const RemoteXBee &remote, const uint8_t *const data, uint16_t len, bool syncr=true)
 send_data - sends data to a remote device
TxStatus send_data (const RemoteXBee &remote, uint8_t source_ep, uint8_t dest_ep, uint16_t cluster_id, uint16_t profile_id, const uint8_t *const data, uint16_t len, bool syncr=true)
 send_data - sends data to a remote device.
TxStatus send_data_to_coordinator (const uint8_t *const data, uint16_t len, bool syncr=true)
 send_data_to_coordinator - sends data to the ZigBee coordinator
AssocStatus get_assoc_status (void)
 get_assoc_status - returns current network association status.
bool is_joined ()
 is_joined - checks if the device is joined to ZigBee network
RemoteXBeeZB get_remote_node_by_id (const char *const node_id)
 get_remote_node_by_id - searches for a device in the network with the specified Node Identifier.
virtual AtCmdFrame::AtCmdResp set_param (const RemoteXBee &remote, const char *const param, uint32_t data)
 set_param - sets a parameter in a remote radio by sending an AT command and waiting for the response.
virtual AtCmdFrame::AtCmdResp set_param (const RemoteXBee &remote, const char *const param, const uint8_t *data=NULL, uint16_t len=0)
 set_param - sets a parameter in a remote radio by sending an AT command and waiting for the response.
virtual AtCmdFrame::AtCmdResp get_param (const RemoteXBee &remote, const char *const param, uint32_t *const data)
 get_param - gets a parameter from a remote radio by sending an AT command and waiting for the response.
virtual AtCmdFrame::AtCmdResp get_param (const RemoteXBee &remote, const char *const param, uint8_t *const data, uint16_t *const len)
 get_param - gets a parameter from a remote radio by sending an AT command and waiting for the response.
RadioStatus set_pin_config (const RemoteXBee &remote, IoLine line, IoMode mode)
 set_pin_config - configures a radio IO line
RadioStatus get_pin_config (const RemoteXBee &remote, IoLine line, IoMode *const mode)
 get_pin_config - gets the configuration of a radio IO line
RadioStatus set_dio (const RemoteXBee &remote, IoLine line, DioVal val)
 set_dio - sets to low/high a DIO line
RadioStatus get_dio (const RemoteXBee &remote, IoLine line, DioVal *const val)
 get_dio - read the value of a DIO configured as digital input
RadioStatus get_adc (const RemoteXBee &remote, IoLine line, uint16_t *const val)
 get_adc - read the value of the espcified ADC line
IOSampleZB get_iosample (const RemoteXBee &remote)
 get_iosample - retrieves an IOSampleZB from a remote node.
RadioStatus set_pin_pull_up (const RemoteXBee &remote, IoLine line, bool enable)
 set_pin_pull_up - enables or disables the internal pull-up resistor of a line
RadioStatus enable_dio_change_detection (const RemoteXBee &remote, IoLine line, bool enable)
 enable_dio_change_detection - enables or disables the notification when a change is detected in a digital input line.
uint64_t get_addr64 () const
 get_addr64 - returns the 64bit address of the local device
RadioStatus hardware_reset ()
 hardware_reset - performs a hardware reset.
RadioStatus software_reset ()
 software_reset - performs a firmware reset
virtual RadioStatus device_reset ()
 device_reset - performs a hardware reset if there is a GPIO connected to the reset line of the device.
void set_tx_options (uint8_t options)
 set_tx_options - sets the transmit options byte, used with the transmit frames.
uint8_t get_tx_options () const
 get_tx_options - returns the tx options byte configured in the library.
RadioStatus write_config ()
 write_config - write settings to non volatile memory
RadioStatus config_io_sample_destination (const RemoteXBee &remote, const RemoteXBee &destination)
 config_io_sample_destination - configures to which node a remote module will send its IO Samples to.
RadioStatus set_io_sample_rate (const RemoteXBee &remote, float seconds)
 set_io_sample_rate - configures how often the IO Samples should be sent to the destination (see send_io_sample_to).
RadioStatus set_power_level (uint8_t level)
 set_power_level - sets the power level at which the radio will transmit
RadioStatus get_power_level (uint8_t *const level)
 get_power_level - reads the power level configured in the radio
uint16_t get_hw_version () const
 get_hw_version - gets the hardware version of the radio
uint16_t get_fw_version () const
 get_fw_version - gets the firmware version of the radio
RadioStatus set_node_identifier (const char *const node_id)
 set_node_identifier - configures the Node Identifier string
RadioStatus get_node_identifier (char *const node_id)
 get_node_identifier - reads the configured Node Identifier string
RadioStatus enable_network_encryption (bool enable)
 enable_network_encryption - Enable network encryption.
RadioStatus set_network_encryption_key (const uint8_t *const key, const uint16_t length)
 set_network_encryption_key - Sets the 128-bit AES key used for encryption and decryption.
RadioStatus start_node_discovery ()
 start_node_discovery - starts a node discovery operation.
bool is_node_discovery_in_progress ()
 is_node_discovery_in_progress - checks if node discovery is in progress.
RadioStatus config_node_discovery (uint16_t backoff_ms, uint8_t options=0)
 config_node_discovery - configures the node discovery operation
RadioStatus get_config_node_discovery (uint16_t *const backoff_ms, uint8_t *const options)
 get_config_node_discovery - reads the configuration of the node discovery settings
void set_timeout (uint16_t timeout_ms)
 set_timeout - sets the timeout in ms, used by sync methods
uint16_t get_timeout () const
 get_timeout - gets the timeout in ms configured in the library.
TxStatus send_data_broadcast (const uint8_t *const data, uint16_t len, bool syncr=true)
 send_data_broadcast - sends data to all devices in the network, using the broadcast address.
AtCmdFrame::AtCmdResp set_param (const char *const param, uint32_t data)
 set_param - sets a parameter in the local radio by sending an AT command and waiting for the response.
AtCmdFrame::AtCmdResp set_param (const char *const param, const uint8_t *data=NULL, uint16_t len=0)
 set_param - sets a parameter in the local radio by sending an AT command and waiting for the response.
AtCmdFrame::AtCmdResp get_param (const char *const param, uint32_t *const data)
 get_param - gets a parameter from the local radio by sending an AT command and waiting for the response.
AtCmdFrame::AtCmdResp get_param (const char *const param, uint8_t *const data, uint16_t *const len)
 get_param - gets a parameter from the local radio by sending an AT command and waiting for the response.
uint32_t process_rx_frames ()
 process_rx_frames - method that processes the frames queued in the reception buffer.
void register_modem_status_cb (modem_status_cb_t function)
 register_modem_status_cb - registers the callback function that will be called when a Modem Status packet is received
void unregister_modem_status_cb ()
 unregister_modem_status_cb - removes the Modem Status reception callback

Protected Member Functions

virtual void radio_status_update (AtCmdFrame::ModemStatus modem_status)
 Method called directly by the library when a modem status frame is received to update the internal status variables.
virtual RadioStatus get_node_discovery_timeout (uint16_t *const timeout_ms)
 get_node_discovery_timeout - gets the node discovery timeout
TxStatus send_data (ApiFrame *frame)
 Method used internaly by the derived classes to transmit data to remote nodes, waiting for the answer from the device.
void send_byte_escaping_if (uint8_t data)
 send_byte_escaping_if - sends a byte, through the serial interface, to the radio, escaping the byte if the working mode of the radio is API2.
void uart_read_cb ()
 uart_read_cb - serial interface callback, called when data is received on the serial port.
ApiFrameget_this_api_frame (uint8_t id, ApiFrame::ApiFrameType type, ApiFrame::ApiFrameType type2=ApiFrame::Invalid)
 get_this_api_frame - searches in the FrameBuffer for an incoming frame with frameid equal to id and frame type equal to type or type2.
virtual void send_api_frame (ApiFrame *frame)
 send_api_frame - method to send, over the serial port, an API frame
AtCmdFrame::AtCmdResp send_at_cmd (AtCmdFrame *frame, uint8_t *const buf, uint16_t *const len, RadioLocation radio_location=RadioLocal, bool reverse=true)
 send_at_cmd - sends an AT command to the radio and waits for the response.
AtCmdFrame::AtCmdResp send_at_cmd (AtCmdFrame *frame)
 Method that sends an AT command to the module and waits for the command response.
RadioStatus register_frame_handler (FrameHandler *const handler)
 register_frame_handler - registers an object to handle incoming frames from the radio.
RadioStatus unregister_frame_handler (FrameHandler *const handler)
 unregister_frame_handler - removes a previously registered frame handler
RadioProtocol get_radio_protocol (void) const
 get_radio_protocol - returns the RF protocol that the connected module uses based on its firmware and hardware versions
RadioStatus _get_iosample (const RemoteXBee &remote, uint8_t *const io_sample, uint16_t *const len)
 _get_iosample - forces an io_sample read (reads all digital and analog inputs)
bool check_radio_flow_control ()
 check_radio_flow_control - checks that the radio has the CTS "D7" and RTS "D6" pins configured according to the serial hardware flow control selected by the user
int get_AI (void)
 get_AI - reads the AI parameter.

Protected Attributes

FH_NodeDiscoveryZB * _nd_handler
 Frame handler used for the node discovery.
FH_RxPacketZB * _rx_pkt_handler
 Frame handler used for the rx packets.
FH_IoDataSampeZB * _io_data_handler
 Frame handler used for the IO Data Sample packets.
SerialBase::Flow _serial_flow_type
 serial hardware flow control selected by the user (RTSCTS, RTS,CTS)
RadioMode _mode
 Operating mode of the module (API1, API2,...)
uint16_t _hw_version
 Hardware version value of the radio.
uint16_t _fw_version
 Firmware version value of the radio.
uint16_t _timeout_ms
 Timeout in ms for sync operations (when we wait for a response)
uint64_t _dev_addr64
 Device 64 bit address (SH, SL)
RawSerial * _uart
 Serial Interface, use RawSerial as we dont use the streams.
DigitalOut * _reset
 IO connected to the radio reset line.
uint8_t _tx_options
 Transmit options byte.
FrameHandler_fhandlers [MAX_FRAME_HANDLERS]
 Array of frame handler pointers.
volatile uint16_t _hw_reset_cnt
 Hardware reset counter, automatically updated by the library.
volatile uint16_t _wd_reset_cnt
 Watchdog reset counter, automatically updated by the library.
FH_ModemStatus * _modem_status_handler
 Frame handler used for the Modem Status packets.
AtCmdFrame::ModemStatus _modem_status
 Latest modem status received.
bool _initializing
 Library is initializing.
Timer _nd_timer
 Timer used for node discovery.
int _nd_timeout
 node discovery timeout
uint8_t _node_by_ni_frame_id
 If a _get_remote_node_by_id() is in progress, this keeps the expected frame id.

Static Protected Attributes

static FrameBuffer _framebuf_app
 buffer to store the received frames

Detailed Description

Class for XBee ZigBee modules, derived from XBee.

Definition at line 25 of file XBeeZB.h.


Member Enumeration Documentation

Enumerator:
ErrorReading 

Error occurred when reading parameter.

Joined 

Successfully formed or joined a network.

(Coordinators form a network, routers and end devices join a network.)

NoPANs 

Scan found no PANs.

NoValidPAN 

Scan found no valid PANs based on current SC and ID settings.

JoinNotAllowed 

Valid Coordinator or Routers found, but they are not allowing joining (NJ expired).

NoBeacons 

No joinable beacons were found.

Unexpected 

Unexpected state, node should not be attempting to join at this time.

JoinFailed 

Node Joining attempt failed (typically due to incompatible security settings).

CoordStartFail 

Coordinator start attempt failed.

CheckingCoord 

Checking for an existing coordinator.

LeaveFail 

Attempt to leave the network failed.

JoinNoResponse 

Attempted to join a device that did not respond.

SecKeyUnsec 

Secure join error - network security key received unsecured.

SecKeyNotRec 

Secure join error - network security key not received.

SecBadKey 

Secure join error - joining device does not have the right preconfigured link key.

Scanning 

Scanning for a ZigBee network (routers and end devices).

Definition at line 47 of file XBeeZB.h.

enum IoLine

IoLine for XBeeZB Modules.

Enumerator:
DIO0_AD0 

DIO0_AD0 pin.

DIO1_AD1 

DIO1_AD1 pin.

DIO2_AD2 

DIO2_AD2 pin.

DIO3_AD3 

DIO3_AD3 pin.

DIO4 

DIO4 pin.

DIO5 

DIO5 pin.

DIO6 

DIO6 pin.

DIO7 

DIO7 pin.

DIO10 

DIO10 pin.

DIO11 

DIO11 pin.

DIO12 

DIO12 pin.

SUPPLY_VOLTAGE 

SUPPLY_VOLTAGE is not a real pin.

Definition at line 32 of file XBeeZB.h.

enum RadioMode [inherited]

RadioMode.

Enumerator:
ModeUnknown 

Unknown.

ModeAPI1 

API1.

ModeAPI2 

API2.

ModeTransparent 

Transparent.

ModeBootloader 

Bootloader.

Definition at line 131 of file XBee.h.


Constructor & Destructor Documentation

XBeeZB ( PinName  tx,
PinName  rx,
PinName  reset = NC,
PinName  rts = NC,
PinName  cts = NC,
int  baud = 9600 
)

Class constructor.

Parameters:
txthe TX pin of the UART that will interface the XBee module
rxthe RX pin of the UART that will interface the XBee module
resetthe pin to which the XBee's reset line is attached to, use NC if not available
rtsthe RTS pin for the UART that will interface the XBee module, use NC if not available
ctsthe CTS pin for the UART that will interface the XBee module, use NC if not available
baudthe baudrate for the UART that will interface the XBee module. Note that the module has to be already configured to this baud rate (ATBD parameter). By default it is configured to 9600 bps

Definition at line 22 of file XBeeZB.cpp.

~XBeeZB (  ) [virtual]

Class destructor.

Definition at line 49 of file XBeeZB.cpp.


Member Function Documentation

RadioStatus _get_iosample ( const RemoteXBee remote,
uint8_t *const   io_sample,
uint16_t *const   len 
) [protected, inherited]

_get_iosample - forces an io_sample read (reads all digital and analog inputs)

Parameters:
remoteremote device
io_samplebuffer where the io_sample response is copied
lenpointer where the length of the io_sample response is stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 298 of file RadioConfig.cpp.

RadioStatus check_for_coordinator_at_start ( bool  enable )

check_for_coordinator_at_start - (Routers only) If enabled, a router will verify the coordinator is on its operating channel when joining or coming up from a power cycle.

If a coordinator is not detected, the router will leave its current channel and attempt to join a new PAN. If JV=0, the router will continue operating on its current channel even if a coordinator is not detected.

Parameters:
enablewhether to enable this feature or not
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 237 of file XBeeZB.cpp.

bool check_radio_flow_control (  ) [protected, inherited]

check_radio_flow_control - checks that the radio has the CTS "D7" and RTS "D6" pins configured according to the serial hardware flow control selected by the user

Returns:
true if check success.

Definition at line 44 of file XBee.cpp.

RadioStatus config_io_sample_destination ( const RemoteXBee remote,
const RemoteXBee destination 
) [inherited]

config_io_sample_destination - configures to which node a remote module will send its IO Samples to.

: this will modify 'remote' DH and DL parameters, if the remote node is configured in transparent mode this could lead to unwanted behavior. Consult the module's reference manual for more information.

Parameters:
remoteremote device that will be sending the IO Samples
destinationremote device that will be receiving the IO Samples sent by 'remote'
Returns:
the result of the data transfer Success if the operation was successful, Failure otherwise

Definition at line 312 of file RadioConfig.cpp.

RadioStatus config_node_discovery ( uint16_t  backoff_ms,
uint8_t  options = 0 
) [inherited]

config_node_discovery - configures the node discovery operation

Parameters:
backoff_msmax allowed time for devices in the network to answer to the Node Discovery request
optionsnode discovery options (flags) XBEE802_ND_OPTION_SELF_RESPONSE - to allow the module self responding (802.15.4 only) XBEEZB_ND_OPTION_SELF_RESPONSE - to allow the module self responding (ZigBee only) XBEEZB_ND_OPTION_APPEND_DD - to append the DD value to the response (ZigBee only) XBEEDM_ND_OPTION_INCLUDE_RSSI - to include RSSI information in response (DigiMesh only) XBEEDM_ND_OPTION_SELF_RESPONSE - to allow the module self responding (DigiMesh only) XBEEDM_ND_OPTION_APPEND_DD - to append the DD value to the response (DigiMesh only)
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 258 of file RadioConfig.cpp.

RadioStatus device_reset (  ) [virtual, inherited]

device_reset - performs a hardware reset if there is a GPIO connected to the reset line of the device.

Otherwise, performs a firmware reset.

Returns:
Success if the operation was successful, Failure otherwise

Definition at line 215 of file XBee.cpp.

RadioStatus enable_dio_change_detection ( const RemoteXBee remote,
IoLine  line,
bool  enable 
)

enable_dio_change_detection - enables or disables the notification when a change is detected in a digital input line.

In other words, it will force an IO Sample transmission when the DIO state changes. Only for DIO0 to DIO11.

Parameters:
remoteremote device
lineline being configured for pull-up
enablewhether to enable the internal pull-up resistor.
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 615 of file XBeeZB.cpp.

RadioStatus enable_network_encryption ( bool  enable ) [inherited]

enable_network_encryption - Enable network encryption.

Parameters:
enablewhether to enable this feature or not
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 114 of file RadioConfig.cpp.

RadioStatus get_adc ( const RemoteXBee remote,
IoLine  line,
uint16_t *const   val 
)

get_adc - read the value of the espcified ADC line

Parameters:
remoteremote device
lineADC line being read
valpointer where the value read from hte ADC will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 526 of file XBeeZB.cpp.

uint64_t get_addr64 (  ) const [inherited]

get_addr64 - returns the 64bit address of the local device

Returns:
the 64bit address of the local device

Definition at line 196 of file XBee.cpp.

int get_AI ( void   ) [protected, inherited]

get_AI - reads the AI parameter.

Returns:
-1 if an error occurred when reading AI. 0-0xFF the AI value.

Definition at line 870 of file XBee.cpp.

XBeeZB::AssocStatus get_assoc_status ( void   )

get_assoc_status - returns current network association status.

This wraps AI parameter, for more information refer to moudle's Reference Manual.

Returns:
an AssocStatus with current network association status.

Definition at line 343 of file XBeeZB.cpp.

RadioStatus get_channel_mask ( uint16_t *const   chmask )

get_channel_mask - gets the channel mask in which the module will scan for the PAN ID (if it is a router or end-device) or start the network (if it is a coordinator).

Parameters:
chmaskpointer to where the configured channel mask will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 67 of file XBeeZB.cpp.

RadioStatus get_config_node_discovery ( uint16_t *const   backoff_ms,
uint8_t *const   options 
) [inherited]

get_config_node_discovery - reads the configuration of the node discovery settings

Parameters:
backoff_mspointer where the configured node discovery back-off time value will be stored
optionspointer whre the node discovery options (flags) will be saved
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 279 of file RadioConfig.cpp.

RadioStatus get_configured_panid ( uint64_t *const   panid )

get_configured_panid - gets the configured PAN ID, as it was set by set_panid().

Note:
on ZigBee devices, if set to 0, the coordinator will select a random PAN ID and the routers will join any extended PAN ID
Parameters:
panidpointer where the configured PAN ID will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 118 of file XBeeZB.cpp.

RadioStatus get_configured_panid ( const RemoteXBee remote,
uint64_t *const   panid 
)

get_configured_panid - gets the configured PAN ID in a remote node, as it was set by set_panid()

Note:
on ZigBee devices, if set to 0, the coordinator will select a random PAN ID and the routers will join any extended PAN ID
Parameters:
remoteremote device
panidpointer where the configured PAN ID will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 174 of file XBeeZB.cpp.

RadioStatus get_dio ( const RemoteXBee remote,
IoLine  line,
DioVal *const   val 
)

get_dio - read the value of a DIO configured as digital input

Parameters:
remoteremote device
lineDIO line being read
valpointer where the DIO value read will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 521 of file XBeeZB.cpp.

uint16_t get_fw_version (  ) const [inherited]

get_fw_version - gets the firmware version of the radio

Returns:
the firmware version of the radio

Definition at line 138 of file RadioConfig.cpp.

uint16_t get_hw_version (  ) const [inherited]

get_hw_version - gets the hardware version of the radio

Returns:
the hardware version of the radio

Definition at line 133 of file RadioConfig.cpp.

IOSampleZB get_iosample ( const RemoteXBee remote )

get_iosample - retrieves an IOSampleZB from a remote node.

This object can be used to get the remote node's ADC and DIO values.

Parameters:
remoteremote device
Returns:
IOSampleZB object with the remote node's DIO and ADC values.

Definition at line 531 of file XBeeZB.cpp.

RadioStatus get_network_address ( uint16_t *const   addr )

get_network_address - gets the 16bit network address of the device

Parameters:
addrpointer where the device 16bit network address will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 195 of file XBeeZB.cpp.

RadioStatus get_node_discovery_timeout ( uint16_t *const   timeout_ms ) [protected, virtual]

get_node_discovery_timeout - gets the node discovery timeout

Parameters:
timeout_mspointer where the node discovery timeout value will be stored
wait_for_complete_timeoutpointer where the function will store if the operator has to wait for the complete nd timeout after issuing a directed nd request
Returns:
Success if the operation was successful, Failure otherwise

Implements XBee.

Definition at line 211 of file XBeeZB.cpp.

RadioStatus get_node_identifier ( char *const   node_id ) [inherited]

get_node_identifier - reads the configured Node Identifier string

Parameters:
node_idPointer to where to store the read Node Identifier, it must point to a buffer with at least 21-bytes length.
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 97 of file RadioConfig.cpp.

RadioStatus get_operating_panid ( uint64_t *const   panid )

get_operating_panid - gets the operating 64bit extended PAN ID the module is running on.

This is useful to determine the PAN ID when the ID parameter (set_panid) is set to 0x00.

Parameters:
panidpointer where the operating PAN ID will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 97 of file XBeeZB.cpp.

RadioStatus get_operating_panid ( const RemoteXBee remote,
uint64_t *const   panid 
)

get_operating_panid - gets the operating 64bit extended PAN ID in which a remote node is running on.

This is useful to determine the PAN ID when the ID parameter (set_panid) is set to 0x00.

Parameters:
remoteremote device
panidpointer where the operating PAN ID will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 153 of file XBeeZB.cpp.

AtCmdFrame::AtCmdResp get_param ( const char *const   param,
uint32_t *const   data 
) [inherited]

get_param - gets a parameter from the local radio by sending an AT command and waiting for the response.

Parameters:
paramparameter to be get.
datapointer where the param value (4 bytes) will be stored.
Returns:
the command response status.

Definition at line 113 of file AtCommands.cpp.

AtCmdFrame::AtCmdResp get_param ( const char *const   param,
uint8_t *const   data,
uint16_t *const   len 
) [inherited]

get_param - gets a parameter from the local radio by sending an AT command and waiting for the response.

Parameters:
paramparameter to be get.
datapointer where the param value (n bytes) will be stored.
lenpointer where the number of bytes of the param value will be stored.
Returns:
the command response status.

Definition at line 140 of file AtCommands.cpp.

AtCmdFrame::AtCmdResp get_param ( const RemoteXBee remote,
const char *const   param,
uint32_t *const   data 
) [virtual]

get_param - gets a parameter from a remote radio by sending an AT command and waiting for the response.

Parameters:
remoteremote device
paramparameter to be get.
datapointer where the param value (4 bytes) will be stored.
Returns:
the command response status.

Implements XBee.

Definition at line 410 of file XBeeZB.cpp.

AtCmdFrame::AtCmdResp get_param ( const RemoteXBee remote,
const char *const   param,
uint8_t *const   data,
uint16_t *const   len 
) [virtual]

get_param - gets a parameter from a remote radio by sending an AT command and waiting for the response.

Parameters:
remoteremote device
paramparameter to be get.
datapointer where the param value (n bytes) will be stored.
lenpointer where the number of bytes of the param value will be stored.
Returns:
the command response status.

Implements XBee.

Definition at line 457 of file XBeeZB.cpp.

RadioStatus get_pin_config ( const RemoteXBee remote,
IoLine  line,
IoMode *const   mode 
)

get_pin_config - gets the configuration of a radio IO line

Parameters:
remoteremote device
lineIO line being read to get its configuration
modepointer where the configuration will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 499 of file XBeeZB.cpp.

RadioStatus get_power_level ( uint8_t *const   level ) [inherited]

get_power_level - reads the power level configured in the radio

Parameters:
levelpointer where the read power level will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 45 of file RadioConfig.cpp.

XBee::RadioProtocol get_radio_protocol ( void   ) const [protected, inherited]

get_radio_protocol - returns the RF protocol that the connected module uses based on its firmware and hardware versions

Returns:
a RadioProtocol enum.

Definition at line 627 of file XBee.cpp.

RemoteXBeeZB get_remote_node_by_id ( const char *const   node_id )

get_remote_node_by_id - searches for a device in the network with the specified Node Identifier.

Parameters:
node_idnode id of the device we are looking for
Returns:
a RemoteXBeeZB with the 16-bit and 64-bit address of the remote device whose node id matches with the parameter. If node is not found, the returned object will have invalid addresses (RemoteXBeeZB::is_valid() will return false).

Definition at line 335 of file XBeeZB.cpp.

ApiFrame * get_this_api_frame ( uint8_t  id,
ApiFrame::ApiFrameType  type,
ApiFrame::ApiFrameType  type2 = ApiFrame::Invalid 
) [protected, inherited]

get_this_api_frame - searches in the FrameBuffer for an incoming frame with frameid equal to id and frame type equal to type or type2.

If after timeout the frame hast not been found, returns.

Parameters:
idid of the frame we are looking for.
typetye type we expect the frame to be.
type2alternative valid type, if provided.
Returns:
a pointer to the frame found in the FrameBuffer or a null pointer if the frame has not been found and the timeout expired.

Definition at line 496 of file XBee.cpp.

uint16_t get_timeout ( void   ) const [inherited]

get_timeout - gets the timeout in ms configured in the library.

This value is used in sync commands

Returns:
the configured timeout value in ms

Definition at line 491 of file XBee.cpp.

uint8_t get_tx_options (  ) const [inherited]

get_tx_options - returns the tx options byte configured in the library.

Returns:
the tx options byte configured in the library.

Definition at line 148 of file RadioConfig.cpp.

RadioStatus hardware_reset (  ) [inherited]

hardware_reset - performs a hardware reset.

The reset GPIO must have been provided to the constructor

Returns:
Success if the operation was successful, Failure otherwise

Definition at line 201 of file XBee.cpp.

RadioStatus init ( void   )

init- initializes object This function must be called just after creating the object so it initializes internal data.

Returns:
Success if the module has been properly initialized and is ready to process data. Failure otherwise.

Reimplemented from XBee.

Definition at line 27 of file XBeeZB.cpp.

bool is_joined (  )

is_joined - checks if the device is joined to ZigBee network

Returns:
true if joined, false otherwise

Definition at line 348 of file XBeeZB.cpp.

bool is_node_discovery_in_progress (  ) [inherited]

is_node_discovery_in_progress - checks if node discovery is in progress.

Returns:
true if node discovery is in progress, false otherwise

Definition at line 173 of file RadioConfig.cpp.

uint32_t process_rx_frames (  ) [inherited]

process_rx_frames - method that processes the frames queued in the reception buffer.

Calls the process_frame_data method of the frame handlers registered

Returns:
Number of dropped frames since latest call to this method.

Definition at line 819 of file XBee.cpp.

void radio_status_update ( AtCmdFrame::ModemStatus  modem_status ) [protected, virtual]

Method called directly by the library when a modem status frame is received to update the internal status variables.

Reimplemented from XBee.

Definition at line 264 of file XBeeZB.cpp.

RadioStatus register_frame_handler ( FrameHandler *const   handler ) [protected, inherited]

register_frame_handler - registers an object to handle incoming frames from the radio.

Note:
For any type of frame more than one handler can be registered and all of them are called, sequentially, when a frame of that type arrives.
Parameters:
handlerpointer to the frame handler object
Returns:
the result of the registration Success if the operation was successful, Failure otherwise

Definition at line 583 of file XBee.cpp.

void register_io_sample_cb ( io_data_cb_zb_t  function )

register_io_sample_cb - registers the callback function that will be called when a IO Sample Data packet is received

Parameters:
functionfunction pointer with the callback function

Definition at line 391 of file XBeeZB.cpp.

void register_modem_status_cb ( modem_status_cb_t  function ) [inherited]

register_modem_status_cb - registers the callback function that will be called when a Modem Status packet is received

Parameters:
functionfunction pointer with the callback function

Definition at line 851 of file XBee.cpp.

void register_node_discovery_cb ( node_discovery_zb_cb_t  function )

register_node_discovery_cb - registers the callback function that will be called when the responses to the node discovery command arrive

Parameters:
functionfunction pointer with the callback function

Definition at line 353 of file XBeeZB.cpp.

void register_receive_cb ( receive_zb_cb_t  function )

register_receive_cb - registers the callback function that will be called when a data packet is received

Parameters:
functionfunction pointer with the callback function

Definition at line 372 of file XBeeZB.cpp.

void send_api_frame ( ApiFrame frame ) [protected, virtual, inherited]

send_api_frame - method to send, over the serial port, an API frame

Parameters:
framepointer to the frame that will be sent.

Definition at line 550 of file XBee.cpp.

AtCmdFrame::AtCmdResp send_at_cmd ( AtCmdFrame frame ) [protected, inherited]

Method that sends an AT command to the module and waits for the command response.

Returns:
the AT command response

Definition at line 72 of file AtCommands.cpp.

AtCmdFrame::AtCmdResp send_at_cmd ( AtCmdFrame frame,
uint8_t *const   buf,
uint16_t *const   len,
RadioLocation  radio_location = RadioLocal,
bool  reverse = true 
) [protected, inherited]

send_at_cmd - sends an AT command to the radio and waits for the response.

Method that sends an AT command to the module and waits for the command response.

Parameters:
frameapi frame with the command and command params.
bufpointer where the param response (n bytes) will be stored.
lenpointer where the number of bytes of the param response will be stored.
radio_locationradio location, either RadioLocal or RadioRemote.
reversereverse the byte ordering of the response saved in buf.
Returns:
the command response status.
the AT command response

Definition at line 28 of file AtCommands.cpp.

void send_byte_escaping_if ( uint8_t  data ) [protected, inherited]

send_byte_escaping_if - sends a byte, through the serial interface, to the radio, escaping the byte if the working mode of the radio is API2.

Parameters:
linePWM line being set
datathe byte that will be send to radio

Definition at line 531 of file XBee.cpp.

TxStatus send_data ( ApiFrame frame ) [protected, inherited]

Method used internaly by the derived classes to transmit data to remote nodes, waiting for the answer from the device.

Parameters:
frameframe that will be sent to the radio (have to be a proper transmit frame
Returns:
the result of the data transfer TxStatusSuccess if the operation was successful, the error code otherwise

Definition at line 788 of file XBee.cpp.

TxStatus send_data ( const RemoteXBee remote,
const uint8_t *const   data,
uint16_t  len,
bool  syncr = true 
) [virtual]

send_data - sends data to a remote device

Parameters:
remoteremote device
datapointer to the data that will be sent
lennumber of bytes that will be transmitted
syncrif true, method waits for the packet answer with the result of the operation
Returns:
the result of the data transfer TxStatusSuccess if the operation was successful, the error code otherwise

Implements XBee.

Definition at line 278 of file XBeeZB.cpp.

TxStatus send_data ( const RemoteXBee remote,
uint8_t  source_ep,
uint8_t  dest_ep,
uint16_t  cluster_id,
uint16_t  profile_id,
const uint8_t *const   data,
uint16_t  len,
bool  syncr = true 
)

send_data - sends data to a remote device.

This method uses the explicit addressing frame, allowing to use source and destination end points and cluster and profile IDs

Parameters:
remoteremote device
source_epsource end point
dest_epdestination end point
cluster_idcluster ID
profile_idprofile ID
datapointer to the data that will be sent
lennumber of bytes that will be transmitted
syncrif true, method waits for the packet answer with the result of the operation
Returns:
the result of the data transfer TxStatusSuccess if the operation was successful, the error code otherwise

Definition at line 298 of file XBeeZB.cpp.

TxStatus send_data_broadcast ( const uint8_t *const   data,
uint16_t  len,
bool  syncr = true 
) [inherited]

send_data_broadcast - sends data to all devices in the network, using the broadcast address.

Parameters:
datapointer to the data that will be sent
lennumber of bytes that will be transmitted
syncrif true, method waits for the packet answer with the result of the operation
Returns:
the result of the data transfer TxStatusSuccess if the operation was successful, the error code otherwise

Definition at line 813 of file XBee.cpp.

TxStatus send_data_to_coordinator ( const uint8_t *const   data,
uint16_t  len,
bool  syncr = true 
)

send_data_to_coordinator - sends data to the ZigBee coordinator

Parameters:
datapointer to the data that will be sent
lennumber of bytes that will be transmitted
syncrif true, method waits for the packet answer with the result of the operation
Returns:
the result of the data transfer TxStatusSuccess if the operation was successful, the error code otherwise

Definition at line 321 of file XBeeZB.cpp.

RadioStatus set_channel_mask ( uint16_t const  chmask )

set_channel_mask - sets the channel mask in which the module will scan for the PAN ID (if it is a router or end-device) or start the network (if it is a coordinator).

It should be set to the minimum available set of channels of all nodes in the network. Refer to "SC" parameter in the product manual for more information.

Parameters:
chmaskbit field list of channels to scan (router/end-devices) or to choose when starting a network (coordinator). Bit 0 is for channel 0x0B and bit 15 for channel 0x1A.
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 56 of file XBeeZB.cpp.

RadioStatus set_dio ( const RemoteXBee remote,
IoLine  line,
DioVal  val 
)

set_dio - sets to low/high a DIO line

Parameters:
remoteremote device
lineDIO line being set
valvalue that will be set in the DIO line
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 516 of file XBeeZB.cpp.

RadioStatus set_encryption_options ( const uint8_t  options )

set_encryption_options - Configure options for encryption.

Unused option bits should be set to 0. Options include:

  • XBEE_ZB_ENC_OPT_SEND_KEY_ON_JOIN - Send the security key unsecured over-the-air during joins
  • XBEE_ZB_ENC_OPT_USE_TRUST_CENTER - Use trust center (coordinator only)
    Parameters:
    optionsbit mask with the encryption options
    Returns:
    Success if the operation was successful, Failure otherwise

Definition at line 256 of file XBeeZB.cpp.

RadioStatus set_io_sample_rate ( const RemoteXBee remote,
float  seconds 
) [inherited]

set_io_sample_rate - configures how often the IO Samples should be sent to the destination (see send_io_sample_to).

Parameters:
remoteremote device that will be sending the IO Samples
secondsthe IO Sample sending rate in seconds (granularity is of 1 millisecond). Maximum is 65.535 seconds.
Returns:
the result of the data transfer Success if the operation was successful, Failure otherwise

Definition at line 347 of file RadioConfig.cpp.

RadioStatus set_network_encryption_key ( const uint8_t *const   key,
const uint16_t  length 
) [inherited]

set_network_encryption_key - Sets the 128-bit AES key used for encryption and decryption.

Setting it to 0 will cause the coordinator to transmit the network key in the clear to joining devices, and will cause joining devices to acquire the network key in the clear when joining. It is not recommended to set the key programmatically, because it could be read through the raw serial port bits.

Parameters:
keypointer to the 128-bit AES key
lengthsize of the buffer pointed by 'key'
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 122 of file RadioConfig.cpp.

RadioStatus set_network_security_key ( const uint8_t *const   key,
const uint16_t  length 
)

set_network_security_key - (Coordinator only) Set the 128-bit AES network encryption key.

If set to 0 (default), the module will select a random network key. It is not recommended to set the key programmatically, because it could be read through the raw serial port bits.

Parameters:
keypointer to the 128-bit AES key
lengthsize of the buffer pointed by 'key'
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 245 of file XBeeZB.cpp.

RadioStatus set_node_identifier ( const char *const   node_id ) [inherited]

set_node_identifier - configures the Node Identifier string

Parameters:
node_idNULL-terminated string with the Node Identifier that will be set on the module. Up to 20 characters length (21 with NULL-terminator).
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 77 of file RadioConfig.cpp.

RadioStatus set_panid ( uint64_t  panid )

set_panid - sets the 64bit extended PAN ID.

Note:
on ZigBee devices, if set to 0, the coordinator will select a random PAN ID and the routers will join any extended PAN ID
Parameters:
panidthe PAN ID value that will be set on the radio
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 83 of file XBeeZB.cpp.

RadioStatus set_panid ( const RemoteXBee remote,
uint64_t  panid 
)

set_panid - sets the 64bit extended PAN ID.

Note:
on ZigBee devices, if set to 0, the coordinator will select a random PAN ID and the routers will join any extended PAN ID
Parameters:
remoteremote device
panidthe PAN ID value that will be set on the radio
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 139 of file XBeeZB.cpp.

AtCmdFrame::AtCmdResp set_param ( const char *const   param,
uint32_t  data 
) [inherited]

set_param - sets a parameter in the local radio by sending an AT command and waiting for the response.

Parameters:
paramparameter to be set.
datathe parameter value (4 bytes) to be set.
Returns:
the command response status.

Definition at line 128 of file AtCommands.cpp.

AtCmdFrame::AtCmdResp set_param ( const RemoteXBee remote,
const char *const   param,
const uint8_t *  data = NULL,
uint16_t  len = 0 
) [virtual]

set_param - sets a parameter in a remote radio by sending an AT command and waiting for the response.

Parameters:
remoteremote device
paramparameter to be set.
datathe parameter value byte array (len bytes) to be set.
lennumber of bytes of the parameter value.
Returns:
the command response status.

Implements XBee.

Definition at line 444 of file XBeeZB.cpp.

AtCmdFrame::AtCmdResp set_param ( const RemoteXBee remote,
const char *const   param,
uint32_t  data 
) [virtual]

set_param - sets a parameter in a remote radio by sending an AT command and waiting for the response.

Parameters:
remoteremote device
paramparameter to be set.
datathe parameter value (4 bytes) to be set.
Returns:
the command response status.

Implements XBee.

Definition at line 431 of file XBeeZB.cpp.

AtCmdFrame::AtCmdResp set_param ( const char *const   param,
const uint8_t *  data = NULL,
uint16_t  len = 0 
) [inherited]

set_param - sets a parameter in the local radio by sending an AT command and waiting for the response.

Parameters:
paramparameter to be set.
datathe parameter value byte array (len bytes) to be set.
lennumber of bytes of the parameter value.
Returns:
the command response status.

Definition at line 134 of file AtCommands.cpp.

RadioStatus set_pin_config ( const RemoteXBee remote,
IoLine  line,
IoMode  mode 
)

set_pin_config - configures a radio IO line

Parameters:
remoteremote device
lineIO line being configured
modeconfiguration mode for the selected line
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 483 of file XBeeZB.cpp.

RadioStatus set_pin_pull_up ( const RemoteXBee remote,
IoLine  line,
bool  enable 
)

set_pin_pull_up - enables or disables the internal pull-up resistor of a line

Parameters:
remoteremote device
lineline being configured for pull-up
enablewhether to enable the internal pull-up resistor.
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 575 of file XBeeZB.cpp.

RadioStatus set_power_level ( uint8_t  level ) [inherited]

set_power_level - sets the power level at which the radio will transmit

Parameters:
levelpower level at which the radio will transmit
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 29 of file RadioConfig.cpp.

void set_timeout ( uint16_t  timeout_ms ) [inherited]

set_timeout - sets the timeout in ms, used by sync methods

Parameters:
timeout_msnew timeout in ms

Definition at line 486 of file XBee.cpp.

void set_tx_options ( uint8_t  options ) [inherited]

set_tx_options - sets the transmit options byte, used with the transmit frames.

Valid flags are:

  • DISABLE_RETRIES_AND_ROUTE_REPAIR
  • ENABLE_APS_ENCRYPTION
  • USE_EXTENDED_TX_TIMEOUT
Parameters:
optionsvariable with the option flags

Definition at line 143 of file RadioConfig.cpp.

RadioStatus software_reset ( void   ) [inherited]

software_reset - performs a firmware reset

Returns:
Success if the operation was successful, Failure otherwise

Definition at line 61 of file RadioConfig.cpp.

RadioStatus start_node_discovery (  ) [inherited]

start_node_discovery - starts a node discovery operation.

The responses have to be processes on the callback function that have to be registered for that purpose.

Returns:
Success if the operation was successful, Failure otherwise

Definition at line 153 of file RadioConfig.cpp.

void uart_read_cb ( void   ) [protected, inherited]

uart_read_cb - serial interface callback, called when data is received on the serial port.

Callback function called when data is received on the serial port.

The function parses the incoming data and, when a good frame is detected, saves it in the frame list

Definition at line 241 of file XBee.cpp.

RadioStatus unregister_frame_handler ( FrameHandler *const   handler ) [protected, inherited]

unregister_frame_handler - removes a previously registered frame handler

Parameters:
handlerpointer to the frame handler object
Returns:
the result of the unregister operation Success if the operation was successful, Failure otherwise

Definition at line 600 of file XBee.cpp.

void unregister_io_sample_cb (  )

unregister_io_sample_cb - removes the IO Sample Data reception callback

Definition at line 400 of file XBeeZB.cpp.

void unregister_modem_status_cb ( void   ) [inherited]

unregister_modem_status_cb - removes the Modem Status reception callback

Definition at line 860 of file XBee.cpp.

void unregister_node_discovery_cb (  )

unregister_node_discovery_cb - removes the node discovery callback

Definition at line 362 of file XBeeZB.cpp.

void unregister_receive_cb ( void   )

unregister_receive_cb - removes the rx packet callback

Definition at line 381 of file XBeeZB.cpp.

RadioStatus write_config ( void   ) [inherited]

write_config - write settings to non volatile memory

Returns:
Success if the operation was successful, Failure otherwise

Definition at line 18 of file RadioConfig.cpp.


Field Documentation

uint64_t _dev_addr64 [protected, inherited]

Device 64 bit address (SH, SL)

Definition at line 667 of file XBee.h.

FrameHandler* _fhandlers[MAX_FRAME_HANDLERS] [protected, inherited]

Array of frame handler pointers.

We use an array instead of a vector or other data structure to save memory and avoid dynamic memory allocation, to avoid memory fragmentation

Definition at line 681 of file XBee.h.

FrameBuffer _framebuf_app [static, protected, inherited]

buffer to store the received frames

Definition at line 123 of file XBee.h.

uint16_t _fw_version [protected, inherited]

Firmware version value of the radio.

Definition at line 661 of file XBee.h.

volatile uint16_t _hw_reset_cnt [protected, inherited]

Hardware reset counter, automatically updated by the library.

Definition at line 684 of file XBee.h.

uint16_t _hw_version [protected, inherited]

Hardware version value of the radio.

Definition at line 658 of file XBee.h.

bool _initializing [protected, inherited]

Library is initializing.

Definition at line 697 of file XBee.h.

FH_IoDataSampeZB* _io_data_handler [protected]

Frame handler used for the IO Data Sample packets.

Automatically registered when a callback function is registered

Definition at line 449 of file XBeeZB.h.

RadioMode _mode [protected, inherited]

Operating mode of the module (API1, API2,...)

Definition at line 655 of file XBee.h.

AtCmdFrame::ModemStatus _modem_status [protected, inherited]

Latest modem status received.

Definition at line 694 of file XBee.h.

FH_ModemStatus* _modem_status_handler [protected, inherited]

Frame handler used for the Modem Status packets.

Automatically registered when a callback function is registered

Definition at line 691 of file XBee.h.

FH_NodeDiscoveryZB* _nd_handler [protected]

Frame handler used for the node discovery.

Registered when a callback function is registered

Definition at line 441 of file XBeeZB.h.

int _nd_timeout [protected, inherited]

node discovery timeout

Definition at line 703 of file XBee.h.

Timer _nd_timer [protected, inherited]

Timer used for node discovery.

Definition at line 700 of file XBee.h.

uint8_t _node_by_ni_frame_id [protected, inherited]

If a _get_remote_node_by_id() is in progress, this keeps the expected frame id.

Definition at line 706 of file XBee.h.

DigitalOut* _reset [protected, inherited]

IO connected to the radio reset line.

Definition at line 673 of file XBee.h.

FH_RxPacketZB* _rx_pkt_handler [protected]

Frame handler used for the rx packets.

Automatically registered when a callback function is registered

Definition at line 445 of file XBeeZB.h.

SerialBase::Flow _serial_flow_type [protected, inherited]

serial hardware flow control selected by the user (RTSCTS, RTS,CTS)

Definition at line 652 of file XBee.h.

uint16_t _timeout_ms [protected, inherited]

Timeout in ms for sync operations (when we wait for a response)

Definition at line 664 of file XBee.h.

uint8_t _tx_options [protected, inherited]

Transmit options byte.

Definition at line 676 of file XBee.h.

RawSerial* _uart [protected, inherited]

Serial Interface, use RawSerial as we dont use the streams.

Definition at line 670 of file XBee.h.

volatile uint16_t _wd_reset_cnt [protected, inherited]

Watchdog reset counter, automatically updated by the library.

Definition at line 687 of file XBee.h.