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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
ws_config.h
00001 /* 00002 * Copyright (c) 2018-2019, 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 #ifndef WS_CONFIG_H_ 00019 #define WS_CONFIG_H_ 00020 00021 00022 /*RPL parameters for DIO messages 00023 * 00024 * Small scale spec recomendation imin 15, doubling 2, redudancy 0 00025 * Small scale values imin 14, doubling 3, redudancy 0 00026 * Large scale network imin 19, doubling 1, redudancy 1 00027 * 00028 */ 00029 00030 #define WS_RPL_DIO_IMIN 15 00031 #define WS_RPL_DIO_DOUBLING 2 00032 #define WS_RPL_DIO_REDUNDANCY 0 00033 00034 #define WS_RPL_MIN_HOP_RANK_INCREASE 196 00035 #define WS_RPL_MAX_HOP_RANK_INCREASE 2048 00036 00037 #define WS_CERTIFICATE_RPL_MIN_HOP_RANK_INCREASE 128 00038 #define WS_CERTIFICATE_RPL_MAX_HOP_RANK_INCREASE 0 00039 00040 /* Border router version change interval 00041 * 00042 * Minimum interval at which a Border Router shall increment its PAN Version value. 00043 */ 00044 00045 #define PAN_VERSION_SMALL_NETWORK_LIFETIME 4*60 00046 #define PAN_VERSION_MEDIUM_NETWORK_LIFETIME 15*60 00047 #define PAN_VERSION_LARGE_NETWORK_LIFETIME 30*60 //30min 00048 00049 #define RPL_VERSION_LIFETIME 5*3600 00050 00051 /* Border router connection lost timeout 00052 * 00053 * Interval within which a node expects to detect a change in PAN Version 00054 * (delivered via a PAN Configuration frame / PAN-IE). 00055 * 00056 * the maximum Trickle interval specified for DISC_IMAX (32 minutes). 00057 * 00058 */ 00059 00060 #define PAN_VERSION_SMALL_NETWORK_TIMEOUT 32*60 00061 00062 #define PAN_VERSION_MEDIUM_NETWORK_TIMEOUT 64*60 00063 00064 #define PAN_VERSION_LARGE_NETWORK_TIMEOUT 90*60 00065 00066 /* Routing Cost Weighting factor 00067 */ 00068 #define PRC_WEIGHT_FACTOR 256 00069 00070 /* Routing Cost Weighting factor 00071 */ 00072 #define PS_WEIGHT_FACTOR 64 00073 00074 /* Smoothing factor for RSL calculation 1/8 00075 */ 00076 #define WS_RSL_SCALING 3 00077 00078 /* Device min sensitivity. This value is dynamically configured and depends on radio 00079 * 00080 * Default value for us is -93 00081 */ 00082 extern uint8_t DEVICE_MIN_SENS; 00083 00084 /* Candidate parent Threshold 00085 */ 00086 #define CAND_PARENT_THRESHOLD 10 00087 00088 /* Candidate parent Threshold hysteresis 00089 */ 00090 #define CAND_PARENT_HYSTERISIS 3 00091 00092 /* Maximum amount of Pan Configuration Solicits before restarting Discovery. 00093 */ 00094 #define PCS_MAX 5 00095 00096 00097 /* Multicast MPL data message parameters 00098 * IMIN = 10 seconds, IMAX = 3 doublings 00099 */ 00100 00101 #define DATA_MESSAGE_IMIN (10 * 1000) 00102 #define DATA_MESSAGE_TIMER_EXPIRATIONS 3 00103 #define DATA_MESSAGE_IMAX (DATA_MESSAGE_IMIN) 00104 #define MPL_SEED_SET_ENTRY_TIMEOUT (DATA_MESSAGE_IMAX * 24 * 4 / 1000) // 10 seconds per hop making this 240 seconds 00105 00106 /* DHCP client timeout configuration values 00107 * 00108 */ 00109 #define WS_DHCP_SOLICIT_TIMEOUT 60 00110 #define WS_DHCP_SOLICIT_MAX_RT 900 00111 #define WS_DHCP_SOLICIT_MAX_RC 0 00112 00113 00114 /* Neighbour table configuration 00115 * 00116 * Amount of RPL candidate parents 00117 * Amount of ND reply entries left 00118 * rest are used as child count, but is related to neighbour table size 00119 */ 00120 #define WS_RPL_CANDIDATE_PARENT_COUNT 3 // Largest possible value 00121 #define WS_TEMPORARY_NEIGHBOUR_ENTRIES 7 00122 #define WS_NON_CHILD_NEIGHBOUR_COUNT (WS_RPL_CANDIDATE_PARENT_COUNT + WS_TEMPORARY_NEIGHBOUR_ENTRIES) 00123 00124 /* 00125 * Neighbour blacklist timers 00126 */ 00127 #define WS_BLACKLIST_ENTRY_LIFETIME 60*30 // initial value for reject 00128 #define WS_BLACKLIST_TIMER_MAX_TIMEOUT 60*60 // Can increase to this 00129 #define WS_BLACKLIST_TIMER_TIMEOUT 60*30 // Blacklist is valid this time after first accept 00130 #define WS_BLACKLIST_ENTRY_MAX_NBR 10 00131 #define WS_BLACKLIST_PURGE_NBR 3 00132 #define WS_BLACKLIST_PURGE_TIMER_TIMEOUT 60 00133 00134 /* 00135 * MAC frame counter NVM storing configuration 00136 */ 00137 #define FRAME_COUNTER_STORE_INTERVAL 60 // Time interval (on seconds) between frame counter store operations 00138 #define FRAME_COUNTER_STORE_TRIGGER 5 // Delay (on seconds) before storing, when storing of frame counters is triggered 00139 #define FRAME_COUNTER_INCREMENT 1000 // How much frame counter is incremented on start up 00140 #define FRAME_COUNTER_STORE_THRESHOLD 800 // How much frame counter must increment before it is stored 00141 00142 00143 /* 00144 * RPL Configuration parameters 00145 */ 00146 #define WS_MAX_DAO_RETRIES 3 // With 40s, 80s, 160s, 320s, 640s 00147 #define WS_MAX_DAO_INITIAL_TIMEOUT 400 // With 40s initial value exponentially increasing 00148 #define WS_MIN_DIO_MULTICAST_CONFIG_ADVERTISMENT_COUNT 10 // Define 10 multicast advertisment when learn config or learn config update 00149 00150 /* 00151 * Candidate parent list parameters 00152 */ 00153 00154 #define WS_PARENT_LIST_SIZE 10 00155 #define WS_PARENT_LIST_MAX_AGE 3600*10 // 1 hour in 100ms ticks 00156 #define WS_PARENT_LIST_MAX_PAN_IN_DISCOVERY 5 // During discovery state how many neighbours per pan 00157 #define WS_PARENT_LIST_MAX_PAN_IN_ACTIVE 2 // During active state two nodes per pan is allowed 00158 00159 /* 00160 * Modifications for base specification. 00161 * 00162 * ERRATA changes after 1.0 specification release. 00163 */ 00164 #define WISUN_1_0_ERRATA_FIX 00165 00166 #endif /* WS_CONFIG_H_ */
Generated on Tue Jul 12 2022 13:55:04 by
