Connectino Library
Public Member Functions | List of all members
ConnectinoBinuart Class Reference

Binuart module. More...

#include <ConnectinoBinuart.h>

Inheritance diagram for ConnectinoBinuart:
ConnectinoModule

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...
 

Detailed Description

Binuart module.

The Binuart handles the sending and receiving of frames with configuration or user data to the WiFi module.

Constructor & Destructor Documentation

◆ ConnectinoBinuart()

ConnectinoBinuart::ConnectinoBinuart ( StxHwSerial &  refSerial)

Binuart module constructor.

Instantiates the Binuart module and connects it to the hardware serial.

Parameters
refSerialA reference to the hardware serial.

Member Function Documentation

◆ moduleCallback()

bool ConnectinoBinuart::moduleCallback ( uint8_t  subId,
uint8_t  reqId,
uint16_t  dataSize,
uint8_t *  data 
)
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
subIdSub ID of the message.
reqIdRequest ID of the message.
dataSizeSize of the received data.
dataReference to the received data.
Return values
Returnswhether or not to block the current frame.

Implements ConnectinoModule.

◆ getModId()

uint8_t ConnectinoBinuart::getModId ( )
virtual

Get the ID of the Binuart module.

This function will return the module ID of the Binuart module defined in MODULE.h.

Return values
Themodule ID.

Implements ConnectinoModule.

◆ ping()

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.

Parameters
timeoutThe timeframe in which the WiFi module should respond.
Return values
Trueif success, false otherwise.

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