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