BayEOSArduino Library
Public Member Functions | List of all members
BayXBeeInterface Class Referenceabstract
Inheritance diagram for BayXBeeInterface:
Inheritance graph
[legend]
Collaboration diagram for BayXBeeInterface:
Collaboration graph
[legend]

Public Member Functions

 BayXBeeInterface (uint8_t sleep_pin=0, uint8_t wakeup_time=15, int wait_time_for_response=5000, uint16_t dest=BAYXBEE_GATEWAY)
 
uint8_t sendPayload (void)
 
int available (void)
 
uint8_t readIntoPayload (int timeout=5000)
 
void begin (long baud)
 
virtual void i_begin (long baud)=0
 
- Public Member Functions inherited from XBeeInterface
void readPacket ()
 
bool readPacket (int timeout)
 
void readPacketUntilAvailable ()
 
void getResponse (XBeeResponse &response)
 
XBeeResponsegetResponse ()
 
void send (XBeeRequest &request)
 
uint16_t getPANID (void)
 
uint8_t parseRX16 (BayEOS &client, int rx_panid)
 
uint8_t getNextFrameId ()
 
virtual int i_available ()=0
 
virtual int read ()=0
 
virtual void flush ()=0
 
virtual size_t write (uint8_t val)=0
 
- Public Member Functions inherited from BayEOS
 BayEOS (void)
 
uint8_t sendError (const char *s)
 
uint8_t sendMessage (const char *s)
 
uint8_t createMessage (const char *s, uint8_t checksum=0, uint8_t frametype=BayEOS_Message)
 
uint8_t createActionResponse (uint8_t key, uint8_t status)
 
void startFrame (void)
 
void startFrame (uint8_t type)
 
void startOriginFrame (const char *o, uint8_t routed=0)
 
void startDataFrame (uint8_t subtype=BayEOS_Float32le, uint8_t checksum=0)
 
void startDataFrameWithOrigin (uint8_t subtype, const char *o, uint8_t checksum=0, uint8_t routed=0)
 
uint8_t addChannelValue (float v, uint8_t channel_number=0)
 
uint8_t addChannelValue (double v, uint8_t channel_number=0)
 
uint8_t addChannelValue (long v, uint8_t channel_number=0)
 
uint8_t addChannelValue (unsigned long v, uint8_t channel_number=0)
 
uint8_t addChannelValue (int v, uint8_t channel_number=0)
 
uint8_t addChannelValue (unsigned int v, uint8_t channel_number=0)
 
uint8_t addChannelValue (int8_t v, uint8_t channel_number=0)
 
uint8_t addChannelValue (uint8_t v, uint8_t channel_number=0)
 
uint8_t addChannelValue (float v, const char *channel_label)
 
uint8_t addChannelValue (double v, const char *channel_label)
 
uint8_t addChannelValue (long v, const char *channel_label)
 
uint8_t addChannelValue (unsigned long v, const char *channel_label)
 
uint8_t addChannelValue (int v, const char *channel_label)
 
uint8_t addChannelValue (unsigned int v, const char *channel_label)
 
uint8_t addChannelValue (int8_t v, const char *channel_label)
 
uint8_t addChannelValue (uint8_t v, const char *channel_label)
 
uint8_t addChecksum (void)
 
uint8_t validateChecksum (void)
 
void startRoutedFrame (uint16_t sourceMyID, uint16_t sourcePANID, uint8_t rssi=0)
 
void startDelayedFrame (unsigned long delay)
 
void startDelayedSecondFrame (unsigned long delay)
 
void startRF24Frame (uint8_t pipe)
 
void startTimestampFrame (unsigned long timestamp)
 
void startCommand (uint8_t cmd_api)
 
void startCommandResponse (uint8_t cmd_api)
 
uint8_t addToPayload (uint8_t b)
 
uint8_t addToPayload (const void *p, uint8_t length)
 
uint8_t addToPayload (const uint8_t *c)
 
uint8_t addToPayload (const char *s)
 
uint8_t addToPayload (float f)
 
uint8_t addToPayload (unsigned long l)
 
uint8_t addToPayload (long l)
 
uint8_t addToPayload (int w)
 
uint8_t addToPayload (uint16_t w)
 
uint8_t getPayloadBytesLeft (void) const
 
uint8_t getPayloadLength (void) const
 
uint8_t getPacketLength (void) const
 
const uint8_t * getPayload (void) const
 
uint8_t getPayload (uint8_t index) const
 
uint8_t sendOrBuffer (void)
 
uint8_t sendFromBuffer (void)
 
uint8_t writeToBuffer (void)
 
uint8_t readFromBuffer (void)
 
uint8_t readBinaryFromBuffer (unsigned long pos)
 
uint8_t readBinaryFromBuffer (unsigned long pos, unsigned long end, unsigned long vpos)
 
void setBuffer (BayEOSBuffer &buffer, uint16_t max_skip=0)
 

Additional Inherited Members

- Public Attributes inherited from BayEOS
uint8_t _payload [BayEOS_MAX_PAYLOAD]
 
uint8_t _next
 
uint8_t _success
 
uint8_t _failure_counter
 
uint16_t _max_skip
 
uint16_t _skip_counter
 
BayEOSBuffer_buffer
 
- Protected Member Functions inherited from XBeeInterface
void sendByte (uint8_t b, bool escape)
 
void resetResponse ()
 
- Protected Attributes inherited from XBeeInterface
XBeeResponse _response
 
bool _escape
 
uint8_t _pos
 
uint8_t b
 
uint8_t _checksumTotal
 
uint8_t _nextFrameId
 
uint8_t _responseFrameData [MAX_FRAME_DATA_SIZE]
 

Constructor & Destructor Documentation

◆ BayXBeeInterface()

BayXBeeInterface::BayXBeeInterface ( uint8_t  sleep_pin = 0,
uint8_t  wakeup_time = 15,
int  wait_time_for_response = 5000,
uint16_t  dest = BAYXBEE_GATEWAY 
)

Default constructor To enable Sleep node configure XBee with:

  • ATSM1 => Sleep mode - pin hibernate
  • ATD70 => CTS flow control disabled

Attention: Setting a wait_time_for_response to 0 will automatically disable waiting for response in sendPayload

Member Function Documentation

◆ available()

int BayXBeeInterface::available ( void  )
inlinevirtual

Has RX-data to read Has to be overwritten by implementation

Reimplemented from BayEOS.

◆ begin()

void BayXBeeInterface::begin ( long  baud)

Start BayXBee

◆ readIntoPayload()

uint8_t BayXBeeInterface::readIntoPayload ( int  timeout = 5000)
virtual

Read a rx-Packet Has to be overwritten by implementation

Reimplemented from BayEOS.

◆ sendPayload()

uint8_t BayXBeeInterface::sendPayload ( void  )
virtual

Send current payload buffer to dest

Implements BayEOS.


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