mirror of
https://github.com/espressif/openthread.git
synced 2026-08-20 17:39:51 +00:00
[tmf] introduce DeclareTmfResponseHandlerIn helper macros (#12187)
This commit introduces two new macros, `DeclareTmfResponseHandlerIn` and `DeclareTmfResponseHandlerFullParamIn`, to simplify the definition of TMF/CoAP response handlers. These macros generate the boilerplate code for the `static` callback method within a class and delegate the call to a non-static member method with the same name. This removes the repetitive pattern of manually defining the `static` wrapper in each class. The existing response handlers across various core components are updated to use the new helper macros.
This commit is contained in:
@@ -3332,15 +3332,6 @@ exit:
|
||||
LogSendError(kTypeAddressRelease, error);
|
||||
}
|
||||
|
||||
void Mle::HandleAddressSolicitResponse(void *aContext,
|
||||
otMessage *aMessage,
|
||||
const otMessageInfo *aMessageInfo,
|
||||
otError aResult)
|
||||
{
|
||||
static_cast<Mle *>(aContext)->HandleAddressSolicitResponse(AsCoapMessagePtr(aMessage), AsCoreTypePtr(aMessageInfo),
|
||||
aResult);
|
||||
}
|
||||
|
||||
void Mle::HandleAddressSolicitResponse(Coap::Message *aMessage, const Ip6::MessageInfo *aMessageInfo, Error aResult)
|
||||
{
|
||||
uint8_t status;
|
||||
|
||||
Reference in New Issue
Block a user