Contains the base functionality for communication between the menu library and remote APIs. More...
Go to the source code of this file.
Classes | |
struct | FieldAndValue |
struct | CommunicationInfo |
class | TagValueTransport |
class | TagValueRemoteConnector |
Typedefs | |
typedef void(* | CommsCallbackFn) (CommunicationInfo) |
Enumerations | |
enum | FieldValueType : uint8_t { FVAL_NEW_MSG , FVAL_END_MSG , FVAL_FIELD , FVAL_ERROR_PROTO , FVAL_PROCESSING , FVAL_PROCESSING_WAITEQ , FVAL_PROCESSING_VALUE , FVAL_PROCESSING_AWAITINGMSG , FVAL_PROCESSING_PROTOCOL , FVAL_PROCESSING_MSGTYPE_HI , FVAL_PROCESSING_MSGTYPE_LO } |
enum | TagValueTransportType { TVAL_UNBUFFERED , TVAL_BUFFERED , TVAL_BUFFERED_DELEGATE_ENCRYPT } |
Contains the base functionality for communication between the menu library and remote APIs.
This class contains the majority of the code for dealing with remote connections using the TagVal protocol.
struct FieldAndValue |
This class describes the ongoing processing of an incoming message. In the embedded domain where we are essentially single threaded and even on 32 bit fairly memory constrained, there needs to be a minimalist way to process incoming events. This class processes data asynchronously by reading in a byte at a time and slowly updating it's state. It has many states, but more generally the states containing the word PROCESSING mean that there is nothing yet ready for use, these will never be passed externally to a message processor.
A remote connection will typically use a field and value to store the state on incoming message processing, it will generally pass anything that is not in a PROCESSING* state to a message callback for further processing.
Class Members | ||
---|---|---|
FieldValueType | fieldType | |
uint16_t | msgType | |
uint16_t | field | |
char | value[MAX_VALUE_LEN] | |
uint8_t | len |
struct CommunicationInfo |
typedef void(* CommsCallbackFn) (CommunicationInfo) |
A callback function that will receive information about comms channels. This is registered as a static on the TagValueTransport object, and will receive updates for all remote tag value connections.
enum FieldValueType : uint8_t |
This enum describes the various states that a field and value object can be in. Field and value is basically a simple state machine that remembers where the incoming communication was up to last time around, so it can be processed asynchronously. Anything containing PROCESSING is an internal state that is not ready for external processing, and generally would not be passed to a message callback.
The base type of transport that is in use, it can be either unbuffered, buffered, or simple encrypted. Encrypted tag val will become available during the 2.2 releases.