custom payload handler registration added
This commit is contained in:
parent
33cdc8b759
commit
a3f0b6d057
|
|
@ -1 +1 @@
|
||||||
Subproject commit 587fbbd80b502e532416dafe5b5eea89f869a155
|
Subproject commit 32c8a42b8928581a3a51c44ab6550dcf1418384e
|
||||||
|
|
@ -12,6 +12,11 @@ HTTP_IO_RESULT AfterPostHandlerCustom(httpd_req_t *req, const char *filename, ch
|
||||||
void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data);
|
void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data);
|
||||||
void SaveUserConf();
|
void SaveUserConf();
|
||||||
|
|
||||||
|
sys_error_code CustomPayloadHandler(data_message_t *MSG)
|
||||||
|
{
|
||||||
|
return SYS_ERROR_HANDLER_NOT_SET;
|
||||||
|
}
|
||||||
|
|
||||||
const char my_context_data[] = "MyContextDataPassedIntoMQTTHandler";
|
const char my_context_data[] = "MyContextDataPassedIntoMQTTHandler";
|
||||||
|
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
|
|
@ -20,6 +25,7 @@ void app_main(void)
|
||||||
regAfterPostHandlerCustom(&AfterPostHandlerCustom);
|
regAfterPostHandlerCustom(&AfterPostHandlerCustom);
|
||||||
regUserEventHandler(&UserMQTTEventHndlr, (void*) my_context_data);
|
regUserEventHandler(&UserMQTTEventHndlr, (void*) my_context_data);
|
||||||
regCustomSaveConf(&SaveUserConf);
|
regCustomSaveConf(&SaveUserConf);
|
||||||
|
regCustomPayloadTypeHandler(&CustomPayloadHandler);
|
||||||
|
|
||||||
RegAppVariables();
|
RegAppVariables();
|
||||||
RegObjects();
|
RegObjects();
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ const obj_struct_t app_com_obj_arr[] = {
|
||||||
.command_handlers = { &APPLICATION_TEST1_handle, &APPLICATION_TEST2_handle }
|
.command_handlers = { &APPLICATION_TEST1_handle, &APPLICATION_TEST2_handle }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.index = 0,
|
.index = 1,
|
||||||
.object_name = "APPLICATION2",
|
.object_name = "APPLICATION2",
|
||||||
.allowed_actions = { "TEST1", "TEST2", "TEST3" },
|
.allowed_actions = { "TEST1", "TEST2", "TEST3" },
|
||||||
.command_handlers = { &APPLICATION_TEST1_handle, &APPLICATION_TEST2_handle }
|
.command_handlers = { &APPLICATION_TEST1_handle, &APPLICATION_TEST2_handle }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user