[coap] add new helper to allocate and init CoAP message (#7631)

This commit adds new helper methods in `Coap` to allocate a new
message and initialize it as a confirmable or non-confirmable post to
a given URI path. It also adds a new helper method to allocate a CoAP
response message for a given request. These methods help simplify the
preparation of CoAP and TMF messages.
This commit is contained in:
Abtin Keshavarzian
2022-05-06 10:27:55 -07:00
committed by GitHub
parent 3a125c66d2
commit cc003b3a42
24 changed files with 254 additions and 278 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ Error Agent::Start(void)
return Coap::Start(kUdpPort, OT_NETIF_THREAD);
}
Error Agent::Filter(const ot::Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo, void *aContext)
Error Agent::Filter(const Message &aMessage, const Ip6::MessageInfo &aMessageInfo, void *aContext)
{
OT_UNUSED_VARIABLE(aMessage);