< Include for TCP server More...
#include <WifiSlave.h>
Public Member Functions | |
| WifiSlave (GloveModel gloveModel) | |
| Constructs a WifiSlave object with a given glove model. | |
| void | setup () |
| Standard setup function for the Wi-Fi slave. | |
| void | loop () |
| Standard loop function for the Wi-Fi slave. | |
| void | processMessage (const uint8_t *mac, const uint8_t *buf, size_t count) |
| Processes the received message. | |
Static Public Member Functions | |
| static void | onReceiveCallback (const uint8_t *mac, const uint8_t *buf, size_t count, void *arg) |
| Callback function for handling received data. | |
< Include for TCP server
This class defines the behavior of a WiFi slave device, including receiving data via Wi-Fi and processing it to control actuators.
| WifiSlave::WifiSlave | ( | GloveModel | gloveModel | ) |
Constructs a WifiSlave object with a given glove model.
| gloveModel | The glove model to be used for actuator control and pattern execution. |
| void WifiSlave::loop | ( | ) |
Standard loop function for the Wi-Fi slave.
Continuously handles incoming data and controls the actuators accordingly.
|
static |
Callback function for handling received data.
This function is called when data is received via Wi-Fi. It identifies the type of data and processes it accordingly.
| mac | The MAC address of the sender. |
| buf | The received data buffer. |
| count | The number of bytes received. |
| arg | Additional argument passed to the callback (not used here). |
| void WifiSlave::processMessage | ( | const uint8_t * | mac, |
| const uint8_t * | buf, | ||
| size_t | count ) |
Processes the received message.
This function processes the message and takes the appropriate actions based on the content of the message.
| mac | The MAC address of the sender. |
| buf | The received data buffer. |
| count | The number of bytes received. |
| void WifiSlave::setup | ( | ) |
Standard setup function for the Wi-Fi slave.
Initializes necessary components for Wi-Fi communication and the glove model.