Open NZSmartie opened 7 years ago
Will be added soon. We redesign the stack in a way that we use ONE linked list lib. With this improvement it's no problem to add it dynamically. Stay tuned.
"soon" is relativ. It's not clear when we find time to spend on this. So help is always welcome. We let you known in case we start on it.
Regarding the default
/.well-known/core
handler; I think adding aCoAP_RemoveResource(...)
to complementCoAP_CreateResource(...)
would enable the application to remove the default handler and help by allowing the application to dynamically remove resources as they disappear from the device (for what ever reason).Another idea is allowing the application layer to manually register
WellKnown_GetHandler
(Might rename it toCoAP_DefaultWellKnownHandler
for clarity). Or possibly adding a flag toCoAP_Config_t
to disable automatic registration of the default handlerotherwise, maybe a callback could be added to
CoAP_ResOpts_t
When it's not null,WellKnown_GetHandler
will call that for generating a string (i.e.</example/resource>;ct="0 50 60";rt="example";if="sensor"
) per resource.