#include <VizBlocks.hpp>
◆ VizBlocks()
VizBlocks::VizBlocks |
( |
char * |
id, |
|
|
char * |
ssid = "VizBlocksNet" , |
|
|
char * |
wifi_pass = "VizBlocksAP" , |
|
|
char * |
server = "172.20.10.8" , |
|
|
int |
port = 1883 |
|
) |
| |
◆ add()
Add a behaviour to the list of possible behaviours
◆ announce()
void VizBlocks::announce |
( |
String |
doc | ) |
|
◆ announce_capabilities()
void VizBlocks::announce_capabilities |
( |
| ) |
|
◆ command_callback()
void VizBlocks::command_callback |
( |
char * |
data, |
|
|
uint16_t |
len |
|
) |
| |
◆ generateCapabilitiesJSON()
void VizBlocks::generateCapabilitiesJSON |
( |
| ) |
|
◆ getId()
char* VizBlocks::getId |
( |
| ) |
|
◆ init()
◆ input_event()
String VizBlocks::input_event |
( |
String |
input | ) |
|
◆ mqtt_command()
void VizBlocks::mqtt_command |
( |
| ) |
|
Read a command from the serial input and process it. It only waits for 50ms to allow other behaviours to continue.
◆ MQTT_connect()
void VizBlocks::MQTT_connect |
( |
| ) |
|
Function to connect and reconnect as necessary to the MQTT server.
◆ process()
String VizBlocks::process |
( |
String |
input | ) |
|
Process a command. This means:
- split the command name from the arguments
- call process_command with the separated command and argument string
◆ process_command()
String VizBlocks::process_command |
( |
String |
command, |
|
|
String |
args |
|
) |
| |
Process a command and its arguments. This means:
- look for a Behaviour with the right name
- if found, then call that behaviour with the arguments (which are still a single string)
◆ run()
This is the main loop. It should be called from within loop() - really this function is the only thing you should need to call. It will manage it's own delay, so you can call as often as possible.
◆ serial_command()
void VizBlocks::serial_command |
( |
| ) |
|
Read a command from the serial input and process it
◆ set_wifi()
void VizBlocks::set_wifi |
( |
boolean |
v | ) |
|
◆ setID()
void VizBlocks::setID |
( |
char * |
id | ) |
|
The documentation for this class was generated from the following file: