Source Routing APIs#

This file provides routines pertaining to source routing. Source routing is only available for routers and coordinators that have the source routing library included.

See source-route.h for more information.

Variables#

To configure non trust center node to assume a concentrator type of the trust center it join to, until it receive many-to-one route request from the trust center. For the trust center node, concentrator type is configured from the concentrator plugin. The stack by default assumes trust center be a low RAM concentrator that make other devices send route record to the trust center even without receiving a many-to-one route request. The assumed concentrator type can be changed by setting appropriate config value to emberAssumedTrustCenterConcentratorType.

Functions#

emberSetConcentrator(bool on, uint16_t concentratorTypeParam, uint16_t minTime, uint16_t maxTime, uint8_t routeErrorThresholdParam, uint8_t deliveryFailureThresholdParam, uint8_t maxHopsParam)

initializing the node to act as a concentrator with:

uint8_t

Return the number of used entries in the source route table.

uint8_t

Return the size of the source route table.

uint8_t
emberGetSourceRouteOverhead(EmberNodeId destination)

Returns the number of bytes needed in a packet for source routing. Since each hop consumes 2 bytes in the packet, this routine calculates the total number of bytes needed based on number of hops to reach the destination.

uint32_t
emberSetSourceRouteDiscoveryMode(EmberSourceRouteDiscoveryMode mode)

Set source route discovery mode(MTORR scheduling mode) to on/off/reschedule.

void

Legacy API Starts periodic many-to-one route discovery. Periodic discovery is started by default on bootup, but this function may be used if discovery has been stopped by a call to emberConcentratorStopDiscovery().

void

Legacy API. Stops periodic many-to-one route discovery.

void
emberConcentratorNoteDeliveryFailure(EmberOutgoingMessageType type, EmberStatus status)

Legacy API. Notes when a packet fails to deliver.

void
emberConcentratorNoteRouteError(EmberStatus status, EmberNodeId nodeId)

Legacy API. Notes when a route error has occurred.

Variable Documentation#

emberAssumedTrustCenterConcentratorType#

EmberAssumeTrustCenterConcentratorType emberAssumedTrustCenterConcentratorType

To configure non trust center node to assume a concentrator type of the trust center it join to, until it receive many-to-one route request from the trust center. For the trust center node, concentrator type is configured from the concentrator plugin. The stack by default assumes trust center be a low RAM concentrator that make other devices send route record to the trust center even without receiving a many-to-one route request. The assumed concentrator type can be changed by setting appropriate config value to emberAssumedTrustCenterConcentratorType.


Function Documentation#

emberSetConcentrator#

EmberStatus emberSetConcentrator (bool on, uint16_t concentratorTypeParam, uint16_t minTime, uint16_t maxTime, uint8_t routeErrorThresholdParam, uint8_t deliveryFailureThresholdParam, uint8_t maxHopsParam)

initializing the node to act as a concentrator with:

Parameters
TypeDirectionArgument NameDescription
boolN/Aon
uint16_tN/AconcentratorTypeParam
uint16_tN/AminTime
uint16_tN/AmaxTime
uint8_tN/ArouteErrorThresholdParam
uint8_tN/AdeliveryFailureThresholdParam
uint8_tN/AmaxHopsParam

@params discovery mode on/off concentratorTypeParam min time between MTORRs max time between MTORRs threshodl to react to route error message threshodl to react to delivery failures max number of hops for MTORR


emberGetSourceRouteTableFilledSize#

uint8_t emberGetSourceRouteTableFilledSize (void )

Return the number of used entries in the source route table.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberGetSourceRouteTableTotalSize#

uint8_t emberGetSourceRouteTableTotalSize (void )

Return the size of the source route table.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberGetSourceRouteOverhead#

uint8_t emberGetSourceRouteOverhead (EmberNodeId destination)

Returns the number of bytes needed in a packet for source routing. Since each hop consumes 2 bytes in the packet, this routine calculates the total number of bytes needed based on number of hops to reach the destination.

Parameters
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination

The destination's short address.

Returns

  • uint8_t The number of bytes needed for source routing in a packet.


emberSetSourceRouteDiscoveryMode#

uint32_t emberSetSourceRouteDiscoveryMode (EmberSourceRouteDiscoveryMode mode)

Set source route discovery mode(MTORR scheduling mode) to on/off/reschedule.

Parameters
TypeDirectionArgument NameDescription
EmberSourceRouteDiscoveryModeN/Amode

@params: mode: EMBER_SOURCE_ROUTE_DISCOVERY_OFF = 0x00, EMBER_SOURCE_ROUTE_DISCOVERY_ON = 0x01, EMBER_SOURCE_ROUTE_DISCOVERY_RESCHEDULE = 0x02,


emberConcentratorStartDiscovery#

void emberConcentratorStartDiscovery (void )

Legacy API Starts periodic many-to-one route discovery. Periodic discovery is started by default on bootup, but this function may be used if discovery has been stopped by a call to emberConcentratorStopDiscovery().

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberConcentratorStopDiscovery#

void emberConcentratorStopDiscovery (void )

Legacy API. Stops periodic many-to-one route discovery.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberConcentratorNoteDeliveryFailure#

void emberConcentratorNoteDeliveryFailure (EmberOutgoingMessageType type, EmberStatus status)

Legacy API. Notes when a packet fails to deliver.

Parameters
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype
EmberStatusN/Astatus

emberConcentratorNoteRouteError#

void emberConcentratorNoteRouteError (EmberStatus status, EmberNodeId nodeId)

Legacy API. Notes when a route error has occurred.

Parameters
TypeDirectionArgument NameDescription
EmberStatusN/Astatus
EmberNodeIdN/AnodeId