Binuart module.
More...
#include <ConnectinoModule.h>
|
void | begin () |
| Starts the module.
|
|
virtual bool | moduleCallback (uint8_t subId, uint8_t reqId, uint16_t dataSize, uint8_t *data)=0 |
| Callback function for serial frames of the Binuart module. More...
|
|
virtual uint8_t | getModId ()=0 |
| Return the modules ID. More...
|
|
|
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.
This is the abstract base class for all modules of the Connectino library. All Connectino library classes are derived from this base class. It also contains useful helper functions for building the frames for the WiFi module.
◆ moduleCallback()
virtual bool ConnectinoModule::moduleCallback |
( |
uint8_t |
subId, |
|
|
uint8_t |
reqId, |
|
|
uint16_t |
dataSize, |
|
|
uint8_t * |
data |
|
) |
| |
|
pure 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.
- Parameters
-
subId | Sub ID of the message. |
reqId | Request ID of the message. |
dataSize | Size of the received data. |
data | Reference to the received data. |
- Return values
-
The | module needs to return true if the frame should be kept in the buffer. If true is returned, incoming frames will be discarded. |
- Note
- This virtual function needs to be implemented by the derived child class.
Implemented in ConnectinoWlan, ConnectinoNet, ConnectinoArrowConnect, ConnectinoMqtt, ConnectinoAjax, and ConnectinoBinuart.
◆ getModId()
virtual uint8_t ConnectinoModule::getModId |
( |
| ) |
|
|
pure virtual |
◆ append() [1/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const char |
data[], |
|
|
const uint8_t |
numOfSizeBytes = 1 |
|
) |
| |
|
protected |
Append a string to the frames payload.
This function will append a string to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The string which should be appended. |
numOfSizeBytes | Optional parameter to define the length of the size information the string is prepended with, since the strings in the frames are not null terminated. |
- Return values
-
True | if success, false otherwise. |
◆ append() [2/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const uint8_t |
data[], |
|
|
const uint16_t |
dataSize, |
|
|
const uint8_t |
numOfSizeBytes = 1 |
|
) |
| |
|
protected |
Append binary data to the frames payload.
This function will append binary data to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The binary data which should be appended. |
dataSize | Size of the binary data. |
numOfSizeBytes | Optional parameter to define the length of the size information the data is prepended with. |
- Return values
-
True | if success, false otherwise. |
◆ append() [3/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const bool |
data |
|
) |
| |
|
protected |
Append a boolean to the frames payload.
This function will append a boolean to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The boolean which should be appended. |
- Return values
-
True | if success, false otherwise. |
◆ append() [4/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const uint8_t |
data |
|
) |
| |
|
protected |
Append a uint8_t variable to the frames payload.
This function will append a uint8_t to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The uint8_t variable which should be appended. |
- Return values
-
True | if success, false otherwise. |
◆ append() [5/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const uint16_t |
data |
|
) |
| |
|
protected |
Append a uint16_t variable to the frames payload.
This function will append a uint16_t to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The uint16_t variable which should be appended. |
- Return values
-
True | if success, false otherwise. |
◆ append() [6/6]
bool ConnectinoModule::append |
( |
uint8_t ** |
buffer, |
|
|
uint16_t * |
bufferSize, |
|
|
const uint32_t |
data |
|
) |
| |
|
protected |
Append a uint32_t variable to the frames payload.
This function will append a uint32_t to the payload of the frame that is currently built and compute the remaining buffer size and set the buffer pointer to the next free byte in the buffer.
- Parameters
-
buffer | Current frame buffer. |
bufferSize | Current size of the buffer. |
data | The uint32_t variable which should be appended. |
- Return values
-
True | if success, false otherwise. |
The documentation for this class was generated from the following files:
- C:/user/jpo/SVN_stxserv/branches/KundenProjekte/Connectino/Arduino_Lib/lib/libraries/ConnectinoModule/src/ConnectinoModule.h
- C:/user/jpo/SVN_stxserv/branches/KundenProjekte/Connectino/Arduino_Lib/lib/libraries/ConnectinoModule/src/ConnectinoModule.cpp