tcMenu
Classes | Typedefs | Functions
MessageProcessors.h File Reference

This file contains the default processors that can deal with incoming messages turning them into events on tcMenu. More...

Go to the source code of this file.

Classes

union  MessageProcessorInfo
 
class  MsgHandler
 
struct  EmbedControlFlashedForm
 
class  CombinedMessageProcessor
 
struct  MessageProcessorInfo.value
 
struct  MessageProcessorInfo.join
 
struct  MessageProcessorInfo.pairing
 
struct  MessageProcessorInfo.dialog
 
struct  MessageProcessorInfo.hb
 
struct  MessageProcessorInfo.custom
 
struct  MessageProcessorInfo.formLoad
 

Typedefs

typedef void(* FieldUpdateFunction) (TagValueRemoteConnector *, FieldAndValue *, MessageProcessorInfo *)
 

Functions

void fieldUpdateJoinMsg (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldUpdateValueMsg (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldUpdatePairingMsg (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldUpdateDialogMsg (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldUpdateHeartbeatMsg (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldGetFormNames (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 
void fieldHandleFormRequest (TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
 

Detailed Description

This file contains the default processors that can deal with incoming messages turning them into events on tcMenu.


Class Documentation

◆ MessageProcessorInfo

union MessageProcessorInfo

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.

Class Members
struct MessageProcessorInfo value
struct MessageProcessorInfo join
struct MessageProcessorInfo pairing
struct MessageProcessorInfo dialog
struct MessageProcessorInfo hb
struct MessageProcessorInfo custom
struct MessageProcessorInfo formLoad

◆ EmbedControlFlashedForm

struct EmbedControlFlashedForm
Class Members
const char * formName
const uint8_t * formDataGzipped
const uint16_t formDataLen

◆ MessageProcessorInfo.value

struct MessageProcessorInfo.value
Class Members
MenuItem * item
int changeValue
uint32_t correlation
ChangeType changeType

◆ MessageProcessorInfo.join

struct MessageProcessorInfo.join
Class Members
uint8_t major
uint8_t minor
ApiPlatform platform
bool authProvided

◆ MessageProcessorInfo.pairing

struct MessageProcessorInfo.pairing
Class Members
char name[20]

◆ MessageProcessorInfo.dialog

struct MessageProcessorInfo.dialog
Class Members
char mode
uint8_t button
uint32_t correlation

◆ MessageProcessorInfo.hb

struct MessageProcessorInfo.hb
Class Members
HeartbeatMode hbMode

◆ MessageProcessorInfo.custom

struct MessageProcessorInfo.custom
Class Members
uint8_t data[20]

◆ MessageProcessorInfo.formLoad

struct MessageProcessorInfo.formLoad
Class Members
uint16_t length
const uint8_t * data

Function Documentation

◆ fieldUpdateJoinMsg()

void fieldUpdateJoinMsg ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle join messages

◆ fieldUpdateValueMsg()

void fieldUpdateValueMsg ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle value messages.

◆ fieldUpdatePairingMsg()

void fieldUpdatePairingMsg ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle pairing messages.

◆ fieldUpdateDialogMsg()

void fieldUpdateDialogMsg ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle dialog updates

◆ fieldUpdateHeartbeatMsg()

void fieldUpdateHeartbeatMsg ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle heartbeat updates

◆ fieldGetFormNames()

void fieldGetFormNames ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle get form names requests

◆ fieldHandleFormRequest()

void fieldHandleFormRequest ( TagValueRemoteConnector connector,
FieldAndValue field,
MessageProcessorInfo info 
)

If you decide to write your own processor, this method can handle get form data requests