Frequency_hopping

API and callbacks for frequency hopping configuration. More...

Functions

EmberStatus emberFrequencyHoppingSetChannelMask (uint8_t channelMaskLength, uint8_t *channelMask)
 Set the channel mask for frequency hopping. This API can only be invoked when the node is not frequency hopping. More...
 
EmberStatus emberFrequencyHoppingStartServer (void)
 The device starts operating as a frequency hopping server. This API can only be invoked when the node is joined to a network. Notice that the server upon starting hopping shall perform an initial advertisement across the entire channel hopping sequence. This is done to resynchronize clients in case the server was started as result of a reboot. More...
 
EmberStatus emberFrequencyHoppingStartClient (EmberNodeId serverNodeId, EmberPanId serverPanId)
 Start operating as a frequency hopping client and synchronize with the specified server. This API can be invoked on nodes that are already joined to a network (with the exception of nodes started as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE) and nodes that are not joined to a network yet. If the node is already performing frequency hopping, this API returns EMBER_INVALID_CALL. If this API returns EMBER_SUCCESS, the emberFrequencyHoppingStartClientCompleteHandler() is invoked asynchronously to inform the application whether the node successfully synchronized with the specified server or to inform the application of the reason of failure. After the client is synced to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it informs the application by invoking the emberStackStatusHandler() handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will no longer be synced to the server. The application may elect to attempt a new synchronization process by invoking this API again. More...
 
EmberStatus emberFrequencyHoppingStop (void)
 Stops frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client. More...
 

Callbacks

void emberFrequencyHoppingStartClientCompleteHandler (EmberStatus status)
 This stack handler is invoked after the application calls the emberFrequencyHoppingStartClient() stack API to inform the application that the synchronization process with the server is complete. See emberFrequencyHoppingStartClient() for details. More...
 

Detailed Description

API and callbacks for frequency hopping configuration.

See network-management.h for source code.

Function Documentation

◆ emberFrequencyHoppingSetChannelMask()

EmberStatus emberFrequencyHoppingSetChannelMask ( uint8_t  channelMaskLength,
uint8_t *  channelMask 
)

Set the channel mask for frequency hopping. This API can only be invoked when the node is not frequency hopping.

Note
The application is responsible for applying this setting to both the server and clients.
Parameters
[in]channelMaskLengthLength of the bitmap in bytes
[in]channelMaskA pointer to a bitmap representing allowed channels for frequency hopping.
Note
The bitmap size needs to be at least (EMBER_FREQUENCY_HOPPING_END_CHANNEL + 8) >> 3 or an error is thrown.
The bitmap needs to be set again after stopping frequency hopping.
Returns
An EmberStatus value of EMBER_SUCCESS if the node successfully set the bitmask. An EmberStatus value of EMBER_INVALID_CALL if the node is currently performing frequency hopping. An EmberStatus value of EMBER_BAD_ARGUMENT if the resulting channel list is empty, or if channelMaskLength is shorter than expected.

◆ emberFrequencyHoppingStartClient()

EmberStatus emberFrequencyHoppingStartClient ( EmberNodeId  serverNodeId,
EmberPanId  serverPanId 
)

Start operating as a frequency hopping client and synchronize with the specified server. This API can be invoked on nodes that are already joined to a network (with the exception of nodes started as EMBER_MAC_MODE_DEVICE or EMBER_MAC_MODE_SLEEPY_DEVICE) and nodes that are not joined to a network yet. If the node is already performing frequency hopping, this API returns EMBER_INVALID_CALL. If this API returns EMBER_SUCCESS, the emberFrequencyHoppingStartClientCompleteHandler() is invoked asynchronously to inform the application whether the node successfully synchronized with the specified server or to inform the application of the reason of failure. After the client is synced to a server, it may seamlessly perform the resynchronization process if needed. Sleepy devices in particular periodically perform the resynchronization process. If the client fails a resynchronization process, it informs the application by invoking the emberStackStatusHandler() handler with EMBER_MAC_SYNC_TIMEOUT status. When this occurs, the client will no longer be synced to the server. The application may elect to attempt a new synchronization process by invoking this API again.

Parameters
[in]serverNodeIdAn EmberNodeId value indicating the node ID of the server to synchronize with.
[in]serverPanIdAn EmberPanId value indicating the PAN ID of the server to synchronize with. Note that this parameter is meaningful only if the node is not currently joined to any network.
Returns
An EmberStatus value of EMBER_SUCCESS indicating that the node successfully initiated the synchronization process with the server, otherwise an EmberStatus value indicating the reason of failure.

◆ emberFrequencyHoppingStartClientCompleteHandler()

void emberFrequencyHoppingStartClientCompleteHandler ( EmberStatus  status)

This stack handler is invoked after the application calls the emberFrequencyHoppingStartClient() stack API to inform the application that the synchronization process with the server is complete. See emberFrequencyHoppingStartClient() for details.

Parameters
[in]statusAn EmberStatus value indicating whether the synchronization process with the server was completed successfully or the reason for failure.

◆ emberFrequencyHoppingStartServer()

EmberStatus emberFrequencyHoppingStartServer ( void  )

The device starts operating as a frequency hopping server. This API can only be invoked when the node is joined to a network. Notice that the server upon starting hopping shall perform an initial advertisement across the entire channel hopping sequence. This is done to resynchronize clients in case the server was started as result of a reboot.

Returns
An EmberStatus value of EMBER_SUCCESS if the node successfully initiated frequency hopping server operations. An EmberStatus value of EMBER_INVALID_CALL if the node is not currently joined to a network or if the node is already performing frequency hopping.

◆ emberFrequencyHoppingStop()

EmberStatus emberFrequencyHoppingStop ( void  )

Stops frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client.

Returns
An EmberStatus value of EMBER_SUCCESS indicating that the node successfully stopped frequency hopping. An EmberStatus value of EMBER_INVALID_CALL if the node is not currently frequency hopping.