nRF5 SDK for Thread v0.11.0
Typedefs | Functions
TMF Proxy

This module includes functions for TMF proxy feature. More...

Typedefs

typedef void(* otTmfProxyStreamHandler )(otMessage *aMessage, uint16_t aLocator, uint16_t aPort, void *aContext)
 

Functions

otError otTmfProxyStart (otInstance *aInstance, otTmfProxyStreamHandler aHandler, void *aContext)
 
otError otTmfProxyStop (otInstance *aInstance)
 
otError otTmfProxySend (otInstance *aInstance, otMessage *aMessage, uint16_t aLocator, uint16_t aPort)
 
bool otTmfProxyIsEnabled (otInstance *aInstance)
 

Detailed Description

This module includes functions for TMF proxy feature.

The functions in this module are available when tmf-proxy feature (OPENTHREAD_ENABLE_TMF_PROXY) is enabled.

Typedef Documentation

typedef void(* otTmfProxyStreamHandler)(otMessage *aMessage, uint16_t aLocator, uint16_t aPort, void *aContext)

This function pointer is called when a TMF packet for host is received.

Parameters
[in]aMessageA pointer to the CoAP Message.
[in]aContextA pointer to application-specific context.

Function Documentation

bool otTmfProxyIsEnabled ( otInstance aInstance)

Get the TMF proxy status (enabled/disabled)

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The TMF proxy status (true if enabled, false otherwise).
otError otTmfProxySend ( otInstance aInstance,
otMessage aMessage,
uint16_t  aLocator,
uint16_t  aPort 
)

Send packet through TMF proxy.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aMessageA pointer to the CoAP Message.
[in]aLocatorRloc of destination.
[in]aPortPort of destination.
Return values
OT_ERROR_NONESuccessfully send the message.
OT_ERROR_INVALID_STATEBorder agent proxy is not started.
Warning
No matter the call success or fail, the message is freed.
otError otTmfProxyStart ( otInstance aInstance,
otTmfProxyStreamHandler  aHandler,
void *  aContext 
)

Start the TMF proxy.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aHandlerA pointer to a function called to deliver TMF packet to host.
[in]aContextA pointer to application-specific context.
Return values
OT_ERROR_NONESuccessfully started the TMF proxy.
OT_ERROR_ALREADYBorder agent proxy has been started before.
otError otTmfProxyStop ( otInstance aInstance)

Stop the TMF proxy.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_ERROR_NONESuccessfully stopped the TMF proxy.
OT_ERROR_ALREADYBorder agent proxy is already stopped.

Documentation feedback | Developer Zone | Subscribe | Updated