ENMS BorderRouter API

Table of contents Table of contents

Detailed Description

Data Structures

struct  EnmsBrEventHandlers
 Structure with user-defined callbacks that handle received information. More...
 
struct  EnmsBr
 

Enumeration Type Documentation

◆ EnmsBrResult

Possible ENMS NODE function results.

Enumerator
ENMS_BR_RESULT_OK 

Success.

ENMS_BR_RESULT_INVALID_INPUT_ARGUMENT 

At least one of the input arguments to a function was invalid. The call was aborted.

ENMS_BR_RESULT_FAILED_TO_REGISTER_UDP_SOCKET 

The service failed to register an UDP socket for communication. The service was aborted.

ENMS_BR_RESULT_FAILED_TO_SEND_PACKET 

The service failed to send an UDP packet.

Function Documentation

◆ ENMS_BR_Init()

EnmsBrResult ENMS_BR_Init ( EnmsBr enmsBr,
uint16_t  port,
const EnmsBrEventHandlers eventHandlers 
)

Initializes the ENMS BorderRouter service.

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]portUDP port number over which the service will communicate, provide 0 to use default port value 0xF0B1
[in]eventHandlersstructure holding callbacks that will be called on specific ENMS events (see EnmsBrEventHandlers)
Return values
ENMS_BR_RESULT_OKif the service was initialized successfully
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_REGISTER_UDP_SOCKETif the service failed to register and UDP socket and thus was unable to start

◆ ENMS_BR_Deinit()

EnmsBrResult ENMS_BR_Deinit ( EnmsBr enmsBr)

Deinitializes the ENMS BorderRouter service

Parameters
[in]enmsBrENMS BorderRouter service instance
Return values
ENMS_BR_RESULT_OKif the service was deinitialized successfully
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid

◆ ENMS_BR_QueryBasicInfo()

EnmsBrResult ENMS_BR_QueryBasicInfo ( EnmsBr enmsBr,
const EMBENET_IPV6 *  destinationAddress 
)

Queries the remote node for basic information

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]destinationAddressIPv6 address of the destination node (can be a multicast address)
Return values
ENMS_BR_RESULT_OKif the query was sent
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_SEND_PACKETif the service failed to send out a query packet through UDP

◆ ENMS_BR_QueryServiceInfo()

EnmsBrResult ENMS_BR_QueryServiceInfo ( EnmsBr enmsBr,
const EMBENET_IPV6 *  destinationAddress,
uint8_t  serviceNo 
)

Queries the remote node for information about a given service

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]destinationAddressIPv6 address of the destination node (can be a multicast address)
[in]serviceNoservice number
Return values
ENMS_BR_RESULT_OKif the query was sent
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_SEND_PACKETif the service failed to send out a query packet through UDP

◆ ENMS_BR_QueryStatus()

EnmsBrResult ENMS_BR_QueryStatus ( EnmsBr enmsBr,
const EMBENET_IPV6 *  destinationAddress 
)

Queries the remote node for status

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]destinationAddressIPv6 address of the destination node (can be a multicast address)
Return values
ENMS_BR_RESULT_OKif the query was sent
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_SEND_PACKETif the service failed to send out a query packet through UDP

◆ ENMS_BR_QueryNeighborhood()

EnmsBrResult ENMS_BR_QueryNeighborhood ( EnmsBr enmsBr,
const EMBENET_IPV6 *  destinationAddress 
)

Queries the remote node for neighborhood info

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]destinationAddressIPv6 address of the destination node (can be a multicast address)
Return values
ENMS_BR_RESULT_OKif the query was sent
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_SEND_PACKETif the service failed to send out a query packet through UDP

◆ ENMS_BR_QueryCells()

EnmsBrResult ENMS_BR_QueryCells ( EnmsBr enmsBr,
const EMBENET_IPV6 *  destinationAddress 
)

Queries the remote node for cells info

Parameters
[in]enmsBrENMS BorderRouter service instance
[in]destinationAddressIPv6 address of the destination node (can be a multicast address)
Return values
ENMS_BR_RESULT_OKif the query was sent
ENMS_BR_RESULT_INVALID_INPUT_ARGUMENTif at least one of the input arguments was invalid
ENMS_BR_RESULT_FAILED_TO_SEND_PACKETif the service failed to send out a query packet through UDP

Contact us

Any question or remarks? Just write us a message!

Contact Information

Feel free to get in touch