Concentrator configuration and source route table management.

License#

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

/***************************************************************************/
#ifndef SILABS_SOURCE_ROUTE_H
#define SILABS_SOURCE_ROUTE_H

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

uint8_t emberGetSourceRouteTableFilledSize(void);

uint8_t emberGetSourceRouteTableTotalSize(void);

uint8_t emberGetSourceRouteOverhead(EmberNodeId destination);

uint32_t emberSetSourceRouteDiscoveryMode(EmberSourceRouteDiscoveryMode mode);

//--------------------legacy APIs, with no direct ezsp tranlation, will be deprecated

void emberConcentratorStartDiscovery(void);

void emberConcentratorStopDiscovery(void);

void emberConcentratorNoteDeliveryFailure(EmberOutgoingMessageType type, EmberStatus status);

void emberConcentratorNoteRouteError(EmberStatus status,
                                     EmberNodeId nodeId);

extern EmberAssumeTrustCenterConcentratorType emberAssumedTrustCenterConcentratorType;

#endif // SILABS_SOURCE_ROUTE_H

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.


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 )

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

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberGetSourceRouteTableTotalSize#

uint8_t emberGetSourceRouteTableTotalSize (void )

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

sets 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