8 #ifndef _TCMENU_MESSAGEPROCESSORS_H_
9 #define _TCMENU_MESSAGEPROCESSORS_H_
11 #include <PlatformDetermination.h>
12 #include <SimpleCollections.h>
79 FieldUpdateFunction fieldUpdateFn;
86 MsgHandler() : fieldUpdateFn(
nullptr), msgType(0xffff) {}
87 MsgHandler(uint16_t msgType, FieldUpdateFunction fn) : fieldUpdateFn(fn), msgType(msgType) {}
90 uint16_t getKey()
const {
return msgType; }
92 if(fieldUpdateFn) fieldUpdateFn(rc, fv, info);
130 const char* formName;
131 const uint8_t* formDataGzipped;
132 const uint16_t formDataLen;
149 BtreeList<uint16_t, MsgHandler> messageHandlers;
153 static void setFormTemplatesInFlash(
const EmbedControlFlashedForm** formTemplatesInFlash) { flashedFormTemplates = formTemplatesInFlash; }
169 void newMsg(uint16_t msgType);
208 messageHandlers.add(
MsgHandler(msgType, callback));
void fieldUpdatePairingMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:96
void fieldUpdateHeartbeatMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:52
void fieldUpdateJoinMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:110
void fieldGetFormNames(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
void fieldUpdateValueMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:254
void fieldHandleFormRequest(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
void fieldUpdateDialogMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:69
Definition: MessageProcessors.h:35
Definition: RemoteConnector.h:90
HeartbeatMode
Definition: RemoteTypes.h:149
ApiPlatform
Definition: RemoteTypes.h:139
ChangeType
Definition: RemoteTypes.h:132
Definition: MessageProcessors.h:146
void addCustomMsgHandler(uint16_t msgType, FieldUpdateFunction callback)
Definition: MessageProcessors.h:207
void fieldUpdate(TagValueRemoteConnector *connector, FieldAndValue *field)
Definition: MessageProcessors.cpp:41
void newMsg(uint16_t msgType)
Definition: MessageProcessors.cpp:27
CombinedMessageProcessor()
Definition: MessageProcessors.cpp:15
void initialise()
Definition: MessageProcessors.cpp:19
Definition: MessageProcessors.h:76
Definition: RemoteConnector.h:187