Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::Xbee Namespace Reference

Classes

struct  APIFrame
 
struct  APIFrameLog
 
class  APIFrameParser
 Parses a byte sequence into an Xbee APIFrame. More...
 
struct  ATCommandFrame
 
struct  ATCommandFrameLog
 
struct  ATCommandResponseFrame
 
struct  ATCommandResponseFrameLog
 
struct  ModemStatusFrame
 
struct  ModemStatusFrameLog
 
struct  RXPacketFrame
 
struct  RXPacketFrameLog
 
struct  TXRequestFrame
 
struct  TXRequestFrameLog
 
struct  TXStatusFrame
 
struct  TXStatusFrameLog
 
class  Xbee
 
struct  XbeeStatus
 

Typedefs

using ParseResult = APIFrameParser::ParseResult
 

Enumerations

enum  FrameType : uint8_t {
  FTYPE_AT_COMMAND = 0x08 , FTYPE_AT_COMMAND_QUEUE = 0x09 , FTYPE_TX_REQUEST = 0x10 , FTYPE_AT_COMMAND_RESPONSE = 0x88 ,
  FTYPE_MODEM_STATUS = 0x8A , FTYPE_TX_STATUS = 0x8B , FTYPE_RX_PACKET_FRAME = 0x90
}
 
enum  TransmitOptionsBitfield : uint8_t {
  TO_DISABLE_ACK = 0x01 , TO_DISABLE_RD = 0x02 , TO_NACK = 0x04 , TO_TRACE_ROUTE = 0x08 ,
  TO_DM_POINT_MULTIPOINT = 0x40 , TO_DM_REPEATER_MODE = 0x80 , TO_DM_DIGIMESH = 0xC0
}
 
enum  CommandStatusBitfield : uint8_t {
  CS_OK = 0x00 , CS_ERROR = 0x01 , CS_INVALID_COMMAND = 0x02 , CS_INVALID_PARAMETER = 0x03 ,
  CS_RSSI_INVALID = 0x40 , CS_IS_REMOTE_COMMAND = 0x80
}
 
enum  ModemStatus : uint8_t { MS_HARDWARE_RESET = 0x00 , MS_WATCHDOG_TIMER_RESET = 0x01 , MS_NETWORK_WOKE_UP = 0x0B , MS_NETWORK_WENT_SLEEP = 0x0C }
 
enum  DeliveryStatus : uint8_t {
  DELS_SUCCESS = 0x00 , DELS_MAC_ACK_FAILURE = 0x01 , DELS_COLL_AVOID_FAILURE = 0x02 , DELS_NO_SPECTRUM_AVAILABLE = 0x03 ,
  DELS_NET_ACK_FAILURE = 0x21 , DELS_ROUTE_NOT_FOUND = 0x25 , DELS_INT_RESOURCE_ERR = 0x31 , DELS_INTERNAL_ERROR = 0x32 ,
  DELS_PAYLOAD_TOO_LARGE = 0x74 , DELS_INDIRECT_MSG_REQ = 0x75
}
 
enum  DiscoveryStatus : uint8_t { DISCS_NO_DISC_OVERHEAD = 0x00 , DISCS_ROUTE_DISCOVERY = 0x02 }
 
enum  ReceiveOptions : uint8_t {
  RO_PACKET_ACK = 0x00 , RO_PACKET_IS_BROADCAST = 0x01 , RO_POINT_MULTIPOINT = 0x40 , RO_REPEATER_MODE = 0x80 ,
  RO_DIGIMESH = 0xC0
}
 

Functions

bool setChannelMask (Xbee &xbee, uint32_t mask, unsigned int timeout=1000)
 Enables or disable the specified channels. Channel 9 and 24 are always disabled due to regulatory limitations. See datasheet for the list of channel frequencies.
 
bool setChannelMask (Xbee &xbee, bool channels[30], unsigned int timeout=1000)
 Enables or disable the specified channels. Channel 9 and 24 are always disabled due to regulatory limitations. See datasheet for the list of channel frequencies.
 
bool enableAllChannels (Xbee &xbee, unsigned int timeout=1000)
 Enable communication on all available channels. Equivalent to calling setChannelMask(xbee, 0x3EFFFDFF).
 
bool disableFrequencyHopping (Xbee &xbee, unsigned int timeout=1000)
 Disables frequency hopping by allowing communication only on channel #29. Equivalent to calling setChannelMask(xbee, 0x20000000).
 
bool setDataRate (Xbee &xbee, bool dataRate80kbps, unsigned int timeout=1000)
 Configures the desired xbee data rate.
 
bool writeToMemory (Xbee &xbee, unsigned int timeout=1000)
 Writes parameter values to non-volatile memory so that parameter modifications persist through subsequent resets.
 
bool energyDetect (Xbee &xbee, int *energyDetectData, uint8_t duration, unsigned int timeout=1000)
 Performs an energy detect scan on all channels.
 

Detailed Description

Classes used if you want to log an APIFrame, but do not want to log the base APIFrame class, which is quite heavy on memory

Typedef Documentation

◆ ParseResult

Enumeration Type Documentation

◆ CommandStatusBitfield

Enumerator
CS_OK 
CS_ERROR 
CS_INVALID_COMMAND 
CS_INVALID_PARAMETER 
CS_RSSI_INVALID 
CS_IS_REMOTE_COMMAND 

Definition at line 90 of file APIFrames.h.

◆ DeliveryStatus

Enumerator
DELS_SUCCESS 
DELS_MAC_ACK_FAILURE 
DELS_COLL_AVOID_FAILURE 
DELS_NO_SPECTRUM_AVAILABLE 
DELS_NET_ACK_FAILURE 
DELS_ROUTE_NOT_FOUND 
DELS_INT_RESOURCE_ERR 
DELS_INTERNAL_ERROR 
DELS_PAYLOAD_TOO_LARGE 
DELS_INDIRECT_MSG_REQ 

Definition at line 108 of file APIFrames.h.

◆ DiscoveryStatus

Enumerator
DISCS_NO_DISC_OVERHEAD 
DISCS_ROUTE_DISCOVERY 

Definition at line 122 of file APIFrames.h.

◆ FrameType

Enumerator
FTYPE_AT_COMMAND 
FTYPE_AT_COMMAND_QUEUE 
FTYPE_TX_REQUEST 
FTYPE_AT_COMMAND_RESPONSE 
FTYPE_MODEM_STATUS 
FTYPE_TX_STATUS 
FTYPE_RX_PACKET_FRAME 

Definition at line 67 of file APIFrames.h.

◆ ModemStatus

Enumerator
MS_HARDWARE_RESET 
MS_WATCHDOG_TIMER_RESET 
MS_NETWORK_WOKE_UP 
MS_NETWORK_WENT_SLEEP 

Definition at line 100 of file APIFrames.h.

◆ ReceiveOptions

Enumerator
RO_PACKET_ACK 
RO_PACKET_IS_BROADCAST 
RO_POINT_MULTIPOINT 
RO_REPEATER_MODE 
RO_DIGIMESH 

Definition at line 128 of file APIFrames.h.

◆ TransmitOptionsBitfield

Enumerator
TO_DISABLE_ACK 
TO_DISABLE_RD 
TO_NACK 
TO_TRACE_ROUTE 
TO_DM_POINT_MULTIPOINT 
TO_DM_REPEATER_MODE 
TO_DM_DIGIMESH 

Definition at line 78 of file APIFrames.h.

Function Documentation

◆ disableFrequencyHopping()

bool Boardcore::Xbee::disableFrequencyHopping ( Xbee & xbee,
unsigned int timeout = 1000 )
inline

Disables frequency hopping by allowing communication only on channel #29. Equivalent to calling setChannelMask(xbee, 0x20000000).

Parameters
xbeeReference to an xbee object

Definition at line 93 of file ATCommands.h.

◆ enableAllChannels()

bool Boardcore::Xbee::enableAllChannels ( Xbee & xbee,
unsigned int timeout = 1000 )
inline

Enable communication on all available channels. Equivalent to calling setChannelMask(xbee, 0x3EFFFDFF).

Parameters
xbeeReference to an xbee object
Returns
True if the command was executed successfully

Definition at line 82 of file ATCommands.h.

◆ energyDetect()

bool Boardcore::Xbee::energyDetect ( Xbee & xbee,
int * energyDetectData,
uint8_t duration,
unsigned int timeout = 1000 )
inline

Performs an energy detect scan on all channels.

Parameters
xbeeReference to an xbee object
energyDetectDataPointer to a 30-bytes buffer where energy levels will be stored. Energy levels are in -dBm units.
durationScan duration in ms
Returns
True if the command was executed successfully and data stored in energyDetectData is valid

Definition at line 137 of file ATCommands.h.

◆ setChannelMask() [1/2]

bool Boardcore::Xbee::setChannelMask ( Xbee & xbee,
bool channels[30],
unsigned int timeout = 1000 )
inline

Enables or disable the specified channels. Channel 9 and 24 are always disabled due to regulatory limitations. See datasheet for the list of channel frequencies.

Parameters
xbeeReference to an xbee object
channelschannel mask array
Returns
True if the command was executed successfully

Definition at line 64 of file ATCommands.h.

◆ setChannelMask() [2/2]

bool Boardcore::Xbee::setChannelMask ( Xbee & xbee,
uint32_t mask,
unsigned int timeout = 1000 )
inline

Enables or disable the specified channels. Channel 9 and 24 are always disabled due to regulatory limitations. See datasheet for the list of channel frequencies.

Parameters
xbeeReference to an xbee object
channelschannel mask
Returns
True if the command was executed successfully

Definition at line 43 of file ATCommands.h.

◆ setDataRate()

bool Boardcore::Xbee::setDataRate ( Xbee & xbee,
bool dataRate80kbps,
unsigned int timeout = 1000 )
inline

Configures the desired xbee data rate.

Parameters
xbeeReference to an xbee object
dataRate80kbpstrue for 80kbps, false for 10kbps
Returns
True if the command was executed successfully

Definition at line 105 of file ATCommands.h.

◆ writeToMemory()

bool Boardcore::Xbee::writeToMemory ( Xbee & xbee,
unsigned int timeout = 1000 )
inline

Writes parameter values to non-volatile memory so that parameter modifications persist through subsequent resets.

Parameters
xbeeReference to an xbee object
Returns
True if the command was executed successfully

Definition at line 121 of file ATCommands.h.