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:153
void fieldUpdateHeartbeatMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:56
void fieldUpdateJoinMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:167
void fieldGetFormNames(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:100
void fieldUpdateValueMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:311
void fieldHandleFormRequest(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:120
void fieldUpdateDialogMsg(TagValueRemoteConnector *connector, FieldAndValue *field, MessageProcessorInfo *info)
Definition: MessageProcessors.cpp:73
Definition: MessageProcessors.h:35
Definition: RemoteConnector.h:90
HeartbeatMode
Definition: RemoteTypes.h:157
ApiPlatform
Definition: RemoteTypes.h:147
ChangeType
Definition: RemoteTypes.h:140
Definition: MessageProcessors.h:146
void addCustomMsgHandler(uint16_t msgType, FieldUpdateFunction callback)
Definition: MessageProcessors.h:207
void fieldUpdate(TagValueRemoteConnector *connector, FieldAndValue *field)
Definition: MessageProcessors.cpp:45
void newMsg(uint16_t msgType)
Definition: MessageProcessors.cpp:31
CombinedMessageProcessor()
Definition: MessageProcessors.cpp:15
void initialise()
Definition: MessageProcessors.cpp:19
Definition: MessageProcessors.h:76
Definition: RemoteConnector.h:187