Connectino Library
|
Binuart module. More...
#include <ConnectinoBinuart.h>
Public Member Functions | |
ConnectinoBinuart (StxHwSerial &refSerial) | |
Binuart module constructor. More... | |
bool | moduleCallback (uint8_t subId, uint8_t reqId, uint16_t dataSize, uint8_t *data) |
Callback function for serial frames of the Binuart module. More... | |
uint8_t | getModId () |
Get the ID of the Binuart module. More... | |
bool | ping (unsigned int timeout) |
Send a ping frame to the module. More... | |
Public Member Functions inherited from ConnectinoModule | |
void | begin () |
Starts the module. | |
Additional Inherited Members | |
Protected Member Functions inherited from ConnectinoModule | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const char data[], const uint8_t numOfSizeBytes=1) |
Append a string to the frames payload. More... | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const uint8_t data[], const uint16_t dataSize, const uint8_t numOfSizeBytes=1) |
Append binary data to the frames payload. More... | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const bool data) |
Append a boolean to the frames payload. More... | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const uint8_t data) |
Append a uint8_t variable to the frames payload. More... | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const uint16_t data) |
Append a uint16_t variable to the frames payload. More... | |
bool | append (uint8_t **buffer, uint16_t *bufferSize, const uint32_t data) |
Append a uint32_t variable to the frames payload. More... | |
Binuart module.
The Binuart handles the sending and receiving of frames with configuration or user data to the WiFi module.
ConnectinoBinuart::ConnectinoBinuart | ( | StxHwSerial & | refSerial | ) |
Binuart module constructor.
Instantiates the Binuart module and connects it to the hardware serial.
refSerial | A reference to the hardware serial. |
|
virtual |
Callback function for serial frames of the Binuart module.
This function will be called for messages sent by the WiFi module which are targeted at the Binuart module.
subId | Sub ID of the message. |
reqId | Request ID of the message. |
dataSize | Size of the received data. |
data | Reference to the received data. |
Returns | whether or not to block the current frame. |
Implements ConnectinoModule.
|
virtual |
Get the ID of the Binuart module.
This function will return the module ID of the Binuart module defined in MODULE.h.
The | module ID. |
Implements ConnectinoModule.
bool ConnectinoBinuart::ping | ( | unsigned int | timeout | ) |
Send a ping frame to the module.
This function will send a framing ping with payload to the WiFi module. The WiFi module will echo back the payload. This can be used to check the communication with the framing module.
timeout | The timeframe in which the WiFi module should respond. |
True | if success, false otherwise. |