nRF5 SDK for Thread v0.10.0
Typedefs | Functions
Api-border-agent

This module includes functions for signal border agent proxy feature. More...

Typedefs

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

Functions

otError otBorderAgentProxyStart (otInstance *aInstance, otBorderAgentProxyStreamHandler aHandler, void *aContext)
 
otError otBorderAgentProxyStop (otInstance *aInstance)
 
otError otBorderAgentProxySend (otInstance *aInstance, otMessage *aMessage, uint16_t aLocator, uint16_t aPort)
 
bool otBorderAgentProxyIsEnabled (otInstance *aInstance)
 

Detailed Description

This module includes functions for signal border agent proxy feature.

Typedef Documentation

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

This function pointer is called when a CoAP packet for border agent is received.

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

Function Documentation

bool otBorderAgentProxyIsEnabled ( otInstance *  aInstance)

Get the border agent proxy status (enabled/disabled)

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

Send packet through border agent 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 otBorderAgentProxyStart ( otInstance *  aInstance,
otBorderAgentProxyStreamHandler  aHandler,
void *  aContext 
)

Start the border agent proxy.

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

Stop the border agent proxy.

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

Documentation feedback | Developer Zone | Subscribe | Updated