[XBee] Added Doxygen comments
This commit is contained in:
parent
4a67bb59c7
commit
1fddac14e5
1 changed files with 117 additions and 13 deletions
|
@ -31,17 +31,54 @@
|
|||
#define XBEE_API_FRAME_ROUTE_RECORD 0xA1
|
||||
#define XBEE_API_FRAME_MANY_TO_ONE_ROUTE_REQUEST 0xA3
|
||||
|
||||
/*!
|
||||
\class XBeeSerial
|
||||
|
||||
\brief %XBee Serial interface. This class is used for XBees in transparent mode, i.e. when two XBees act as a "wireless UART".
|
||||
*/
|
||||
class XBeeSerial: public ISerial {
|
||||
public:
|
||||
// constructor
|
||||
/*!
|
||||
\brief Default constructor.
|
||||
|
||||
\param mod Instance of Module that will be used to communicate with the radio.
|
||||
*/
|
||||
XBeeSerial(Module* mod);
|
||||
|
||||
// basic methods
|
||||
|
||||
/*!
|
||||
\brief Initialization method.
|
||||
|
||||
\param speed Baud rate to use for UART interface.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(long speed);
|
||||
|
||||
/*!
|
||||
\brief Resets module using interrupt/GPIO pin 1.
|
||||
*/
|
||||
void reset();
|
||||
|
||||
// configuration methods
|
||||
|
||||
/*!
|
||||
\brief Sets destination XBee address.
|
||||
|
||||
\param destinationAddressHigh Higher 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
|
||||
|
||||
\param destinationAddressLow Lower 4 bytes of the destination XBee module, in the form of uppercase hexadecimal string (i.e. 8 characters).
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setDestinationAddress(const char* destinationAddressHigh, const char* destinationAddressLow);
|
||||
|
||||
/*!
|
||||
\brief Sets PAN (Personal Area Network) ID. Both XBees must be in the same PAN in order to use transparent mode.
|
||||
|
||||
\param panId 8-byte PAN ID to be used, in the form of uppercase hexadecimal string (i.e. 16 characters).
|
||||
*/
|
||||
int16_t setPanId(const char* panID);
|
||||
|
||||
private:
|
||||
|
@ -49,21 +86,88 @@ class XBeeSerial: public ISerial {
|
|||
|
||||
};
|
||||
|
||||
/*!
|
||||
\class XBee
|
||||
|
||||
\brief Control class for %XBee modules.
|
||||
*/
|
||||
class XBee {
|
||||
public:
|
||||
// constructor
|
||||
/*!
|
||||
\brief Default constructor.
|
||||
|
||||
\param mod Instance of Module that will be used to communicate with the radio.
|
||||
*/
|
||||
XBee(Module* mod);
|
||||
|
||||
// basic methods
|
||||
|
||||
/*!
|
||||
\brief Initialization method.
|
||||
|
||||
\param speed Baud rate to use for UART interface.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(long speed);
|
||||
|
||||
/*!
|
||||
\brief Resets module using interrupt/GPIO pin 1.
|
||||
*/
|
||||
void reset();
|
||||
|
||||
/*!
|
||||
\brief Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is unknown.
|
||||
|
||||
\param dest Destination 64-bit address, in the form of 8-byte array.
|
||||
|
||||
\param payload String of payload bytes.
|
||||
|
||||
\param radius Number of maximum "hops" for a broadcast transmission. Defaults to 1, set to 0 for unlimited number of hops.
|
||||
*/
|
||||
int16_t transmit(uint8_t* dest, const char* payload, uint8_t radius = 1);
|
||||
|
||||
/*!
|
||||
\brief Sends data to the destination 64-bit (global) address, when destination 16-bit (local) address is known.
|
||||
|
||||
\param dest Destination 64-bit address, in the form of 8-byte array.
|
||||
|
||||
\param destNetwork Destination 16-bit address, in the form of 2-byte array.
|
||||
|
||||
\param payload String of payload bytes.
|
||||
|
||||
\param radius Number of maximum "hops" for a broadcast transmission. Defaults to 1, set to 0 for unlimited number of hops.
|
||||
*/
|
||||
int16_t transmit(uint8_t* dest, uint8_t* destNetwork, const char* payload, uint8_t radius = 1);
|
||||
|
||||
/*!
|
||||
\brief Gets the number of payload bytes received.
|
||||
|
||||
\returns Number of available payload bytes, or 0 if nothing was received.
|
||||
*/
|
||||
size_t available();
|
||||
|
||||
/*!
|
||||
\brief Gets packet source 64-bit address.
|
||||
|
||||
\returns Packet source address, in the form of uppercase hexadecimal Arduino String (i.e. 16 characters).
|
||||
*/
|
||||
String getPacketSource();
|
||||
|
||||
/*!
|
||||
\brief Gets packet payload.
|
||||
|
||||
\returns Packet payload, in the form of Arduino String.
|
||||
*/
|
||||
String getPacketData();
|
||||
|
||||
// configuration methods
|
||||
|
||||
/*!
|
||||
\brief Sets PAN (Personal Area Network) ID. All XBees must be in the same PAN in order to communicate.
|
||||
|
||||
\param panId 8-byte PAN ID to be used, in the form of uppercase hexadecimal string (i.e. 16 characters).
|
||||
*/
|
||||
int16_t setPanId(uint8_t* panID);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue