#include <MessageProcessors.h>
Public Attributes | |
| struct { | |
| MenuItem * | item |
| int | changeValue |
| uint32_t | correlation |
| ChangeType | changeType |
| } | value |
| struct { | |
| uint8_t | major |
| uint8_t | minor |
| ApiPlatform | platform |
| bool | authProvided |
| } | join |
| struct { | |
| char | name [20] |
| } | pairing |
| struct { | |
| char | mode |
| uint8_t | button |
| uint32_t | correlation |
| } | dialog |
| struct { | |
| HeartbeatMode | hbMode |
| } | hb |
| struct { | |
| uint8_t | data [20] |
| } | custom |
| struct { | |
| uint16_t | length |
| const uint8_t * | data |
| } | formLoad |
Message processors need to store some state while they are working through the fields of a message, this union keeps state between a message starting processing and ending It can be added to with additional unions. It is essentially stored globally so size is an issue. If you need to extend the messages that can be processed, you'll probably also need to store some state. This is the ideal place to store such state in the union.
This union structure exists once per remote connection, and given that only one message on a remote connection can be processed at once, it can be a union. It is cleared at the start of each process.