struct XDRVMAILBOX added in FUNC_COMMAND id section.

Rene 'Renne' Bartsch 2018-07-17 17:04:33 +02:00
parent ee8d835101
commit 207da16fdc
1 changed files with 15 additions and 1 deletions

@ -134,7 +134,21 @@ It should be wrapped in `#ifdef USE_WEBSERVER ... #endif // USE_WEBSERVER`
This callback ID is called to allow a sensor to prepare for saving configuration changes. To be used to save volatile data just before a restart.
### FUNC_COMMAND
This callback ID is called when a sensor specific command ``Sensor\<xx\>`` is executed where xx is the sensor index.
This callback ID is called when a sensor specific command ``Sensor<xx>`` is executed where xx is the sensor index.
```
// Data struct of FUNC_COMMAND ID
struct XDRVMAILBOX {
uint16_t valid; // ???
uint16_t index; // Sensor index
uint16_t data_len; // Length of command string
uint16_t payload16; // ???
int16_t payload; // ???
uint8_t grpflg; // ???
uint8_t notused; // ???
char *topic; // Command topic
char *data; // Command string/value
} XdrvMailbox;
```
## Useful functions