APS Lab
/
STM32F4_SmartMesh_QSL
SmartMesh QSL for STM32F4 version
Fork of COG-AD4050_QSL by
sm_clib/dn_ipmt.h@0:8ca1e814a851, 2018-05-02 (annotated)
- Committer:
- APS_Lab
- Date:
- Wed May 02 09:26:10 2018 +0000
- Revision:
- 0:8ca1e814a851
version1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
APS_Lab | 0:8ca1e814a851 | 1 | /* |
APS_Lab | 0:8ca1e814a851 | 2 | Copyright (c) 2015, Dust Networks. All rights reserved. |
APS_Lab | 0:8ca1e814a851 | 3 | |
APS_Lab | 0:8ca1e814a851 | 4 | C library to connect to a SmartMesh IP Mote. |
APS_Lab | 0:8ca1e814a851 | 5 | |
APS_Lab | 0:8ca1e814a851 | 6 | \license See attached DN_LICENSE.txt. |
APS_Lab | 0:8ca1e814a851 | 7 | */ |
APS_Lab | 0:8ca1e814a851 | 8 | |
APS_Lab | 0:8ca1e814a851 | 9 | #ifndef dn_ipmt_h |
APS_Lab | 0:8ca1e814a851 | 10 | #define dn_ipmt_h |
APS_Lab | 0:8ca1e814a851 | 11 | |
APS_Lab | 0:8ca1e814a851 | 12 | #include "dn_common.h" |
APS_Lab | 0:8ca1e814a851 | 13 | #include "dn_endianness.h" |
APS_Lab | 0:8ca1e814a851 | 14 | #include "dn_clib_version.h" |
APS_Lab | 0:8ca1e814a851 | 15 | |
APS_Lab | 0:8ca1e814a851 | 16 | //=========================== defines ========================================= |
APS_Lab | 0:8ca1e814a851 | 17 | |
APS_Lab | 0:8ca1e814a851 | 18 | #define MAX_FRAME_LENGTH 128 |
APS_Lab | 0:8ca1e814a851 | 19 | #define DN_SUBCMDID_NONE 0xff |
APS_Lab | 0:8ca1e814a851 | 20 | |
APS_Lab | 0:8ca1e814a851 | 21 | //===== well-known IPv6 address of the SmartMesh IP manager |
APS_Lab | 0:8ca1e814a851 | 22 | static const uint8_t ipv6Addr_manager[16] = { |
APS_Lab | 0:8ca1e814a851 | 23 | 0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00, |
APS_Lab | 0:8ca1e814a851 | 24 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02 |
APS_Lab | 0:8ca1e814a851 | 25 | }; |
APS_Lab | 0:8ca1e814a851 | 26 | |
APS_Lab | 0:8ca1e814a851 | 27 | //===== command IDs (requests) |
APS_Lab | 0:8ca1e814a851 | 28 | #define CMDID_SETPARAMETER 0x1 |
APS_Lab | 0:8ca1e814a851 | 29 | #define CMDID_GETPARAMETER 0x2 |
APS_Lab | 0:8ca1e814a851 | 30 | #define CMDID_JOIN 0x6 |
APS_Lab | 0:8ca1e814a851 | 31 | #define CMDID_DISCONNECT 0x7 |
APS_Lab | 0:8ca1e814a851 | 32 | #define CMDID_RESET 0x8 |
APS_Lab | 0:8ca1e814a851 | 33 | #define CMDID_LOWPOWERSLEEP 0x9 |
APS_Lab | 0:8ca1e814a851 | 34 | #define CMDID_TESTRADIORX 0xc |
APS_Lab | 0:8ca1e814a851 | 35 | #define CMDID_CLEARNV 0x10 |
APS_Lab | 0:8ca1e814a851 | 36 | #define CMDID_REQUESTSERVICE 0x11 |
APS_Lab | 0:8ca1e814a851 | 37 | #define CMDID_GETSERVICEINFO 0x12 |
APS_Lab | 0:8ca1e814a851 | 38 | #define CMDID_OPENSOCKET 0x15 |
APS_Lab | 0:8ca1e814a851 | 39 | #define CMDID_CLOSESOCKET 0x16 |
APS_Lab | 0:8ca1e814a851 | 40 | #define CMDID_BINDSOCKET 0x17 |
APS_Lab | 0:8ca1e814a851 | 41 | #define CMDID_SENDTO 0x18 |
APS_Lab | 0:8ca1e814a851 | 42 | #define CMDID_SEARCH 0x24 |
APS_Lab | 0:8ca1e814a851 | 43 | #define CMDID_TESTRADIOTXEXT 0x28 |
APS_Lab | 0:8ca1e814a851 | 44 | #define CMDID_ZEROIZE 0x29 |
APS_Lab | 0:8ca1e814a851 | 45 | #define CMDID_SOCKETINFO 0x2b |
APS_Lab | 0:8ca1e814a851 | 46 | |
APS_Lab | 0:8ca1e814a851 | 47 | //===== command IDs (notifications) |
APS_Lab | 0:8ca1e814a851 | 48 | #define CMDID_TIMEINDICATION 0xd |
APS_Lab | 0:8ca1e814a851 | 49 | #define CMDID_EVENTS 0xf |
APS_Lab | 0:8ca1e814a851 | 50 | #define CMDID_RECEIVE 0x19 |
APS_Lab | 0:8ca1e814a851 | 51 | #define CMDID_MACRX 0x24 |
APS_Lab | 0:8ca1e814a851 | 52 | #define CMDID_TXDONE 0x25 |
APS_Lab | 0:8ca1e814a851 | 53 | #define CMDID_ADVRECEIVED 0x26 |
APS_Lab | 0:8ca1e814a851 | 54 | |
APS_Lab | 0:8ca1e814a851 | 55 | //===== parameter IDs |
APS_Lab | 0:8ca1e814a851 | 56 | #define PARAMID_MACADDRESS 0x1 |
APS_Lab | 0:8ca1e814a851 | 57 | #define PARAMID_JOINKEY 0x2 |
APS_Lab | 0:8ca1e814a851 | 58 | #define PARAMID_NETWORKID 0x3 |
APS_Lab | 0:8ca1e814a851 | 59 | #define PARAMID_TXPOWER 0x4 |
APS_Lab | 0:8ca1e814a851 | 60 | #define PARAMID_JOINDUTYCYCLE 0x6 |
APS_Lab | 0:8ca1e814a851 | 61 | #define PARAMID_EVENTMASK 0xb |
APS_Lab | 0:8ca1e814a851 | 62 | #define PARAMID_MOTEINFO 0xc |
APS_Lab | 0:8ca1e814a851 | 63 | #define PARAMID_NETINFO 0xd |
APS_Lab | 0:8ca1e814a851 | 64 | #define PARAMID_MOTESTATUS 0xe |
APS_Lab | 0:8ca1e814a851 | 65 | #define PARAMID_TIME 0xf |
APS_Lab | 0:8ca1e814a851 | 66 | #define PARAMID_CHARGE 0x10 |
APS_Lab | 0:8ca1e814a851 | 67 | #define PARAMID_TESTRADIORXSTATS 0x11 |
APS_Lab | 0:8ca1e814a851 | 68 | #define PARAMID_OTAPLOCKOUT 0x15 |
APS_Lab | 0:8ca1e814a851 | 69 | #define PARAMID_MOTEID 0x17 |
APS_Lab | 0:8ca1e814a851 | 70 | #define PARAMID_IPV6ADDRESS 0x18 |
APS_Lab | 0:8ca1e814a851 | 71 | #define PARAMID_ROUTINGMODE 0x1d |
APS_Lab | 0:8ca1e814a851 | 72 | #define PARAMID_APPINFO 0x1e |
APS_Lab | 0:8ca1e814a851 | 73 | #define PARAMID_POWERSRCINFO 0x1f |
APS_Lab | 0:8ca1e814a851 | 74 | #define PARAMID_ADVKEY 0x22 |
APS_Lab | 0:8ca1e814a851 | 75 | #define PARAMID_AUTOJOIN 0x24 |
APS_Lab | 0:8ca1e814a851 | 76 | |
APS_Lab | 0:8ca1e814a851 | 77 | //===== format of requests |
APS_Lab | 0:8ca1e814a851 | 78 | |
APS_Lab | 0:8ca1e814a851 | 79 | // setParameter_macAddress |
APS_Lab | 0:8ca1e814a851 | 80 | #define DN_SETPARAMETER_MACADDRESS_REQ_OFFS_MACADDRESS 1 |
APS_Lab | 0:8ca1e814a851 | 81 | #define DN_SETPARAMETER_MACADDRESS_REQ_LEN 9 |
APS_Lab | 0:8ca1e814a851 | 82 | |
APS_Lab | 0:8ca1e814a851 | 83 | // setParameter_joinKey |
APS_Lab | 0:8ca1e814a851 | 84 | #define DN_SETPARAMETER_JOINKEY_REQ_OFFS_JOINKEY 1 |
APS_Lab | 0:8ca1e814a851 | 85 | #define DN_SETPARAMETER_JOINKEY_REQ_LEN 17 |
APS_Lab | 0:8ca1e814a851 | 86 | |
APS_Lab | 0:8ca1e814a851 | 87 | // setParameter_networkId |
APS_Lab | 0:8ca1e814a851 | 88 | #define DN_SETPARAMETER_NETWORKID_REQ_OFFS_NETWORKID 1 |
APS_Lab | 0:8ca1e814a851 | 89 | #define DN_SETPARAMETER_NETWORKID_REQ_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 90 | |
APS_Lab | 0:8ca1e814a851 | 91 | // setParameter_txPower |
APS_Lab | 0:8ca1e814a851 | 92 | #define DN_SETPARAMETER_TXPOWER_REQ_OFFS_TXPOWER 1 |
APS_Lab | 0:8ca1e814a851 | 93 | #define DN_SETPARAMETER_TXPOWER_REQ_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 94 | |
APS_Lab | 0:8ca1e814a851 | 95 | // setParameter_joinDutyCycle |
APS_Lab | 0:8ca1e814a851 | 96 | #define DN_SETPARAMETER_JOINDUTYCYCLE_REQ_OFFS_DUTYCYCLE 1 |
APS_Lab | 0:8ca1e814a851 | 97 | #define DN_SETPARAMETER_JOINDUTYCYCLE_REQ_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 98 | |
APS_Lab | 0:8ca1e814a851 | 99 | // setParameter_eventMask |
APS_Lab | 0:8ca1e814a851 | 100 | #define DN_SETPARAMETER_EVENTMASK_REQ_OFFS_EVENTMASK 1 |
APS_Lab | 0:8ca1e814a851 | 101 | #define DN_SETPARAMETER_EVENTMASK_REQ_LEN 5 |
APS_Lab | 0:8ca1e814a851 | 102 | |
APS_Lab | 0:8ca1e814a851 | 103 | // setParameter_OTAPLockout |
APS_Lab | 0:8ca1e814a851 | 104 | #define DN_SETPARAMETER_OTAPLOCKOUT_REQ_OFFS_MODE 1 |
APS_Lab | 0:8ca1e814a851 | 105 | #define DN_SETPARAMETER_OTAPLOCKOUT_REQ_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 106 | |
APS_Lab | 0:8ca1e814a851 | 107 | // setParameter_routingMode |
APS_Lab | 0:8ca1e814a851 | 108 | #define DN_SETPARAMETER_ROUTINGMODE_REQ_OFFS_MODE 1 |
APS_Lab | 0:8ca1e814a851 | 109 | #define DN_SETPARAMETER_ROUTINGMODE_REQ_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 110 | |
APS_Lab | 0:8ca1e814a851 | 111 | // setParameter_powerSrcInfo |
APS_Lab | 0:8ca1e814a851 | 112 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_MAXSTCURRENT 1 |
APS_Lab | 0:8ca1e814a851 | 113 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_MINLIFETIME 3 |
APS_Lab | 0:8ca1e814a851 | 114 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_CURRENTLIMIT_0 4 |
APS_Lab | 0:8ca1e814a851 | 115 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_DISCHARGEPERIOD_0 6 |
APS_Lab | 0:8ca1e814a851 | 116 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_RECHARGEPERIOD_0 8 |
APS_Lab | 0:8ca1e814a851 | 117 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_CURRENTLIMIT_1 10 |
APS_Lab | 0:8ca1e814a851 | 118 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_DISCHARGEPERIOD_1 12 |
APS_Lab | 0:8ca1e814a851 | 119 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_RECHARGEPERIOD_1 14 |
APS_Lab | 0:8ca1e814a851 | 120 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_CURRENTLIMIT_2 16 |
APS_Lab | 0:8ca1e814a851 | 121 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_DISCHARGEPERIOD_2 18 |
APS_Lab | 0:8ca1e814a851 | 122 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_OFFS_RECHARGEPERIOD_2 20 |
APS_Lab | 0:8ca1e814a851 | 123 | #define DN_SETPARAMETER_POWERSRCINFO_REQ_LEN 22 |
APS_Lab | 0:8ca1e814a851 | 124 | |
APS_Lab | 0:8ca1e814a851 | 125 | // setParameter_advKey |
APS_Lab | 0:8ca1e814a851 | 126 | #define DN_SETPARAMETER_ADVKEY_REQ_OFFS_ADVKEY 1 |
APS_Lab | 0:8ca1e814a851 | 127 | #define DN_SETPARAMETER_ADVKEY_REQ_LEN 17 |
APS_Lab | 0:8ca1e814a851 | 128 | |
APS_Lab | 0:8ca1e814a851 | 129 | // setParameter_autoJoin |
APS_Lab | 0:8ca1e814a851 | 130 | #define DN_SETPARAMETER_AUTOJOIN_REQ_OFFS_MODE 1 |
APS_Lab | 0:8ca1e814a851 | 131 | #define DN_SETPARAMETER_AUTOJOIN_REQ_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 132 | |
APS_Lab | 0:8ca1e814a851 | 133 | // getParameter_macAddress |
APS_Lab | 0:8ca1e814a851 | 134 | #define DN_GETPARAMETER_MACADDRESS_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 135 | |
APS_Lab | 0:8ca1e814a851 | 136 | // getParameter_networkId |
APS_Lab | 0:8ca1e814a851 | 137 | #define DN_GETPARAMETER_NETWORKID_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 138 | |
APS_Lab | 0:8ca1e814a851 | 139 | // getParameter_txPower |
APS_Lab | 0:8ca1e814a851 | 140 | #define DN_GETPARAMETER_TXPOWER_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 141 | |
APS_Lab | 0:8ca1e814a851 | 142 | // getParameter_joinDutyCycle |
APS_Lab | 0:8ca1e814a851 | 143 | #define DN_GETPARAMETER_JOINDUTYCYCLE_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 144 | |
APS_Lab | 0:8ca1e814a851 | 145 | // getParameter_eventMask |
APS_Lab | 0:8ca1e814a851 | 146 | #define DN_GETPARAMETER_EVENTMASK_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 147 | |
APS_Lab | 0:8ca1e814a851 | 148 | // getParameter_moteInfo |
APS_Lab | 0:8ca1e814a851 | 149 | #define DN_GETPARAMETER_MOTEINFO_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 150 | |
APS_Lab | 0:8ca1e814a851 | 151 | // getParameter_netInfo |
APS_Lab | 0:8ca1e814a851 | 152 | #define DN_GETPARAMETER_NETINFO_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 153 | |
APS_Lab | 0:8ca1e814a851 | 154 | // getParameter_moteStatus |
APS_Lab | 0:8ca1e814a851 | 155 | #define DN_GETPARAMETER_MOTESTATUS_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 156 | |
APS_Lab | 0:8ca1e814a851 | 157 | // getParameter_time |
APS_Lab | 0:8ca1e814a851 | 158 | #define DN_GETPARAMETER_TIME_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 159 | |
APS_Lab | 0:8ca1e814a851 | 160 | // getParameter_charge |
APS_Lab | 0:8ca1e814a851 | 161 | #define DN_GETPARAMETER_CHARGE_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 162 | |
APS_Lab | 0:8ca1e814a851 | 163 | // getParameter_testRadioRxStats |
APS_Lab | 0:8ca1e814a851 | 164 | #define DN_GETPARAMETER_TESTRADIORXSTATS_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 165 | |
APS_Lab | 0:8ca1e814a851 | 166 | // getParameter_OTAPLockout |
APS_Lab | 0:8ca1e814a851 | 167 | #define DN_GETPARAMETER_OTAPLOCKOUT_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 168 | |
APS_Lab | 0:8ca1e814a851 | 169 | // getParameter_moteId |
APS_Lab | 0:8ca1e814a851 | 170 | #define DN_GETPARAMETER_MOTEID_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 171 | |
APS_Lab | 0:8ca1e814a851 | 172 | // getParameter_ipv6Address |
APS_Lab | 0:8ca1e814a851 | 173 | #define DN_GETPARAMETER_IPV6ADDRESS_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 174 | |
APS_Lab | 0:8ca1e814a851 | 175 | // getParameter_routingMode |
APS_Lab | 0:8ca1e814a851 | 176 | #define DN_GETPARAMETER_ROUTINGMODE_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 177 | |
APS_Lab | 0:8ca1e814a851 | 178 | // getParameter_appInfo |
APS_Lab | 0:8ca1e814a851 | 179 | #define DN_GETPARAMETER_APPINFO_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 180 | |
APS_Lab | 0:8ca1e814a851 | 181 | // getParameter_powerSrcInfo |
APS_Lab | 0:8ca1e814a851 | 182 | #define DN_GETPARAMETER_POWERSRCINFO_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 183 | |
APS_Lab | 0:8ca1e814a851 | 184 | // getParameter_autoJoin |
APS_Lab | 0:8ca1e814a851 | 185 | #define DN_GETPARAMETER_AUTOJOIN_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 186 | |
APS_Lab | 0:8ca1e814a851 | 187 | // join |
APS_Lab | 0:8ca1e814a851 | 188 | #define DN_JOIN_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 189 | |
APS_Lab | 0:8ca1e814a851 | 190 | // disconnect |
APS_Lab | 0:8ca1e814a851 | 191 | #define DN_DISCONNECT_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 192 | |
APS_Lab | 0:8ca1e814a851 | 193 | // reset |
APS_Lab | 0:8ca1e814a851 | 194 | #define DN_RESET_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 195 | |
APS_Lab | 0:8ca1e814a851 | 196 | // lowPowerSleep |
APS_Lab | 0:8ca1e814a851 | 197 | #define DN_LOWPOWERSLEEP_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 198 | |
APS_Lab | 0:8ca1e814a851 | 199 | // testRadioRx |
APS_Lab | 0:8ca1e814a851 | 200 | #define DN_TESTRADIORX_REQ_OFFS_CHANNELMASK 0 |
APS_Lab | 0:8ca1e814a851 | 201 | #define DN_TESTRADIORX_REQ_OFFS_TIME 2 |
APS_Lab | 0:8ca1e814a851 | 202 | #define DN_TESTRADIORX_REQ_OFFS_STATIONID 4 |
APS_Lab | 0:8ca1e814a851 | 203 | #define DN_TESTRADIORX_REQ_LEN 5 |
APS_Lab | 0:8ca1e814a851 | 204 | |
APS_Lab | 0:8ca1e814a851 | 205 | // clearNV |
APS_Lab | 0:8ca1e814a851 | 206 | #define DN_CLEARNV_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 207 | |
APS_Lab | 0:8ca1e814a851 | 208 | // requestService |
APS_Lab | 0:8ca1e814a851 | 209 | #define DN_REQUESTSERVICE_REQ_OFFS_DESTADDR 0 |
APS_Lab | 0:8ca1e814a851 | 210 | #define DN_REQUESTSERVICE_REQ_OFFS_SERVICETYPE 2 |
APS_Lab | 0:8ca1e814a851 | 211 | #define DN_REQUESTSERVICE_REQ_OFFS_VALUE 3 |
APS_Lab | 0:8ca1e814a851 | 212 | #define DN_REQUESTSERVICE_REQ_LEN 7 |
APS_Lab | 0:8ca1e814a851 | 213 | |
APS_Lab | 0:8ca1e814a851 | 214 | // getServiceInfo |
APS_Lab | 0:8ca1e814a851 | 215 | #define DN_GETSERVICEINFO_REQ_OFFS_DESTADDR 0 |
APS_Lab | 0:8ca1e814a851 | 216 | #define DN_GETSERVICEINFO_REQ_OFFS_TYPE 2 |
APS_Lab | 0:8ca1e814a851 | 217 | #define DN_GETSERVICEINFO_REQ_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 218 | |
APS_Lab | 0:8ca1e814a851 | 219 | // openSocket |
APS_Lab | 0:8ca1e814a851 | 220 | #define DN_OPENSOCKET_REQ_OFFS_PROTOCOL 0 |
APS_Lab | 0:8ca1e814a851 | 221 | #define DN_OPENSOCKET_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 222 | |
APS_Lab | 0:8ca1e814a851 | 223 | // closeSocket |
APS_Lab | 0:8ca1e814a851 | 224 | #define DN_CLOSESOCKET_REQ_OFFS_SOCKETID 0 |
APS_Lab | 0:8ca1e814a851 | 225 | #define DN_CLOSESOCKET_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 226 | |
APS_Lab | 0:8ca1e814a851 | 227 | // bindSocket |
APS_Lab | 0:8ca1e814a851 | 228 | #define DN_BINDSOCKET_REQ_OFFS_SOCKETID 0 |
APS_Lab | 0:8ca1e814a851 | 229 | #define DN_BINDSOCKET_REQ_OFFS_PORT 1 |
APS_Lab | 0:8ca1e814a851 | 230 | #define DN_BINDSOCKET_REQ_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 231 | |
APS_Lab | 0:8ca1e814a851 | 232 | // sendTo |
APS_Lab | 0:8ca1e814a851 | 233 | #define DN_SENDTO_REQ_OFFS_SOCKETID 0 |
APS_Lab | 0:8ca1e814a851 | 234 | #define DN_SENDTO_REQ_OFFS_DESTIP 1 |
APS_Lab | 0:8ca1e814a851 | 235 | #define DN_SENDTO_REQ_OFFS_DESTPORT 17 |
APS_Lab | 0:8ca1e814a851 | 236 | #define DN_SENDTO_REQ_OFFS_SERVICETYPE 19 |
APS_Lab | 0:8ca1e814a851 | 237 | #define DN_SENDTO_REQ_OFFS_PRIORITY 20 |
APS_Lab | 0:8ca1e814a851 | 238 | #define DN_SENDTO_REQ_OFFS_PACKETID 21 |
APS_Lab | 0:8ca1e814a851 | 239 | #define DN_SENDTO_REQ_OFFS_PAYLOAD 23 |
APS_Lab | 0:8ca1e814a851 | 240 | #define DN_SENDTO_REQ_LEN 23 |
APS_Lab | 0:8ca1e814a851 | 241 | |
APS_Lab | 0:8ca1e814a851 | 242 | // search |
APS_Lab | 0:8ca1e814a851 | 243 | #define DN_SEARCH_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 244 | |
APS_Lab | 0:8ca1e814a851 | 245 | // testRadioTxExt |
APS_Lab | 0:8ca1e814a851 | 246 | #define DN_TESTRADIOTXEXT_REQ_OFFS_TESTTYPE 0 |
APS_Lab | 0:8ca1e814a851 | 247 | #define DN_TESTRADIOTXEXT_REQ_OFFS_CHANMASK 1 |
APS_Lab | 0:8ca1e814a851 | 248 | #define DN_TESTRADIOTXEXT_REQ_OFFS_REPEATCNT 3 |
APS_Lab | 0:8ca1e814a851 | 249 | #define DN_TESTRADIOTXEXT_REQ_OFFS_TXPOWER 5 |
APS_Lab | 0:8ca1e814a851 | 250 | #define DN_TESTRADIOTXEXT_REQ_OFFS_SEQSIZE 6 |
APS_Lab | 0:8ca1e814a851 | 251 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_1 7 |
APS_Lab | 0:8ca1e814a851 | 252 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_1 8 |
APS_Lab | 0:8ca1e814a851 | 253 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_2 10 |
APS_Lab | 0:8ca1e814a851 | 254 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_2 11 |
APS_Lab | 0:8ca1e814a851 | 255 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_3 13 |
APS_Lab | 0:8ca1e814a851 | 256 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_3 14 |
APS_Lab | 0:8ca1e814a851 | 257 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_4 16 |
APS_Lab | 0:8ca1e814a851 | 258 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_4 17 |
APS_Lab | 0:8ca1e814a851 | 259 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_5 19 |
APS_Lab | 0:8ca1e814a851 | 260 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_5 20 |
APS_Lab | 0:8ca1e814a851 | 261 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_6 22 |
APS_Lab | 0:8ca1e814a851 | 262 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_6 23 |
APS_Lab | 0:8ca1e814a851 | 263 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_7 25 |
APS_Lab | 0:8ca1e814a851 | 264 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_7 26 |
APS_Lab | 0:8ca1e814a851 | 265 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_8 28 |
APS_Lab | 0:8ca1e814a851 | 266 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_8 29 |
APS_Lab | 0:8ca1e814a851 | 267 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_9 31 |
APS_Lab | 0:8ca1e814a851 | 268 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_9 32 |
APS_Lab | 0:8ca1e814a851 | 269 | #define DN_TESTRADIOTXEXT_REQ_OFFS_PKLEN_10 34 |
APS_Lab | 0:8ca1e814a851 | 270 | #define DN_TESTRADIOTXEXT_REQ_OFFS_DELAY_10 35 |
APS_Lab | 0:8ca1e814a851 | 271 | #define DN_TESTRADIOTXEXT_REQ_OFFS_STATIONID 37 |
APS_Lab | 0:8ca1e814a851 | 272 | #define DN_TESTRADIOTXEXT_REQ_LEN 38 |
APS_Lab | 0:8ca1e814a851 | 273 | |
APS_Lab | 0:8ca1e814a851 | 274 | // zeroize |
APS_Lab | 0:8ca1e814a851 | 275 | #define DN_ZEROIZE_REQ_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 276 | |
APS_Lab | 0:8ca1e814a851 | 277 | // socketInfo |
APS_Lab | 0:8ca1e814a851 | 278 | #define DN_SOCKETINFO_REQ_OFFS_INDEX 0 |
APS_Lab | 0:8ca1e814a851 | 279 | #define DN_SOCKETINFO_REQ_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 280 | |
APS_Lab | 0:8ca1e814a851 | 281 | //===== format of replies |
APS_Lab | 0:8ca1e814a851 | 282 | |
APS_Lab | 0:8ca1e814a851 | 283 | // setParameter_macAddress |
APS_Lab | 0:8ca1e814a851 | 284 | #define DN_SETPARAMETER_MACADDRESS_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 285 | |
APS_Lab | 0:8ca1e814a851 | 286 | // setParameter_joinKey |
APS_Lab | 0:8ca1e814a851 | 287 | #define DN_SETPARAMETER_JOINKEY_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 288 | |
APS_Lab | 0:8ca1e814a851 | 289 | // setParameter_networkId |
APS_Lab | 0:8ca1e814a851 | 290 | #define DN_SETPARAMETER_NETWORKID_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 291 | |
APS_Lab | 0:8ca1e814a851 | 292 | // setParameter_txPower |
APS_Lab | 0:8ca1e814a851 | 293 | #define DN_SETPARAMETER_TXPOWER_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 294 | |
APS_Lab | 0:8ca1e814a851 | 295 | // setParameter_joinDutyCycle |
APS_Lab | 0:8ca1e814a851 | 296 | #define DN_SETPARAMETER_JOINDUTYCYCLE_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 297 | |
APS_Lab | 0:8ca1e814a851 | 298 | // setParameter_eventMask |
APS_Lab | 0:8ca1e814a851 | 299 | #define DN_SETPARAMETER_EVENTMASK_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 300 | |
APS_Lab | 0:8ca1e814a851 | 301 | // setParameter_OTAPLockout |
APS_Lab | 0:8ca1e814a851 | 302 | #define DN_SETPARAMETER_OTAPLOCKOUT_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 303 | |
APS_Lab | 0:8ca1e814a851 | 304 | // setParameter_routingMode |
APS_Lab | 0:8ca1e814a851 | 305 | #define DN_SETPARAMETER_ROUTINGMODE_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 306 | |
APS_Lab | 0:8ca1e814a851 | 307 | // setParameter_powerSrcInfo |
APS_Lab | 0:8ca1e814a851 | 308 | #define DN_SETPARAMETER_POWERSRCINFO_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 309 | |
APS_Lab | 0:8ca1e814a851 | 310 | // setParameter_advKey |
APS_Lab | 0:8ca1e814a851 | 311 | #define DN_SETPARAMETER_ADVKEY_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 312 | |
APS_Lab | 0:8ca1e814a851 | 313 | // setParameter_autoJoin |
APS_Lab | 0:8ca1e814a851 | 314 | #define DN_SETPARAMETER_AUTOJOIN_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 315 | |
APS_Lab | 0:8ca1e814a851 | 316 | // getParameter_macAddress |
APS_Lab | 0:8ca1e814a851 | 317 | #define DN_GETPARAMETER_MACADDRESS_REPLY_OFFS_MACADDRESS 1 |
APS_Lab | 0:8ca1e814a851 | 318 | #define DN_GETPARAMETER_MACADDRESS_REPLY_LEN 9 |
APS_Lab | 0:8ca1e814a851 | 319 | |
APS_Lab | 0:8ca1e814a851 | 320 | // getParameter_networkId |
APS_Lab | 0:8ca1e814a851 | 321 | #define DN_GETPARAMETER_NETWORKID_REPLY_OFFS_NETWORKID 1 |
APS_Lab | 0:8ca1e814a851 | 322 | #define DN_GETPARAMETER_NETWORKID_REPLY_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 323 | |
APS_Lab | 0:8ca1e814a851 | 324 | // getParameter_txPower |
APS_Lab | 0:8ca1e814a851 | 325 | #define DN_GETPARAMETER_TXPOWER_REPLY_OFFS_TXPOWER 1 |
APS_Lab | 0:8ca1e814a851 | 326 | #define DN_GETPARAMETER_TXPOWER_REPLY_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 327 | |
APS_Lab | 0:8ca1e814a851 | 328 | // getParameter_joinDutyCycle |
APS_Lab | 0:8ca1e814a851 | 329 | #define DN_GETPARAMETER_JOINDUTYCYCLE_REPLY_OFFS_JOINDUTYCYCLE 1 |
APS_Lab | 0:8ca1e814a851 | 330 | #define DN_GETPARAMETER_JOINDUTYCYCLE_REPLY_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 331 | |
APS_Lab | 0:8ca1e814a851 | 332 | // getParameter_eventMask |
APS_Lab | 0:8ca1e814a851 | 333 | #define DN_GETPARAMETER_EVENTMASK_REPLY_OFFS_EVENTMASK 1 |
APS_Lab | 0:8ca1e814a851 | 334 | #define DN_GETPARAMETER_EVENTMASK_REPLY_LEN 5 |
APS_Lab | 0:8ca1e814a851 | 335 | |
APS_Lab | 0:8ca1e814a851 | 336 | // getParameter_moteInfo |
APS_Lab | 0:8ca1e814a851 | 337 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_APIVERSION 1 |
APS_Lab | 0:8ca1e814a851 | 338 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_SERIALNUMBER 2 |
APS_Lab | 0:8ca1e814a851 | 339 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_HWMODEL 10 |
APS_Lab | 0:8ca1e814a851 | 340 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_HWREV 11 |
APS_Lab | 0:8ca1e814a851 | 341 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_SWVERMAJOR 12 |
APS_Lab | 0:8ca1e814a851 | 342 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_SWVERMINOR 13 |
APS_Lab | 0:8ca1e814a851 | 343 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_SWVERPATCH 14 |
APS_Lab | 0:8ca1e814a851 | 344 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_SWVERBUILD 15 |
APS_Lab | 0:8ca1e814a851 | 345 | #define DN_GETPARAMETER_MOTEINFO_REPLY_OFFS_BOOTSWVER 17 |
APS_Lab | 0:8ca1e814a851 | 346 | #define DN_GETPARAMETER_MOTEINFO_REPLY_LEN 18 |
APS_Lab | 0:8ca1e814a851 | 347 | |
APS_Lab | 0:8ca1e814a851 | 348 | // getParameter_netInfo |
APS_Lab | 0:8ca1e814a851 | 349 | #define DN_GETPARAMETER_NETINFO_REPLY_OFFS_MACADDRESS 1 |
APS_Lab | 0:8ca1e814a851 | 350 | #define DN_GETPARAMETER_NETINFO_REPLY_OFFS_MOTEID 9 |
APS_Lab | 0:8ca1e814a851 | 351 | #define DN_GETPARAMETER_NETINFO_REPLY_OFFS_NETWORKID 11 |
APS_Lab | 0:8ca1e814a851 | 352 | #define DN_GETPARAMETER_NETINFO_REPLY_OFFS_SLOTSIZE 13 |
APS_Lab | 0:8ca1e814a851 | 353 | #define DN_GETPARAMETER_NETINFO_REPLY_LEN 15 |
APS_Lab | 0:8ca1e814a851 | 354 | |
APS_Lab | 0:8ca1e814a851 | 355 | // getParameter_moteStatus |
APS_Lab | 0:8ca1e814a851 | 356 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_STATE 1 |
APS_Lab | 0:8ca1e814a851 | 357 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_RESERVED_0 2 |
APS_Lab | 0:8ca1e814a851 | 358 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_RESERVED_1 3 |
APS_Lab | 0:8ca1e814a851 | 359 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_NUMPARENTS 5 |
APS_Lab | 0:8ca1e814a851 | 360 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_ALARMS 6 |
APS_Lab | 0:8ca1e814a851 | 361 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_OFFS_RESERVED_2 10 |
APS_Lab | 0:8ca1e814a851 | 362 | #define DN_GETPARAMETER_MOTESTATUS_REPLY_LEN 11 |
APS_Lab | 0:8ca1e814a851 | 363 | |
APS_Lab | 0:8ca1e814a851 | 364 | // getParameter_time |
APS_Lab | 0:8ca1e814a851 | 365 | #define DN_GETPARAMETER_TIME_REPLY_OFFS_UPTIME 1 |
APS_Lab | 0:8ca1e814a851 | 366 | #define DN_GETPARAMETER_TIME_REPLY_OFFS_UTCSECS 5 |
APS_Lab | 0:8ca1e814a851 | 367 | #define DN_GETPARAMETER_TIME_REPLY_OFFS_UTCUSECS 13 |
APS_Lab | 0:8ca1e814a851 | 368 | #define DN_GETPARAMETER_TIME_REPLY_OFFS_ASN 17 |
APS_Lab | 0:8ca1e814a851 | 369 | #define DN_GETPARAMETER_TIME_REPLY_OFFS_ASNOFFSET 22 |
APS_Lab | 0:8ca1e814a851 | 370 | #define DN_GETPARAMETER_TIME_REPLY_LEN 24 |
APS_Lab | 0:8ca1e814a851 | 371 | |
APS_Lab | 0:8ca1e814a851 | 372 | // getParameter_charge |
APS_Lab | 0:8ca1e814a851 | 373 | #define DN_GETPARAMETER_CHARGE_REPLY_OFFS_QTOTAL 1 |
APS_Lab | 0:8ca1e814a851 | 374 | #define DN_GETPARAMETER_CHARGE_REPLY_OFFS_UPTIME 5 |
APS_Lab | 0:8ca1e814a851 | 375 | #define DN_GETPARAMETER_CHARGE_REPLY_OFFS_TEMPINT 9 |
APS_Lab | 0:8ca1e814a851 | 376 | #define DN_GETPARAMETER_CHARGE_REPLY_OFFS_TEMPFRAC 10 |
APS_Lab | 0:8ca1e814a851 | 377 | #define DN_GETPARAMETER_CHARGE_REPLY_LEN 11 |
APS_Lab | 0:8ca1e814a851 | 378 | |
APS_Lab | 0:8ca1e814a851 | 379 | // getParameter_testRadioRxStats |
APS_Lab | 0:8ca1e814a851 | 380 | #define DN_GETPARAMETER_TESTRADIORXSTATS_REPLY_OFFS_RXOK 1 |
APS_Lab | 0:8ca1e814a851 | 381 | #define DN_GETPARAMETER_TESTRADIORXSTATS_REPLY_OFFS_RXFAILED 3 |
APS_Lab | 0:8ca1e814a851 | 382 | #define DN_GETPARAMETER_TESTRADIORXSTATS_REPLY_LEN 5 |
APS_Lab | 0:8ca1e814a851 | 383 | |
APS_Lab | 0:8ca1e814a851 | 384 | // getParameter_OTAPLockout |
APS_Lab | 0:8ca1e814a851 | 385 | #define DN_GETPARAMETER_OTAPLOCKOUT_REPLY_OFFS_MODE 1 |
APS_Lab | 0:8ca1e814a851 | 386 | #define DN_GETPARAMETER_OTAPLOCKOUT_REPLY_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 387 | |
APS_Lab | 0:8ca1e814a851 | 388 | // getParameter_moteId |
APS_Lab | 0:8ca1e814a851 | 389 | #define DN_GETPARAMETER_MOTEID_REPLY_OFFS_MOTEID 1 |
APS_Lab | 0:8ca1e814a851 | 390 | #define DN_GETPARAMETER_MOTEID_REPLY_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 391 | |
APS_Lab | 0:8ca1e814a851 | 392 | // getParameter_ipv6Address |
APS_Lab | 0:8ca1e814a851 | 393 | #define DN_GETPARAMETER_IPV6ADDRESS_REPLY_OFFS_IPV6ADDRESS 1 |
APS_Lab | 0:8ca1e814a851 | 394 | #define DN_GETPARAMETER_IPV6ADDRESS_REPLY_LEN 17 |
APS_Lab | 0:8ca1e814a851 | 395 | |
APS_Lab | 0:8ca1e814a851 | 396 | // getParameter_routingMode |
APS_Lab | 0:8ca1e814a851 | 397 | #define DN_GETPARAMETER_ROUTINGMODE_REPLY_OFFS_ROUTINGMODE 1 |
APS_Lab | 0:8ca1e814a851 | 398 | #define DN_GETPARAMETER_ROUTINGMODE_REPLY_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 399 | |
APS_Lab | 0:8ca1e814a851 | 400 | // getParameter_appInfo |
APS_Lab | 0:8ca1e814a851 | 401 | #define DN_GETPARAMETER_APPINFO_REPLY_OFFS_VENDORID 1 |
APS_Lab | 0:8ca1e814a851 | 402 | #define DN_GETPARAMETER_APPINFO_REPLY_OFFS_APPID 3 |
APS_Lab | 0:8ca1e814a851 | 403 | #define DN_GETPARAMETER_APPINFO_REPLY_OFFS_APPVER 4 |
APS_Lab | 0:8ca1e814a851 | 404 | #define DN_GETPARAMETER_APPINFO_REPLY_LEN 9 |
APS_Lab | 0:8ca1e814a851 | 405 | |
APS_Lab | 0:8ca1e814a851 | 406 | // getParameter_powerSrcInfo |
APS_Lab | 0:8ca1e814a851 | 407 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_MAXSTCURRENT 1 |
APS_Lab | 0:8ca1e814a851 | 408 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_MINLIFETIME 3 |
APS_Lab | 0:8ca1e814a851 | 409 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_CURRENTLIMIT_0 4 |
APS_Lab | 0:8ca1e814a851 | 410 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_DISCHARGEPERIOD_0 6 |
APS_Lab | 0:8ca1e814a851 | 411 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_RECHARGEPERIOD_0 8 |
APS_Lab | 0:8ca1e814a851 | 412 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_CURRENTLIMIT_1 10 |
APS_Lab | 0:8ca1e814a851 | 413 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_DISCHARGEPERIOD_1 12 |
APS_Lab | 0:8ca1e814a851 | 414 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_RECHARGEPERIOD_1 14 |
APS_Lab | 0:8ca1e814a851 | 415 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_CURRENTLIMIT_2 16 |
APS_Lab | 0:8ca1e814a851 | 416 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_DISCHARGEPERIOD_2 18 |
APS_Lab | 0:8ca1e814a851 | 417 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_OFFS_RECHARGEPERIOD_2 20 |
APS_Lab | 0:8ca1e814a851 | 418 | #define DN_GETPARAMETER_POWERSRCINFO_REPLY_LEN 22 |
APS_Lab | 0:8ca1e814a851 | 419 | |
APS_Lab | 0:8ca1e814a851 | 420 | // getParameter_autoJoin |
APS_Lab | 0:8ca1e814a851 | 421 | #define DN_GETPARAMETER_AUTOJOIN_REPLY_OFFS_AUTOJOIN 1 |
APS_Lab | 0:8ca1e814a851 | 422 | #define DN_GETPARAMETER_AUTOJOIN_REPLY_LEN 2 |
APS_Lab | 0:8ca1e814a851 | 423 | |
APS_Lab | 0:8ca1e814a851 | 424 | // join |
APS_Lab | 0:8ca1e814a851 | 425 | #define DN_JOIN_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 426 | |
APS_Lab | 0:8ca1e814a851 | 427 | // disconnect |
APS_Lab | 0:8ca1e814a851 | 428 | #define DN_DISCONNECT_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 429 | |
APS_Lab | 0:8ca1e814a851 | 430 | // reset |
APS_Lab | 0:8ca1e814a851 | 431 | #define DN_RESET_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 432 | |
APS_Lab | 0:8ca1e814a851 | 433 | // lowPowerSleep |
APS_Lab | 0:8ca1e814a851 | 434 | #define DN_LOWPOWERSLEEP_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 435 | |
APS_Lab | 0:8ca1e814a851 | 436 | // testRadioRx |
APS_Lab | 0:8ca1e814a851 | 437 | #define DN_TESTRADIORX_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 438 | |
APS_Lab | 0:8ca1e814a851 | 439 | // clearNV |
APS_Lab | 0:8ca1e814a851 | 440 | #define DN_CLEARNV_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 441 | |
APS_Lab | 0:8ca1e814a851 | 442 | // requestService |
APS_Lab | 0:8ca1e814a851 | 443 | #define DN_REQUESTSERVICE_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 444 | |
APS_Lab | 0:8ca1e814a851 | 445 | // getServiceInfo |
APS_Lab | 0:8ca1e814a851 | 446 | #define DN_GETSERVICEINFO_REPLY_OFFS_DESTADDR 0 |
APS_Lab | 0:8ca1e814a851 | 447 | #define DN_GETSERVICEINFO_REPLY_OFFS_TYPE 2 |
APS_Lab | 0:8ca1e814a851 | 448 | #define DN_GETSERVICEINFO_REPLY_OFFS_STATE 3 |
APS_Lab | 0:8ca1e814a851 | 449 | #define DN_GETSERVICEINFO_REPLY_OFFS_VALUE 4 |
APS_Lab | 0:8ca1e814a851 | 450 | #define DN_GETSERVICEINFO_REPLY_LEN 8 |
APS_Lab | 0:8ca1e814a851 | 451 | |
APS_Lab | 0:8ca1e814a851 | 452 | // openSocket |
APS_Lab | 0:8ca1e814a851 | 453 | #define DN_OPENSOCKET_REPLY_OFFS_SOCKETID 0 |
APS_Lab | 0:8ca1e814a851 | 454 | #define DN_OPENSOCKET_REPLY_LEN 1 |
APS_Lab | 0:8ca1e814a851 | 455 | |
APS_Lab | 0:8ca1e814a851 | 456 | // closeSocket |
APS_Lab | 0:8ca1e814a851 | 457 | #define DN_CLOSESOCKET_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 458 | |
APS_Lab | 0:8ca1e814a851 | 459 | // bindSocket |
APS_Lab | 0:8ca1e814a851 | 460 | #define DN_BINDSOCKET_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 461 | |
APS_Lab | 0:8ca1e814a851 | 462 | // sendTo |
APS_Lab | 0:8ca1e814a851 | 463 | #define DN_SENDTO_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 464 | |
APS_Lab | 0:8ca1e814a851 | 465 | // search |
APS_Lab | 0:8ca1e814a851 | 466 | #define DN_SEARCH_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 467 | |
APS_Lab | 0:8ca1e814a851 | 468 | // testRadioTxExt |
APS_Lab | 0:8ca1e814a851 | 469 | #define DN_TESTRADIOTXEXT_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 470 | |
APS_Lab | 0:8ca1e814a851 | 471 | // zeroize |
APS_Lab | 0:8ca1e814a851 | 472 | #define DN_ZEROIZE_REPLY_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 473 | |
APS_Lab | 0:8ca1e814a851 | 474 | // socketInfo |
APS_Lab | 0:8ca1e814a851 | 475 | #define DN_SOCKETINFO_REPLY_OFFS_INDEX 0 |
APS_Lab | 0:8ca1e814a851 | 476 | #define DN_SOCKETINFO_REPLY_OFFS_SOCKETID 1 |
APS_Lab | 0:8ca1e814a851 | 477 | #define DN_SOCKETINFO_REPLY_OFFS_PROTOCOL 2 |
APS_Lab | 0:8ca1e814a851 | 478 | #define DN_SOCKETINFO_REPLY_OFFS_BINDSTATE 3 |
APS_Lab | 0:8ca1e814a851 | 479 | #define DN_SOCKETINFO_REPLY_OFFS_PORT 4 |
APS_Lab | 0:8ca1e814a851 | 480 | #define DN_SOCKETINFO_REPLY_LEN 6 |
APS_Lab | 0:8ca1e814a851 | 481 | |
APS_Lab | 0:8ca1e814a851 | 482 | //===== format of notifications |
APS_Lab | 0:8ca1e814a851 | 483 | |
APS_Lab | 0:8ca1e814a851 | 484 | // timeIndication |
APS_Lab | 0:8ca1e814a851 | 485 | #define DN_TIMEINDICATION_NOTIF_OFFS_UPTIME 0 |
APS_Lab | 0:8ca1e814a851 | 486 | #define DN_TIMEINDICATION_NOTIF_OFFS_UTCSECS 4 |
APS_Lab | 0:8ca1e814a851 | 487 | #define DN_TIMEINDICATION_NOTIF_OFFS_UTCUSECS 12 |
APS_Lab | 0:8ca1e814a851 | 488 | #define DN_TIMEINDICATION_NOTIF_OFFS_ASN 16 |
APS_Lab | 0:8ca1e814a851 | 489 | #define DN_TIMEINDICATION_NOTIF_OFFS_ASNOFFSET 21 |
APS_Lab | 0:8ca1e814a851 | 490 | #define DN_TIMEINDICATION_NOTIF_LEN 23 |
APS_Lab | 0:8ca1e814a851 | 491 | |
APS_Lab | 0:8ca1e814a851 | 492 | // events |
APS_Lab | 0:8ca1e814a851 | 493 | #define DN_EVENTS_NOTIF_OFFS_EVENTS 0 |
APS_Lab | 0:8ca1e814a851 | 494 | #define DN_EVENTS_NOTIF_OFFS_STATE 4 |
APS_Lab | 0:8ca1e814a851 | 495 | #define DN_EVENTS_NOTIF_OFFS_ALARMSLIST 5 |
APS_Lab | 0:8ca1e814a851 | 496 | #define DN_EVENTS_NOTIF_LEN 9 |
APS_Lab | 0:8ca1e814a851 | 497 | |
APS_Lab | 0:8ca1e814a851 | 498 | // receive |
APS_Lab | 0:8ca1e814a851 | 499 | #define DN_RECEIVE_NOTIF_OFFS_SOCKETID 0 |
APS_Lab | 0:8ca1e814a851 | 500 | #define DN_RECEIVE_NOTIF_OFFS_SRCADDR 1 |
APS_Lab | 0:8ca1e814a851 | 501 | #define DN_RECEIVE_NOTIF_OFFS_SRCPORT 17 |
APS_Lab | 0:8ca1e814a851 | 502 | #define DN_RECEIVE_NOTIF_OFFS_PAYLOAD 19 |
APS_Lab | 0:8ca1e814a851 | 503 | #define DN_RECEIVE_NOTIF_LEN 19 |
APS_Lab | 0:8ca1e814a851 | 504 | |
APS_Lab | 0:8ca1e814a851 | 505 | // macRx |
APS_Lab | 0:8ca1e814a851 | 506 | #define DN_MACRX_NOTIF_OFFS_PAYLOAD 0 |
APS_Lab | 0:8ca1e814a851 | 507 | #define DN_MACRX_NOTIF_LEN 0 |
APS_Lab | 0:8ca1e814a851 | 508 | |
APS_Lab | 0:8ca1e814a851 | 509 | // txDone |
APS_Lab | 0:8ca1e814a851 | 510 | #define DN_TXDONE_NOTIF_OFFS_PACKETID 0 |
APS_Lab | 0:8ca1e814a851 | 511 | #define DN_TXDONE_NOTIF_OFFS_STATUS 2 |
APS_Lab | 0:8ca1e814a851 | 512 | #define DN_TXDONE_NOTIF_LEN 3 |
APS_Lab | 0:8ca1e814a851 | 513 | |
APS_Lab | 0:8ca1e814a851 | 514 | // advReceived |
APS_Lab | 0:8ca1e814a851 | 515 | #define DN_ADVRECEIVED_NOTIF_OFFS_NETID 0 |
APS_Lab | 0:8ca1e814a851 | 516 | #define DN_ADVRECEIVED_NOTIF_OFFS_MOTEID 2 |
APS_Lab | 0:8ca1e814a851 | 517 | #define DN_ADVRECEIVED_NOTIF_OFFS_RSSI 4 |
APS_Lab | 0:8ca1e814a851 | 518 | #define DN_ADVRECEIVED_NOTIF_OFFS_JOINPRI 5 |
APS_Lab | 0:8ca1e814a851 | 519 | #define DN_ADVRECEIVED_NOTIF_LEN 6 |
APS_Lab | 0:8ca1e814a851 | 520 | |
APS_Lab | 0:8ca1e814a851 | 521 | //=========================== typedef ========================================= |
APS_Lab | 0:8ca1e814a851 | 522 | |
APS_Lab | 0:8ca1e814a851 | 523 | //=== reply types |
APS_Lab | 0:8ca1e814a851 | 524 | |
APS_Lab | 0:8ca1e814a851 | 525 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 526 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 527 | } dn_ipmt_setParameter_macAddress_rpt; |
APS_Lab | 0:8ca1e814a851 | 528 | |
APS_Lab | 0:8ca1e814a851 | 529 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 530 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 531 | } dn_ipmt_setParameter_joinKey_rpt; |
APS_Lab | 0:8ca1e814a851 | 532 | |
APS_Lab | 0:8ca1e814a851 | 533 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 534 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 535 | } dn_ipmt_setParameter_networkId_rpt; |
APS_Lab | 0:8ca1e814a851 | 536 | |
APS_Lab | 0:8ca1e814a851 | 537 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 538 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 539 | } dn_ipmt_setParameter_txPower_rpt; |
APS_Lab | 0:8ca1e814a851 | 540 | |
APS_Lab | 0:8ca1e814a851 | 541 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 542 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 543 | } dn_ipmt_setParameter_joinDutyCycle_rpt; |
APS_Lab | 0:8ca1e814a851 | 544 | |
APS_Lab | 0:8ca1e814a851 | 545 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 546 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 547 | } dn_ipmt_setParameter_eventMask_rpt; |
APS_Lab | 0:8ca1e814a851 | 548 | |
APS_Lab | 0:8ca1e814a851 | 549 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 550 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 551 | } dn_ipmt_setParameter_OTAPLockout_rpt; |
APS_Lab | 0:8ca1e814a851 | 552 | |
APS_Lab | 0:8ca1e814a851 | 553 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 554 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 555 | } dn_ipmt_setParameter_routingMode_rpt; |
APS_Lab | 0:8ca1e814a851 | 556 | |
APS_Lab | 0:8ca1e814a851 | 557 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 558 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 559 | } dn_ipmt_setParameter_powerSrcInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 560 | |
APS_Lab | 0:8ca1e814a851 | 561 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 562 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 563 | } dn_ipmt_setParameter_advKey_rpt; |
APS_Lab | 0:8ca1e814a851 | 564 | |
APS_Lab | 0:8ca1e814a851 | 565 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 566 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 567 | } dn_ipmt_setParameter_autoJoin_rpt; |
APS_Lab | 0:8ca1e814a851 | 568 | |
APS_Lab | 0:8ca1e814a851 | 569 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 570 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 571 | uint8_t macAddress[8]; |
APS_Lab | 0:8ca1e814a851 | 572 | } dn_ipmt_getParameter_macAddress_rpt; |
APS_Lab | 0:8ca1e814a851 | 573 | |
APS_Lab | 0:8ca1e814a851 | 574 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 575 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 576 | uint16_t networkId; |
APS_Lab | 0:8ca1e814a851 | 577 | } dn_ipmt_getParameter_networkId_rpt; |
APS_Lab | 0:8ca1e814a851 | 578 | |
APS_Lab | 0:8ca1e814a851 | 579 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 580 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 581 | int8_t txPower; |
APS_Lab | 0:8ca1e814a851 | 582 | } dn_ipmt_getParameter_txPower_rpt; |
APS_Lab | 0:8ca1e814a851 | 583 | |
APS_Lab | 0:8ca1e814a851 | 584 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 585 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 586 | uint8_t joinDutyCycle; |
APS_Lab | 0:8ca1e814a851 | 587 | } dn_ipmt_getParameter_joinDutyCycle_rpt; |
APS_Lab | 0:8ca1e814a851 | 588 | |
APS_Lab | 0:8ca1e814a851 | 589 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 590 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 591 | uint32_t eventMask; |
APS_Lab | 0:8ca1e814a851 | 592 | } dn_ipmt_getParameter_eventMask_rpt; |
APS_Lab | 0:8ca1e814a851 | 593 | |
APS_Lab | 0:8ca1e814a851 | 594 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 595 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 596 | uint8_t apiVersion; |
APS_Lab | 0:8ca1e814a851 | 597 | uint8_t serialNumber[8]; |
APS_Lab | 0:8ca1e814a851 | 598 | uint8_t hwModel; |
APS_Lab | 0:8ca1e814a851 | 599 | uint8_t hwRev; |
APS_Lab | 0:8ca1e814a851 | 600 | uint8_t swVerMajor; |
APS_Lab | 0:8ca1e814a851 | 601 | uint8_t swVerMinor; |
APS_Lab | 0:8ca1e814a851 | 602 | uint8_t swVerPatch; |
APS_Lab | 0:8ca1e814a851 | 603 | uint16_t swVerBuild; |
APS_Lab | 0:8ca1e814a851 | 604 | uint8_t bootSwVer; |
APS_Lab | 0:8ca1e814a851 | 605 | } dn_ipmt_getParameter_moteInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 606 | |
APS_Lab | 0:8ca1e814a851 | 607 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 608 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 609 | uint8_t macAddress[8]; |
APS_Lab | 0:8ca1e814a851 | 610 | uint16_t moteId; |
APS_Lab | 0:8ca1e814a851 | 611 | uint16_t networkId; |
APS_Lab | 0:8ca1e814a851 | 612 | uint16_t slotSize; |
APS_Lab | 0:8ca1e814a851 | 613 | } dn_ipmt_getParameter_netInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 614 | |
APS_Lab | 0:8ca1e814a851 | 615 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 616 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 617 | uint8_t state; |
APS_Lab | 0:8ca1e814a851 | 618 | uint8_t reserved_0; |
APS_Lab | 0:8ca1e814a851 | 619 | uint16_t reserved_1; |
APS_Lab | 0:8ca1e814a851 | 620 | uint8_t numParents; |
APS_Lab | 0:8ca1e814a851 | 621 | uint32_t alarms; |
APS_Lab | 0:8ca1e814a851 | 622 | uint8_t reserved_2; |
APS_Lab | 0:8ca1e814a851 | 623 | } dn_ipmt_getParameter_moteStatus_rpt; |
APS_Lab | 0:8ca1e814a851 | 624 | |
APS_Lab | 0:8ca1e814a851 | 625 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 626 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 627 | uint32_t upTime; |
APS_Lab | 0:8ca1e814a851 | 628 | uint8_t utcSecs[8]; |
APS_Lab | 0:8ca1e814a851 | 629 | uint32_t utcUsecs; |
APS_Lab | 0:8ca1e814a851 | 630 | uint8_t asn[5]; |
APS_Lab | 0:8ca1e814a851 | 631 | uint16_t asnOffset; |
APS_Lab | 0:8ca1e814a851 | 632 | } dn_ipmt_getParameter_time_rpt; |
APS_Lab | 0:8ca1e814a851 | 633 | |
APS_Lab | 0:8ca1e814a851 | 634 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 635 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 636 | uint32_t qTotal; |
APS_Lab | 0:8ca1e814a851 | 637 | uint32_t upTime; |
APS_Lab | 0:8ca1e814a851 | 638 | int8_t tempInt; |
APS_Lab | 0:8ca1e814a851 | 639 | uint8_t tempFrac; |
APS_Lab | 0:8ca1e814a851 | 640 | } dn_ipmt_getParameter_charge_rpt; |
APS_Lab | 0:8ca1e814a851 | 641 | |
APS_Lab | 0:8ca1e814a851 | 642 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 643 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 644 | uint16_t rxOk; |
APS_Lab | 0:8ca1e814a851 | 645 | uint16_t rxFailed; |
APS_Lab | 0:8ca1e814a851 | 646 | } dn_ipmt_getParameter_testRadioRxStats_rpt; |
APS_Lab | 0:8ca1e814a851 | 647 | |
APS_Lab | 0:8ca1e814a851 | 648 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 649 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 650 | bool mode; |
APS_Lab | 0:8ca1e814a851 | 651 | } dn_ipmt_getParameter_OTAPLockout_rpt; |
APS_Lab | 0:8ca1e814a851 | 652 | |
APS_Lab | 0:8ca1e814a851 | 653 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 654 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 655 | uint16_t moteId; |
APS_Lab | 0:8ca1e814a851 | 656 | } dn_ipmt_getParameter_moteId_rpt; |
APS_Lab | 0:8ca1e814a851 | 657 | |
APS_Lab | 0:8ca1e814a851 | 658 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 659 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 660 | uint8_t ipv6Address[16]; |
APS_Lab | 0:8ca1e814a851 | 661 | } dn_ipmt_getParameter_ipv6Address_rpt; |
APS_Lab | 0:8ca1e814a851 | 662 | |
APS_Lab | 0:8ca1e814a851 | 663 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 664 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 665 | bool routingMode; |
APS_Lab | 0:8ca1e814a851 | 666 | } dn_ipmt_getParameter_routingMode_rpt; |
APS_Lab | 0:8ca1e814a851 | 667 | |
APS_Lab | 0:8ca1e814a851 | 668 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 669 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 670 | uint16_t vendorId; |
APS_Lab | 0:8ca1e814a851 | 671 | uint8_t appId; |
APS_Lab | 0:8ca1e814a851 | 672 | uint8_t appVer[5]; |
APS_Lab | 0:8ca1e814a851 | 673 | } dn_ipmt_getParameter_appInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 674 | |
APS_Lab | 0:8ca1e814a851 | 675 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 676 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 677 | uint16_t maxStCurrent; |
APS_Lab | 0:8ca1e814a851 | 678 | uint8_t minLifetime; |
APS_Lab | 0:8ca1e814a851 | 679 | uint16_t currentLimit_0; |
APS_Lab | 0:8ca1e814a851 | 680 | uint16_t dischargePeriod_0; |
APS_Lab | 0:8ca1e814a851 | 681 | uint16_t rechargePeriod_0; |
APS_Lab | 0:8ca1e814a851 | 682 | uint16_t currentLimit_1; |
APS_Lab | 0:8ca1e814a851 | 683 | uint16_t dischargePeriod_1; |
APS_Lab | 0:8ca1e814a851 | 684 | uint16_t rechargePeriod_1; |
APS_Lab | 0:8ca1e814a851 | 685 | uint16_t currentLimit_2; |
APS_Lab | 0:8ca1e814a851 | 686 | uint16_t dischargePeriod_2; |
APS_Lab | 0:8ca1e814a851 | 687 | uint16_t rechargePeriod_2; |
APS_Lab | 0:8ca1e814a851 | 688 | } dn_ipmt_getParameter_powerSrcInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 689 | |
APS_Lab | 0:8ca1e814a851 | 690 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 691 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 692 | bool autoJoin; |
APS_Lab | 0:8ca1e814a851 | 693 | } dn_ipmt_getParameter_autoJoin_rpt; |
APS_Lab | 0:8ca1e814a851 | 694 | |
APS_Lab | 0:8ca1e814a851 | 695 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 696 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 697 | } dn_ipmt_join_rpt; |
APS_Lab | 0:8ca1e814a851 | 698 | |
APS_Lab | 0:8ca1e814a851 | 699 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 700 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 701 | } dn_ipmt_disconnect_rpt; |
APS_Lab | 0:8ca1e814a851 | 702 | |
APS_Lab | 0:8ca1e814a851 | 703 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 704 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 705 | } dn_ipmt_reset_rpt; |
APS_Lab | 0:8ca1e814a851 | 706 | |
APS_Lab | 0:8ca1e814a851 | 707 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 708 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 709 | } dn_ipmt_lowPowerSleep_rpt; |
APS_Lab | 0:8ca1e814a851 | 710 | |
APS_Lab | 0:8ca1e814a851 | 711 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 712 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 713 | } dn_ipmt_testRadioRx_rpt; |
APS_Lab | 0:8ca1e814a851 | 714 | |
APS_Lab | 0:8ca1e814a851 | 715 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 716 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 717 | } dn_ipmt_clearNV_rpt; |
APS_Lab | 0:8ca1e814a851 | 718 | |
APS_Lab | 0:8ca1e814a851 | 719 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 720 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 721 | } dn_ipmt_requestService_rpt; |
APS_Lab | 0:8ca1e814a851 | 722 | |
APS_Lab | 0:8ca1e814a851 | 723 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 724 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 725 | uint16_t destAddr; |
APS_Lab | 0:8ca1e814a851 | 726 | uint8_t type; |
APS_Lab | 0:8ca1e814a851 | 727 | uint8_t state; |
APS_Lab | 0:8ca1e814a851 | 728 | uint32_t value; |
APS_Lab | 0:8ca1e814a851 | 729 | } dn_ipmt_getServiceInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 730 | |
APS_Lab | 0:8ca1e814a851 | 731 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 732 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 733 | uint8_t socketId; |
APS_Lab | 0:8ca1e814a851 | 734 | } dn_ipmt_openSocket_rpt; |
APS_Lab | 0:8ca1e814a851 | 735 | |
APS_Lab | 0:8ca1e814a851 | 736 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 737 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 738 | } dn_ipmt_closeSocket_rpt; |
APS_Lab | 0:8ca1e814a851 | 739 | |
APS_Lab | 0:8ca1e814a851 | 740 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 741 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 742 | } dn_ipmt_bindSocket_rpt; |
APS_Lab | 0:8ca1e814a851 | 743 | |
APS_Lab | 0:8ca1e814a851 | 744 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 745 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 746 | } dn_ipmt_sendTo_rpt; |
APS_Lab | 0:8ca1e814a851 | 747 | |
APS_Lab | 0:8ca1e814a851 | 748 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 749 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 750 | } dn_ipmt_search_rpt; |
APS_Lab | 0:8ca1e814a851 | 751 | |
APS_Lab | 0:8ca1e814a851 | 752 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 753 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 754 | } dn_ipmt_testRadioTxExt_rpt; |
APS_Lab | 0:8ca1e814a851 | 755 | |
APS_Lab | 0:8ca1e814a851 | 756 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 757 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 758 | } dn_ipmt_zeroize_rpt; |
APS_Lab | 0:8ca1e814a851 | 759 | |
APS_Lab | 0:8ca1e814a851 | 760 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 761 | uint8_t RC; |
APS_Lab | 0:8ca1e814a851 | 762 | uint8_t index; |
APS_Lab | 0:8ca1e814a851 | 763 | uint8_t socketId; |
APS_Lab | 0:8ca1e814a851 | 764 | uint8_t protocol; |
APS_Lab | 0:8ca1e814a851 | 765 | uint8_t bindState; |
APS_Lab | 0:8ca1e814a851 | 766 | uint16_t port; |
APS_Lab | 0:8ca1e814a851 | 767 | } dn_ipmt_socketInfo_rpt; |
APS_Lab | 0:8ca1e814a851 | 768 | |
APS_Lab | 0:8ca1e814a851 | 769 | //=== notification types |
APS_Lab | 0:8ca1e814a851 | 770 | |
APS_Lab | 0:8ca1e814a851 | 771 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 772 | uint32_t uptime; |
APS_Lab | 0:8ca1e814a851 | 773 | uint8_t utcSecs[8]; |
APS_Lab | 0:8ca1e814a851 | 774 | uint32_t utcUsecs; |
APS_Lab | 0:8ca1e814a851 | 775 | uint8_t asn[5]; |
APS_Lab | 0:8ca1e814a851 | 776 | uint16_t asnOffset; |
APS_Lab | 0:8ca1e814a851 | 777 | } dn_ipmt_timeIndication_nt; |
APS_Lab | 0:8ca1e814a851 | 778 | |
APS_Lab | 0:8ca1e814a851 | 779 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 780 | uint32_t events; |
APS_Lab | 0:8ca1e814a851 | 781 | uint8_t state; |
APS_Lab | 0:8ca1e814a851 | 782 | uint32_t alarmsList; |
APS_Lab | 0:8ca1e814a851 | 783 | } dn_ipmt_events_nt; |
APS_Lab | 0:8ca1e814a851 | 784 | |
APS_Lab | 0:8ca1e814a851 | 785 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 786 | uint8_t socketId; |
APS_Lab | 0:8ca1e814a851 | 787 | uint8_t srcAddr[16]; |
APS_Lab | 0:8ca1e814a851 | 788 | uint16_t srcPort; |
APS_Lab | 0:8ca1e814a851 | 789 | uint8_t payloadLen; |
APS_Lab | 0:8ca1e814a851 | 790 | uint8_t payload[MAX_FRAME_LENGTH]; |
APS_Lab | 0:8ca1e814a851 | 791 | } dn_ipmt_receive_nt; |
APS_Lab | 0:8ca1e814a851 | 792 | |
APS_Lab | 0:8ca1e814a851 | 793 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 794 | uint8_t payload[MAX_FRAME_LENGTH]; |
APS_Lab | 0:8ca1e814a851 | 795 | } dn_ipmt_macRx_nt; |
APS_Lab | 0:8ca1e814a851 | 796 | |
APS_Lab | 0:8ca1e814a851 | 797 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 798 | uint16_t packetId; |
APS_Lab | 0:8ca1e814a851 | 799 | uint8_t status; |
APS_Lab | 0:8ca1e814a851 | 800 | } dn_ipmt_txDone_nt; |
APS_Lab | 0:8ca1e814a851 | 801 | |
APS_Lab | 0:8ca1e814a851 | 802 | typedef struct { |
APS_Lab | 0:8ca1e814a851 | 803 | uint16_t netId; |
APS_Lab | 0:8ca1e814a851 | 804 | uint16_t moteId; |
APS_Lab | 0:8ca1e814a851 | 805 | int8_t rssi; |
APS_Lab | 0:8ca1e814a851 | 806 | uint8_t joinPri; |
APS_Lab | 0:8ca1e814a851 | 807 | } dn_ipmt_advReceived_nt; |
APS_Lab | 0:8ca1e814a851 | 808 | |
APS_Lab | 0:8ca1e814a851 | 809 | //=== callback signature |
APS_Lab | 0:8ca1e814a851 | 810 | typedef void (*dn_ipmt_notif_cbt)(uint8_t cmdId, uint8_t subCmdId); |
APS_Lab | 0:8ca1e814a851 | 811 | typedef void (*dn_ipmt_reply_cbt)(uint8_t cmdId); |
APS_Lab | 0:8ca1e814a851 | 812 | typedef void (*dn_ipmt_status_cbt)(uint8_t newStatus); // only used in SmartMesh IP manager |
APS_Lab | 0:8ca1e814a851 | 813 | |
APS_Lab | 0:8ca1e814a851 | 814 | //=========================== variables ======================================= |
APS_Lab | 0:8ca1e814a851 | 815 | |
APS_Lab | 0:8ca1e814a851 | 816 | //=========================== prototypes ====================================== |
APS_Lab | 0:8ca1e814a851 | 817 | |
APS_Lab | 0:8ca1e814a851 | 818 | #ifdef __cplusplus |
APS_Lab | 0:8ca1e814a851 | 819 | extern "C" { |
APS_Lab | 0:8ca1e814a851 | 820 | #endif |
APS_Lab | 0:8ca1e814a851 | 821 | |
APS_Lab | 0:8ca1e814a851 | 822 | //==== admin |
APS_Lab | 0:8ca1e814a851 | 823 | void dn_ipmt_init(dn_ipmt_notif_cbt notifCb, uint8_t* notifBuf, uint8_t notifBufLen, dn_ipmt_reply_cbt replyCb); |
APS_Lab | 0:8ca1e814a851 | 824 | void dn_ipmt_cancelTx(); |
APS_Lab | 0:8ca1e814a851 | 825 | |
APS_Lab | 0:8ca1e814a851 | 826 | |
APS_Lab | 0:8ca1e814a851 | 827 | //==== API |
APS_Lab | 0:8ca1e814a851 | 828 | dn_err_t dn_ipmt_setParameter_macAddress(uint8_t* macAddress, dn_ipmt_setParameter_macAddress_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 829 | dn_err_t dn_ipmt_setParameter_joinKey(uint8_t* joinKey, dn_ipmt_setParameter_joinKey_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 830 | dn_err_t dn_ipmt_setParameter_networkId(uint16_t networkId, dn_ipmt_setParameter_networkId_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 831 | dn_err_t dn_ipmt_setParameter_txPower(int8_t txPower, dn_ipmt_setParameter_txPower_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 832 | dn_err_t dn_ipmt_setParameter_joinDutyCycle(uint8_t dutyCycle, dn_ipmt_setParameter_joinDutyCycle_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 833 | dn_err_t dn_ipmt_setParameter_eventMask(uint32_t eventMask, dn_ipmt_setParameter_eventMask_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 834 | dn_err_t dn_ipmt_setParameter_OTAPLockout(bool mode, dn_ipmt_setParameter_OTAPLockout_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 835 | dn_err_t dn_ipmt_setParameter_routingMode(bool mode, dn_ipmt_setParameter_routingMode_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 836 | dn_err_t dn_ipmt_setParameter_powerSrcInfo(uint16_t maxStCurrent, uint8_t minLifetime, uint16_t currentLimit_0, uint16_t dischargePeriod_0, uint16_t rechargePeriod_0, uint16_t currentLimit_1, uint16_t dischargePeriod_1, uint16_t rechargePeriod_1, uint16_t currentLimit_2, uint16_t dischargePeriod_2, uint16_t rechargePeriod_2, dn_ipmt_setParameter_powerSrcInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 837 | dn_err_t dn_ipmt_setParameter_advKey(uint8_t* advKey, dn_ipmt_setParameter_advKey_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 838 | dn_err_t dn_ipmt_setParameter_autoJoin(bool mode, dn_ipmt_setParameter_autoJoin_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 839 | dn_err_t dn_ipmt_getParameter_macAddress(dn_ipmt_getParameter_macAddress_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 840 | dn_err_t dn_ipmt_getParameter_networkId(dn_ipmt_getParameter_networkId_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 841 | dn_err_t dn_ipmt_getParameter_txPower(dn_ipmt_getParameter_txPower_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 842 | dn_err_t dn_ipmt_getParameter_joinDutyCycle(dn_ipmt_getParameter_joinDutyCycle_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 843 | dn_err_t dn_ipmt_getParameter_eventMask(dn_ipmt_getParameter_eventMask_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 844 | dn_err_t dn_ipmt_getParameter_moteInfo(dn_ipmt_getParameter_moteInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 845 | dn_err_t dn_ipmt_getParameter_netInfo(dn_ipmt_getParameter_netInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 846 | dn_err_t dn_ipmt_getParameter_moteStatus(dn_ipmt_getParameter_moteStatus_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 847 | dn_err_t dn_ipmt_getParameter_time(dn_ipmt_getParameter_time_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 848 | dn_err_t dn_ipmt_getParameter_charge(dn_ipmt_getParameter_charge_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 849 | dn_err_t dn_ipmt_getParameter_testRadioRxStats(dn_ipmt_getParameter_testRadioRxStats_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 850 | dn_err_t dn_ipmt_getParameter_OTAPLockout(dn_ipmt_getParameter_OTAPLockout_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 851 | dn_err_t dn_ipmt_getParameter_moteId(dn_ipmt_getParameter_moteId_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 852 | dn_err_t dn_ipmt_getParameter_ipv6Address(dn_ipmt_getParameter_ipv6Address_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 853 | dn_err_t dn_ipmt_getParameter_routingMode(dn_ipmt_getParameter_routingMode_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 854 | dn_err_t dn_ipmt_getParameter_appInfo(dn_ipmt_getParameter_appInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 855 | dn_err_t dn_ipmt_getParameter_powerSrcInfo(dn_ipmt_getParameter_powerSrcInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 856 | dn_err_t dn_ipmt_getParameter_autoJoin(dn_ipmt_getParameter_autoJoin_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 857 | dn_err_t dn_ipmt_join(dn_ipmt_join_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 858 | dn_err_t dn_ipmt_disconnect(dn_ipmt_disconnect_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 859 | dn_err_t dn_ipmt_reset(dn_ipmt_reset_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 860 | dn_err_t dn_ipmt_lowPowerSleep(dn_ipmt_lowPowerSleep_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 861 | dn_err_t dn_ipmt_testRadioRx(uint16_t channelMask, uint16_t time, uint8_t stationId, dn_ipmt_testRadioRx_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 862 | dn_err_t dn_ipmt_clearNV(dn_ipmt_clearNV_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 863 | dn_err_t dn_ipmt_requestService(uint16_t destAddr, uint8_t serviceType, uint32_t value, dn_ipmt_requestService_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 864 | dn_err_t dn_ipmt_getServiceInfo(uint16_t destAddr, uint8_t type, dn_ipmt_getServiceInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 865 | dn_err_t dn_ipmt_openSocket(uint8_t protocol, dn_ipmt_openSocket_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 866 | dn_err_t dn_ipmt_closeSocket(uint8_t socketId, dn_ipmt_closeSocket_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 867 | dn_err_t dn_ipmt_bindSocket(uint8_t socketId, uint16_t port, dn_ipmt_bindSocket_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 868 | dn_err_t dn_ipmt_sendTo(uint8_t socketId, uint8_t* destIP, uint16_t destPort, uint8_t serviceType, uint8_t priority, uint16_t packetId, uint8_t* payload, uint8_t payloadLen, dn_ipmt_sendTo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 869 | dn_err_t dn_ipmt_search(dn_ipmt_search_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 870 | dn_err_t dn_ipmt_testRadioTxExt(uint8_t testType, uint16_t chanMask, uint16_t repeatCnt, int8_t txPower, uint8_t seqSize, uint8_t pkLen_1, uint16_t delay_1, uint8_t pkLen_2, uint16_t delay_2, uint8_t pkLen_3, uint16_t delay_3, uint8_t pkLen_4, uint16_t delay_4, uint8_t pkLen_5, uint16_t delay_5, uint8_t pkLen_6, uint16_t delay_6, uint8_t pkLen_7, uint16_t delay_7, uint8_t pkLen_8, uint16_t delay_8, uint8_t pkLen_9, uint16_t delay_9, uint8_t pkLen_10, uint16_t delay_10, uint8_t stationId, dn_ipmt_testRadioTxExt_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 871 | dn_err_t dn_ipmt_zeroize(dn_ipmt_zeroize_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 872 | dn_err_t dn_ipmt_socketInfo(uint8_t index, dn_ipmt_socketInfo_rpt* reply); |
APS_Lab | 0:8ca1e814a851 | 873 | |
APS_Lab | 0:8ca1e814a851 | 874 | #ifdef __cplusplus |
APS_Lab | 0:8ca1e814a851 | 875 | } |
APS_Lab | 0:8ca1e814a851 | 876 | #endif |
APS_Lab | 0:8ca1e814a851 | 877 | |
APS_Lab | 0:8ca1e814a851 | 878 | #endif |
APS_Lab | 0:8ca1e814a851 | 879 |