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

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

uint8_t

Returns 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)

sets 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.


Definition at line 106 of file stack/include/source-route.h

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
N/Aon
N/AconcentratorTypeParam
N/AminTime
N/AmaxTime
N/ArouteErrorThresholdParam
N/AdeliveryFailureThresholdParam
N/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


Definition at line 42 of file stack/include/source-route.h

emberGetSourceRouteTableFilledSize#

uint8_t emberGetSourceRouteTableFilledSize (void)

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

Parameters
N/A

Definition at line 52 of file stack/include/source-route.h

emberGetSourceRouteTableTotalSize#

uint8_t emberGetSourceRouteTableTotalSize (void)

Returns the size of the source route table.

Parameters
N/A

Definition at line 56 of file stack/include/source-route.h

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
N/Adestination

The destination's short address.

Returns

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


Definition at line 64 of file stack/include/source-route.h

emberSetSourceRouteDiscoveryMode#

uint32_t emberSetSourceRouteDiscoveryMode (EmberSourceRouteDiscoveryMode mode)

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

Parameters
N/Amode

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


Definition at line 74 of file stack/include/source-route.h

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
N/A

Definition at line 83 of file stack/include/source-route.h

emberConcentratorStopDiscovery#

void emberConcentratorStopDiscovery (void)

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

Parameters
N/A

Definition at line 86 of file stack/include/source-route.h

emberConcentratorNoteDeliveryFailure#

void emberConcentratorNoteDeliveryFailure (EmberOutgoingMessageType type, EmberStatus status)

Legacy API. Notes when a packet fails to deliver.

Parameters
N/Atype
N/Astatus

Definition at line 90 of file stack/include/source-route.h

emberConcentratorNoteRouteError#

void emberConcentratorNoteRouteError (EmberStatus status, EmberNodeId nodeId)

Legacy API. Notes when a route error has occurred.

Parameters
N/Astatus
N/AnodeId

Definition at line 94 of file stack/include/source-route.h