BayEOS-Arduino  1.8.0_0.0.4
Public Member Functions | Protected Attributes | List of all members
XBeeResponse Class Reference

#include <XBee.h>

Inheritance diagram for XBeeResponse:
FrameIdResponse ModemStatusResponse RxDataResponse AtCommandResponse TxStatusResponse ZBTxStatusResponse RxResponse ZBRxResponse RemoteAtCommandResponse Rx16Response Rx64Response RxIoSampleBaseResponse ZBRxIoSampleResponse Rx16IoSampleResponse Rx64IoSampleResponse

Public Member Functions

 XBeeResponse ()
 
uint8_t getApiId ()
 
void setApiId (uint8_t apiId)
 
uint8_t getMsbLength ()
 
void setMsbLength (uint8_t msbLength)
 
uint8_t getLsbLength ()
 
void setLsbLength (uint8_t lsbLength)
 
uint8_t getChecksum ()
 
void setChecksum (uint8_t checksum)
 
uint8_t getFrameDataLength ()
 
void setFrameData (uint8_t *frameDataPtr)
 
uint8_t * getFrameData ()
 
void setFrameLength (uint8_t frameLength)
 
uint16_t getPacketLength ()
 
void reset ()
 
void init ()
 
void getZBTxStatusResponse (XBeeResponse &response)
 
void getZBRxResponse (XBeeResponse &response)
 
void getZBRxIoSampleResponse (XBeeResponse &response)
 
void getTxStatusResponse (XBeeResponse &response)
 
void getRx16Response (XBeeResponse &response)
 
void getRx64Response (XBeeResponse &response)
 
void getRx16IoSampleResponse (XBeeResponse &response)
 
void getRx64IoSampleResponse (XBeeResponse &response)
 
void getAtCommandResponse (XBeeResponse &responses)
 
void getRemoteAtCommandResponse (XBeeResponse &response)
 
void getModemStatusResponse (XBeeResponse &response)
 
bool isAvailable ()
 
void setAvailable (bool complete)
 
bool isError ()
 
uint8_t getErrorCode ()
 
void setErrorCode (uint8_t errorCode)
 

Protected Attributes

uint8_t * _frameDataPtr
 

Detailed Description

The super class of all XBee responses (RX packets) Users should never attempt to create an instance of this class; instead create an instance of a subclass It is recommend to reuse subclasses to conserve memory

Definition at line 154 of file XBee.h.

Constructor & Destructor Documentation

◆ XBeeResponse()

XBeeResponse::XBeeResponse ( )

Default constructor

Copyright (c) 2009 Andrew Rapp. All rights reserved.

Modified (c) 2016 Stefan Holzheu

This file is part of XBee-Arduino.

XBee-Arduino is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

XBee-Arduino is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with XBee-Arduino. If not, see http://www.gnu.org/licenses/.

Definition at line 32 of file XBee.cpp.

Member Function Documentation

◆ getApiId()

uint8_t XBeeResponse::getApiId ( )

Returns Api Id of the response

Definition at line 36 of file XBee.cpp.

◆ getAtCommandResponse()

void XBeeResponse::getAtCommandResponse ( XBeeResponse responses)

Call with instance of AtCommandResponse only if getApiId() == AT_COMMAND_RESPONSE

Definition at line 714 of file XBee.cpp.

◆ getChecksum()

uint8_t XBeeResponse::getChecksum ( )

Returns the packet checksum

Definition at line 60 of file XBee.cpp.

◆ getErrorCode()

uint8_t XBeeResponse::getErrorCode ( )

Returns an error code, or zero, if successful. Error codes include: CHECKSUM_FAILURE, PACKET_EXCEEDS_BYTE_ARRAY_LENGTH, UNEXPECTED_START_BYTE

Definition at line 88 of file XBee.cpp.

◆ getFrameData()

uint8_t * XBeeResponse::getFrameData ( )

Returns the buffer that contains the response. Starts with byte that follows API ID and includes all bytes prior to the checksum Length is specified by getFrameDataLength() Note: Unlike Digi's definition of the frame data, this does not start with the API ID.. The reason for this is all responses include an API ID, whereas my frame data includes only the API specific data.

Definition at line 727 of file XBee.cpp.

◆ getFrameDataLength()

uint8_t XBeeResponse::getFrameDataLength ( )

Returns the length of the frame data: all bytes after the api id, and prior to the checksum Note up to release 0.1.2, this was incorrectly including the checksum in the length.

Definition at line 68 of file XBee.cpp.

◆ getLsbLength()

uint8_t XBeeResponse::getLsbLength ( )

Returns the LSB length of the packet

Definition at line 52 of file XBee.cpp.

◆ getModemStatusResponse()

void XBeeResponse::getModemStatusResponse ( XBeeResponse response)

Call with instance of ModemStatusResponse only if getApiId() == MODEM_STATUS_RESPONSE

Definition at line 675 of file XBee.cpp.

◆ getMsbLength()

uint8_t XBeeResponse::getMsbLength ( )

Returns the MSB length of the packet

Definition at line 44 of file XBee.cpp.

◆ getPacketLength()

uint16_t XBeeResponse::getPacketLength ( void  )

Returns the length of the packet

Definition at line 723 of file XBee.cpp.

◆ getRemoteAtCommandResponse()

void XBeeResponse::getRemoteAtCommandResponse ( XBeeResponse response)

Call with instance of RemoteAtCommandResponse only if getApiId() == REMOTE_AT_COMMAND_RESPONSE

Definition at line 632 of file XBee.cpp.

◆ getRx16IoSampleResponse()

void XBeeResponse::getRx16IoSampleResponse ( XBeeResponse response)

Call with instance of Rx16IoSampleResponse only if getApiId() == RX_16_IO_RESPONSE

Definition at line 486 of file XBee.cpp.

◆ getRx16Response()

void XBeeResponse::getRx16Response ( XBeeResponse response)

Call with instance of Rx16Response only if getApiId() == RX_16_RESPONSE

Definition at line 565 of file XBee.cpp.

◆ getRx64IoSampleResponse()

void XBeeResponse::getRx64IoSampleResponse ( XBeeResponse response)

Call with instance of Rx64IoSampleResponse only if getApiId() == RX_64_IO_RESPONSE

Definition at line 506 of file XBee.cpp.

◆ getRx64Response()

void XBeeResponse::getRx64Response ( XBeeResponse response)

Call with instance of Rx64Response only if getApiId() == RX_64_RESPONSE

Definition at line 580 of file XBee.cpp.

◆ getTxStatusResponse()

void XBeeResponse::getTxStatusResponse ( XBeeResponse response)

Call with instance of TxStatusResponse only if getApiId() == TX_STATUS_RESPONSE

Definition at line 528 of file XBee.cpp.

◆ getZBRxIoSampleResponse()

void XBeeResponse::getZBRxIoSampleResponse ( XBeeResponse response)

Call with instance of ZBRxIoSampleResponse class only if getApiId() == ZB_IO_SAMPLE_RESPONSE to populate response

Definition at line 257 of file XBee.cpp.

◆ getZBRxResponse()

void XBeeResponse::getZBRxResponse ( XBeeResponse response)

Call with instance of ZBRxResponse class only if getApiId() == ZB_RX_RESPONSE to populate response

Definition at line 167 of file XBee.cpp.

◆ getZBTxStatusResponse()

void XBeeResponse::getZBTxStatusResponse ( XBeeResponse response)

Call with instance of ZBTxStatusResponse class only if getApiId() == ZB_TX_STATUS_RESPONSE to populate response

Definition at line 133 of file XBee.cpp.

◆ init()

void XBeeResponse::init ( void  )

Initializes the response

Definition at line 735 of file XBee.cpp.

◆ isAvailable()

bool XBeeResponse::isAvailable ( )

Returns true if the response has been successfully parsed and is complete and ready for use

Definition at line 76 of file XBee.cpp.

◆ isError()

bool XBeeResponse::isError ( )

Returns true if the response contains errors

Definition at line 84 of file XBee.cpp.

◆ reset()

void XBeeResponse::reset ( void  )

Resets the response to default values

Definition at line 741 of file XBee.cpp.


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