RadioLib
Universal wireless communication library for Arduino
XBeeSerial Class Reference

XBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a "wireless UART". More...

#include <XBee.h>

Inheritance diagram for XBeeSerial:
ISerial

Public Member Functions

 XBeeSerial (Module *mod)
 Default constructor. More...
 
int16_t begin (long speed)
 Initialization method. More...
 
void reset ()
 Resets module using interrupt/GPIO pin 1.
 
int16_t setDestinationAddress (const char *destinationAddressHigh, const char *destinationAddressLow)
 Sets destination XBee address. More...
 
int16_t setPanId (const char *panId)
 Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent mode. More...
 
- Public Member Functions inherited from ISerial
 ISerial (Module *mod)
 
void begin (long)
 
void end ()
 
int peek ()
 
size_t write (uint8_t)
 
int read ()
 
int available ()
 
void flush ()
 
size_t print (const __FlashStringHelper *)
 
size_t print (const String &)
 
size_t print (const char[])
 
size_t print (char)
 
size_t print (unsigned char, int=DEC)
 
size_t print (int, int=DEC)
 
size_t print (unsigned int, int=DEC)
 
size_t print (long, int=DEC)
 
size_t print (unsigned long, int=DEC)
 
size_t print (double, int=2)
 
size_t print (const Printable &)
 
size_t println (const __FlashStringHelper *)
 
size_t println (const String &s)
 
size_t println (const char[])
 
size_t println (char)
 
size_t println (unsigned char, int=DEC)
 
size_t println (int, int=DEC)
 
size_t println (unsigned int, int=DEC)
 
size_t println (long, int=DEC)
 
size_t println (unsigned long, int=DEC)
 
size_t println (double, int=2)
 
size_t println (const Printable &)
 
size_t println (void)
 

Detailed Description

XBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a "wireless UART".

Constructor & Destructor Documentation

◆ XBeeSerial()

XBeeSerial::XBeeSerial ( Module mod)

Default constructor.

Parameters
modInstance of Module that will be used to communicate with the radio.

Member Function Documentation

◆ begin()

int16_t XBeeSerial::begin ( long  speed)

Initialization method.

Parameters
speedBaud rate to use for UART interface.
Returns
Status Codes

◆ setDestinationAddress()

int16_t XBeeSerial::setDestinationAddress ( const char *  destinationAddressHigh,
const char *  destinationAddressLow 
)

Sets destination XBee address.

Parameters
destinationAddressHighHigher 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
destinationAddressLowLower 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
Returns
Status Codes

◆ setPanId()

int16_t XBeeSerial::setPanId ( const char *  panId)

Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent mode.

Parameters
panId8-byte PAN ID to be used, in the form of uppercase hexadecimal string (i.e. 16 characters).

The documentation for this class was generated from the following files: