Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
fhss_ws_extension.h
00001 /* 00002 * Copyright (c) 2018, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /** 00019 * \file fhss_ws_extension.h 00020 * \brief 00021 */ 00022 00023 #ifndef FHSS_WS_EXT_H 00024 #define FHSS_WS_EXT_H 00025 00026 #include "ns_types.h" 00027 #include "fhss_api.h " 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 /** 00034 * @brief unicast_timing_info Unicast timing/hopping schedule information structure. 00035 */ 00036 typedef struct unicast_timing_info { 00037 unsigned unicast_channel_function:3; /**< Unicast schedule channel function */ 00038 uint8_t unicast_dwell_interval; /**< Unicast dwell interval */ 00039 uint16_t unicast_number_of_channels; /**< Unicast number of channels */ 00040 uint_fast24_t ufsi; /**< Unicast fractional sequence interval */ 00041 uint32_t utt_rx_timestamp; /**< UTT-IE reception timestamp */ 00042 } unicast_timing_info_t; 00043 00044 /** 00045 * @brief broadcast_timing_info Broadcast timing/hopping schedule information structure. 00046 */ 00047 typedef struct broadcast_timing_info { 00048 unsigned broadcast_channel_function:3; /**< Broadcast schedule channel function */ 00049 uint8_t broadcast_dwell_interval; /**< Broadcast dwell interval */ 00050 uint16_t broadcast_slot; /**< Broadcast slot number */ 00051 uint16_t broadcast_schedule_id; /**< Broadcast schedule identifier */ 00052 uint_fast24_t broadcast_interval_offset; /**< Broadcast interval offset */ 00053 uint32_t broadcast_interval; /**< Broadcast interval */ 00054 uint32_t bt_rx_timestamp; /**< BT-IE reception timestamp */ 00055 } broadcast_timing_info_t; 00056 00057 /** 00058 * @brief fhss_ws_neighbor_timing_info Neighbor timing/hopping schedule information structure. 00059 */ 00060 typedef struct fhss_ws_neighbor_timing_info { 00061 uint8_t clock_drift; /**< Neighbor clock drift */ 00062 uint8_t timing_accuracy; /**< Neighbor timing accuracy */ 00063 unicast_timing_info_t uc_timing_info; /**< Neighbor unicast timing info */ 00064 broadcast_timing_info_t bc_timing_info; /**< Neighbor broadcast timing info */ 00065 uint32_t *excluded_channels; /**< Neighbor excluded channels (bit mask) */ 00066 } fhss_ws_neighbor_timing_info_t; 00067 00068 /** 00069 * @brief Get neighbor timing/hopping schedule. 00070 * @param api FHSS instance. 00071 * @param eui64 EUI-64 address of node for which the info is requested. 00072 * @return Neighbor timing/hopping schedule. 00073 */ 00074 typedef fhss_ws_neighbor_timing_info_t *fhss_get_neighbor_info(const fhss_api_t *api, uint8_t eui64[8]); 00075 00076 /** 00077 * @brief Set parent which broadcast channels must be listened by FHSS. 00078 * @param fhss_api FHSS instance. 00079 * @param eui64 EUI-64 address of parent. 00080 * @param bc_timing_info Pointer to parent broadcast timing/hopping schedule info. 00081 * @return 0 on success, -1 on fail. 00082 */ 00083 extern int ns_fhss_ws_set_parent(const fhss_api_t *fhss_api, const uint8_t eui64[8], const broadcast_timing_info_t *bc_timing_info); 00084 00085 /** 00086 * @brief Remove parent which was set by ns_fhss_ws_set_parent function. 00087 * @param fhss_api FHSS instance. 00088 * @param eui64 EUI-64 address of parent. 00089 * @return 0 on success, -1 on fail. 00090 */ 00091 extern int ns_fhss_ws_remove_parent(const fhss_api_t *fhss_api, const uint8_t eui64[8]); 00092 00093 /** 00094 * @brief Set neighbor timing/hopping schedule request function. 00095 * @param fhss_api FHSS instance. 00096 * @param get_neighbor_info Neighbor info function pointer. 00097 * @return 0 on success, -1 on fail. 00098 */ 00099 extern int ns_fhss_set_neighbor_info_fp(const fhss_api_t *fhss_api, fhss_get_neighbor_info *get_neighbor_info); 00100 00101 /** 00102 * @brief Set node hop count. Hop count is used to specify TX/RX slot. When hop count is set to 0xFF, TX/RX slots are ignored. 00103 * @param fhss_api FHSS instance. 00104 * @param hop_count Hop count to be set. 00105 * @return 0 on success, -1 on fail. 00106 */ 00107 extern int ns_fhss_ws_set_hop_count(const fhss_api_t *fhss_api, const uint8_t hop_count); 00108 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 00113 #endif // FHSS_WS_EXT_H
Generated on Tue Aug 9 2022 00:37:07 by
1.7.2