Frequency Hopping#
API and callbacks for frequency hopping configuration.
See network-management.h for source code.
Callbacks#
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.
Functions#
Set the channel mask for frequency hopping. This API can only be invoked when the node is not frequency hopping.
Start the device 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.
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.
Stop frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client.
Sets the radio priority levels.
Gets the current radio priority levels.
Callbacks Documentation#
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.
[in] | status | An EmberStatus value indicating whether the synchronization process with the server was completed successfully or the reason for failure. |
753
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
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.
[in] | channelMaskLength | Length of the bitmap in bytes |
[in] | channelMask | A pointer to a bitmap representing allowed channels for frequency hopping. |
Note
The application is responsible for applying this setting to both the server and clients.
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.
661
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
emberFrequencyHoppingStartServer#
EmberStatus emberFrequencyHoppingStartServer (void )
Start the device 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.
N/A |
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.
675
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
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.
[in] | serverNodeId | An EmberNodeId value indicating the node ID of the server to synchronize with. |
[in] | serverPanId | An 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.
708
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
emberFrequencyHoppingStop#
EmberStatus emberFrequencyHoppingStop (void )
Stop frequency hopping. This API can only be invoked when the node is frequency hopping. Applicable for both server and client.
N/A |
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.
718
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
emberSetRadioPriority#
EmberStatus emberSetRadioPriority (sl_connect_radio_priority_t * priorities)
Sets the radio priority levels.
[in] | priorities | The priority levels to be set. |
This function sets the priority levels for the radio operations.
Returns
An EmberStatus value indicating the success or failure of the operation.
728
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h
emberGetRadioPriority#
EmberStatus emberGetRadioPriority (sl_connect_radio_priority_t * priorities)
Gets the current radio priority levels.
[out] | priorities | A pointer to a variable where the current priority levels will be stored. |
This function retrieves the current priority levels for the radio operations.
Returns
An EmberStatus value indicating the success or failure of the operation.
738
of file /mnt/raid/workspaces/ws.OJKVohJa4/overlay/gsdk/protocol/flex/stack/include/network-management.h