├── API_includes ├── ZW_SerialAPI.h ├── ZW_basis_api.h ├── ZW_classcmd.h ├── ZW_controller_api.h ├── ZW_controller_bridge_api.h ├── ZW_controller_static_api.h ├── ZW_firmware_bootloader_defs.h ├── ZW_firmware_descriptor.h ├── ZW_firmware_update_nvm_api.h ├── ZW_flash_api.h ├── ZW_network_management_api.h ├── ZW_nvm_descriptor.h ├── ZW_nvm_ext_api.h ├── ZW_ota_compression_header.h ├── ZW_security_api.h ├── ZW_slave_api.h ├── ZW_slave_routing_api.h └── ZW_transport_api.h ├── Application Notes ├── APL12955-Z-Wave-Multi-Channel-Basics.pdf ├── APL12957-Z-Wave-Battery-Support-Basics.pdf ├── APL13031-Z-Wave-Networking-Basics.pdf ├── APL13084-Z-Wave-Control-Application-Basics.pdf ├── APL13128-Z-Wave-Time-Date-Basics.pdf ├── APL13475-Z-Wave-Development-Basics.pdf ├── INS14259-Z-Wave Plus V2 Application Framework SDK7.pdf ├── an1085-gecko-bootloader-connect.pdf ├── an1135-using-third-generation-nonvolatile-memory.pdf └── ug103-07-non-volatile-data-storage-fundamentals.pdf ├── Legacy Specifications ├── 500 Series Application Programmers Guide.pdf ├── 500 Series Serial API Specs.pdf ├── Z-Wave Device Class Specification.pdf ├── Z-Wave Specification AWG V1.0.pdf ├── Z-Wave Specification AWG V2.0.pdf ├── Z-Wave Specification AWG V3.0.pdf └── ZWA_Z-Wave Plus Device Type Specification 33.0.0.pdf ├── NIST.SP.800-38a.pdf ├── NIST.SP.800-38c.pdf ├── NIST.SP.800-90Ar1.pdf ├── Registries ├── Association Command Class, list of mandatory commands for the Lifeline Association Group.xlsx ├── Indicator Command Class, list of assigned indicators and Property IDs.xlsx ├── Meter Table Monitor Command Class, list of assigned types, scales and datasets.xlsx ├── Multilevel Sensor Command Class, list of assigned Multilevel Sensor types and scales.xlsx ├── Notification Command Class, list of assigned Notifications.xlsx ├── SDS14622 Anti-Theft Command Class, list of assigned Locking Entity IDs.xlsx ├── Simple AV Command Class, list of assigned AV Control codes.xlsx ├── Z-Wave Manufacturer ID List.xlsx └── Z-Wave Plus Assigned Icon Types.xlsx ├── SDS10865-Z-Wave-Application-Security-Layer-S0.pdf ├── SmartStart Specifications ├── Node Provisioning Information Type Registry.pdf └── Node Provisioning QR Code Format.pdf ├── T-REC-G.9959-201501.pdf ├── Z-Wave Command Classes Specifications ├── List of defined Z-Wave Command Classes.xlsx └── Z-Wave Command Class Control Test Specification.pdf ├── Z-Wave Device and Command Class Definition Files └── Z-Wave XML File.pdf ├── Z-Wave Plus v2 Specifications └── Z-Wave Plus v2 Device Type Test Specification.pdf ├── Z-Wave Specification AWG V5.0.pdf ├── Z-Wave Stack Specifications ├── Z-Wave Host API Specification.pdf ├── Z-Wave Long Range MAC Layer Test Specification.pdf ├── Z-Wave Long Range Network Layer Test Specification.pdf ├── Z-Wave Long Range PHY Layer Test Specification.pdf ├── Z-Wave Long Range PHY and MAC Layer Specification.pdf ├── Z-Wave MAC Layer Test Specification.pdf ├── Z-Wave Network Layer Test Specification.pdf ├── Z-Wave PHY Layer Test Specification.pdf └── Z-Wave and Z-Wave Long Range Network Layer Specification.pdf └── ccm.pdf /API_includes/ZW_SerialAPI.h: -------------------------------------------------------------------------------- 1 | /***************************** ZW_SERIALAPI.H ***************************** 2 | * 3 | * Z-Wave, the wireless language. 4 | * 5 | * Copyright (c) 2001-2012 6 | * Sigma Designs 7 | * 8 | * All Rights Reserved 9 | * 10 | * This source file is subject to the terms and conditions of the 11 | * Sigma Design Software License Agreement which restricts the manner 12 | * in which it may be used. 13 | * 14 | *--------------------------------------------------------------------------- 15 | * 16 | * Description: Serial API 17 | * 18 | * Last Changed By: $Author: jsi $ 19 | * Revision: $Revision: 31344 $ 20 | * Last Changed: $Date: 2015-04-17 13:53:23 +0200 (fr, 17 apr 2015) $ 21 | * 22 | ****************************************************************************/ 23 | #ifndef _ZW_SERIALAPI_H_ 24 | #define _ZW_SERIALAPI_H_ 25 | 26 | /****************************************************************************/ 27 | /* INCLUDE FILES */ 28 | /****************************************************************************/ 29 | 30 | 31 | /****************************************************************************/ 32 | /* EXPORTED TYPES and DEFINITIONS */ 33 | /****************************************************************************/ 34 | 35 | #define SOF 0x01 /* Start Of Frame */ 36 | #define ACK 0x06 /* Acknowledge successfull frame reception */ 37 | #define NAK 0x15 /* Not Acknowledge successfull frame reception - please retransmit... */ 38 | #define CAN 0x18 /* Frame received (from host) was dropped - waiting for ACK */ 39 | 40 | /* Frame types */ 41 | #define REQUEST 0x00 42 | #define RESPONSE 0x01 43 | 44 | /* Flags used in FUNC_ID_SERIAL_API_GET_INIT_DATA functionality */ 45 | #define GET_INIT_DATA_FLAG_SLAVE_API 0x01 46 | #define GET_INIT_DATA_FLAG_TIMER_SUPPORT 0x02 47 | #define GET_INIT_DATA_FLAG_CONTROLLER_STATUS 0x04 /* Obsolete. USE next */ 48 | #define GET_INIT_DATA_FLAG_SECONDARY_CTRL 0x04 49 | #define GET_INIT_DATA_FLAG_IS_SUC 0x08 50 | 51 | /* Firmware update functionality specifics */ 52 | /* Enum definitions for Firmware Update functionality selector; firmwareUpdateFunction */ 53 | typedef enum 54 | { 55 | FIRMWARE_UPDATE_NVM_INIT = 0, 56 | FIRMWARE_UPDATE_NVM_SET_NEW_IMAGE = 1, 57 | FIRMWARE_UPDATE_NVM_GET_NEW_IMAGE = 2, 58 | FIRMWARE_UPDATE_NVM_UPDATE_CRC16 = 3, 59 | FIRMWARE_UPDATE_NVM_IS_VALID_CRC16 = 4, 60 | FIRMWARE_UPDATE_NVM_WRITE = 5, 61 | FIRMWARE_UPDATE_NVM_UNKNOWN = 0xFF 62 | } FIRMWARE_UPDATE_NVM_T; 63 | 64 | /* Function IDs */ 65 | #define FUNC_ID_SERIAL_API_GET_INIT_DATA 0x02 66 | #define FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION 0x03 67 | #define FUNC_ID_APPLICATION_COMMAND_HANDLER 0x04 68 | #define FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES 0x05 69 | 70 | /* SERIAL API ver 4 added - START */ 71 | #define FUNC_ID_SERIAL_API_SET_TIMEOUTS 0x06 72 | #define FUNC_ID_SERIAL_API_GET_CAPABILITIES 0x07 73 | #define FUNC_ID_SERIAL_API_SOFT_RESET 0x08 74 | /* SERIAL API ver 4 added - END */ 75 | 76 | #define FUNC_ID_ZW_GET_PROTOCOL_VERSION 0x09 77 | 78 | /* Function ID for startup message */ 79 | #define FUNC_ID_SERIAL_API_STARTED 0x0A 80 | #define FUNC_ID_SERIAL_API_SETUP 0x0B 81 | 82 | #define FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION_CMD_CLASSES 0x0C 83 | 84 | #define FUNC_ID_ZW_SEND_DATA_EX 0x0E 85 | #define FUNC_ID_ZW_SEND_DATA_MULTI_EX 0x0F 86 | 87 | #define FUNC_ID_ZW_SET_RF_RECEIVE_MODE 0x10 88 | #define FUNC_ID_ZW_SET_SLEEP_MODE 0x11 89 | #define FUNC_ID_ZW_SEND_NODE_INFORMATION 0x12 90 | #define FUNC_ID_ZW_SEND_DATA 0x13 91 | #define FUNC_ID_ZW_SEND_DATA_MULTI 0x14 92 | #define FUNC_ID_ZW_GET_VERSION 0x15 93 | 94 | /* SERIAL API ver 4 added - START */ 95 | #define FUNC_ID_ZW_SEND_DATA_ABORT 0x16 96 | #define FUNC_ID_ZW_RF_POWER_LEVEL_SET 0x17 97 | #define FUNC_ID_ZW_SEND_DATA_META 0x18 98 | /* SERIAL API ver 4 added - END */ 99 | 100 | #define FUNC_ID_ZW_RESERVED_SD 0x19 101 | #define FUNC_ID_ZW_RESERVED_SDM 0x1A 102 | #define FUNC_ID_ZW_RESERVED_SRI 0x1B 103 | 104 | #define FUNC_ID_ZW_SET_ROUTING_INFO 0x1B 105 | 106 | #define FUNC_ID_ZW_GET_RANDOM 0x1C 107 | #define FUNC_ID_ZW_RANDOM 0x1D 108 | #define FUNC_ID_ZW_RF_POWER_LEVEL_REDISCOVERY_SET 0x1E 109 | 110 | #define FUNC_ID_MEMORY_GET_ID 0x20 111 | #define FUNC_ID_MEMORY_GET_BYTE 0x21 112 | #define FUNC_ID_MEMORY_PUT_BYTE 0x22 113 | #define FUNC_ID_MEMORY_GET_BUFFER 0x23 114 | #define FUNC_ID_MEMORY_PUT_BUFFER 0x24 115 | /* Unimplemented - START */ 116 | #define FUNC_ID_SERIAL_API_GET_APPL_HOST_MEMORY_OFFSET 0x25 117 | #define FUNC_ID_DEBUG_OUTPUT 0x26 118 | /* Unimplemented - END */ 119 | 120 | #define FUNC_ID_AUTO_PROGRAMMING 0x27 121 | 122 | #define FUNC_ID_NVR_GET_VALUE 0x28 123 | 124 | #define FUNC_ID_NVM_GET_ID 0x29 125 | #define FUNC_ID_NVM_EXT_READ_LONG_BUFFER 0x2A 126 | #define FUNC_ID_NVM_EXT_WRITE_LONG_BUFFER 0x2B 127 | #define FUNC_ID_NVM_EXT_READ_LONG_BYTE 0x2C 128 | #define FUNC_ID_NVM_EXT_WRITE_LONG_BYTE 0x2D 129 | #define FUNC_ID_NVM_BACKUP_RESTORE 0x2E 130 | 131 | #define FUNC_ID_ZW_NVR_GET_APP_VALUE 0x2F 132 | 133 | #define FUNC_ID_CLOCK_SET 0x30 134 | #define FUNC_ID_CLOCK_GET 0x31 135 | #define FUNC_ID_CLOCK_CMP 0x32 136 | #define FUNC_ID_RTC_TIMER_CREATE 0x33 137 | #define FUNC_ID_RTC_TIMER_READ 0x34 138 | #define FUNC_ID_RTC_TIMER_DELETE 0x35 139 | #define FUNC_ID_RTC_TIMER_CALL 0x36 140 | 141 | #define FUNC_ID_CLEAR_TX_TIMERS 0x37 142 | #define FUNC_ID_GET_TX_TIMERS 0x38 143 | 144 | #define FUNC_ID_ZW_CLEAR_NETWORK_STATS 0x39 145 | #define FUNC_ID_ZW_GET_NETWORK_STATS 0x3A 146 | #define FUNC_ID_ZW_GET_BACKGROUND_RSSI 0x3B 147 | #define FUNC_ID_ZW_SET_LISTEN_BEFORE_TALK_THRESHOLD 0x3C 148 | #define FUNC_ID_ZW_REMOVE_NODE_ID_FROM_NETWORK 0x3F 149 | 150 | #define FUNC_ID_ZW_SET_LEARN_NODE_STATE 0x40 151 | #define FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO 0x41 152 | #define FUNC_ID_ZW_SET_DEFAULT 0x42 153 | #define FUNC_ID_ZW_NEW_CONTROLLER 0x43 154 | #define FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE 0x44 155 | #define FUNC_ID_ZW_REPLICATION_SEND_DATA 0x45 156 | #define FUNC_ID_ZW_ASSIGN_RETURN_ROUTE 0x46 157 | #define FUNC_ID_ZW_DELETE_RETURN_ROUTE 0x47 158 | #define FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE 0x48 159 | #define FUNC_ID_ZW_APPLICATION_UPDATE 0x49 160 | 161 | /*Obsolete use ZW_APPLICATION_UPDATE */ 162 | #define FUNC_ID_ZW_APPLICATION_CONTROLLER_UPDATE 0x49 163 | 164 | #define FUNC_ID_ZW_ADD_NODE_TO_NETWORK 0x4A 165 | #define FUNC_ID_ZW_REMOVE_NODE_FROM_NETWORK 0x4B 166 | #define FUNC_ID_ZW_CREATE_NEW_PRIMARY 0x4C 167 | #define FUNC_ID_ZW_CONTROLLER_CHANGE 0x4D 168 | 169 | #define FUNC_ID_ZW_RESERVED_FN 0x4E 170 | 171 | /* Devkit 6.6x */ 172 | #define FUNC_ID_ZW_ASSIGN_PRIORITY_RETURN_ROUTE 0x4F 173 | 174 | /* Slave only */ 175 | #define FUNC_ID_ZW_SET_LEARN_MODE 0x50 176 | /* Slave only end */ 177 | 178 | #define FUNC_ID_ZW_ASSIGN_SUC_RETURN_ROUTE 0x51 179 | #define FUNC_ID_ZW_ENABLE_SUC 0x52 180 | #define FUNC_ID_ZW_REQUEST_NETWORK_UPDATE 0x53 181 | #define FUNC_ID_ZW_SET_SUC_NODE_ID 0x54 182 | #define FUNC_ID_ZW_DELETE_SUC_RETURN_ROUTE 0x55 183 | #define FUNC_ID_ZW_GET_SUC_NODE_ID 0x56 184 | #define FUNC_ID_ZW_SEND_SUC_ID 0x57 185 | 186 | /* Devkit 6.6x */ 187 | #define FUNC_ID_ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE 0x58 188 | 189 | /* Obsolete - Not available in devkit 6.6x+ */ 190 | #define FUNC_ID_ZW_REDISCOVERY_NEEDED 0x59 191 | 192 | #define FUNC_ID_ZW_REQUEST_NODE_NEIGHBOR_UPDATE_OPTION 0x5A 193 | 194 | /* Slave only */ 195 | #define FUNC_ID_ZW_SUPPORT9600_ONLY 0x5B 196 | /* Slave only end */ 197 | 198 | /* Enhanced/Routing Slave only */ 199 | #define FUNC_ID_ZW_REQUEST_NEW_ROUTE_DESTINATIONS 0x5C 200 | #define FUNC_ID_ZW_IS_NODE_WITHIN_DIRECT_RANGE 0x5D 201 | /* Enhanced/Routing Slave only end */ 202 | 203 | #define FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION 0x5E 204 | #define FUNC_ID_ZW_EXPLORE_REQUEST_EXCLUSION 0x5F 205 | 206 | #define FUNC_ID_ZW_REQUEST_NODE_INFO 0x60 207 | #define FUNC_ID_ZW_REMOVE_FAILED_NODE_ID 0x61 208 | #define FUNC_ID_ZW_IS_FAILED_NODE_ID 0x62 209 | #define FUNC_ID_ZW_REPLACE_FAILED_NODE 0x63 210 | 211 | /* In 6.0x the function id was wrong so we need to support this wrong function id as well in the future */ 212 | #define FUNC_ID_ZW_SET_ROUTING_MAX_6_00 0x65 213 | /* */ 214 | 215 | #define FUNC_ID_ZW_IS_PRIMARY_CTRL 0x66 216 | 217 | #define FUNC_ID_ZW_AES_ECB 0x67 218 | 219 | #define FUNC_ID_TIMER_START 0x70 220 | #define FUNC_ID_TIMER_RESTART 0x71 221 | #define FUNC_ID_TIMER_CANCEL 0x72 222 | #define FUNC_ID_TIMER_CALL 0x73 223 | 224 | /* Firmware Update API */ 225 | #define FUNC_ID_ZW_FIRMWARE_UPDATE_NVM 0x78 226 | 227 | /* Installer API */ 228 | #define FUNC_ID_GET_ROUTING_TABLE_LINE 0x80 229 | #define FUNC_ID_GET_TX_COUNTER 0x81 230 | #define FUNC_ID_RESET_TX_COUNTER 0x82 231 | #define FUNC_ID_STORE_NODEINFO 0x83 232 | #define FUNC_ID_STORE_HOMEID 0x84 233 | /* Installer API only end */ 234 | 235 | #define FUNC_ID_LOCK_ROUTE_RESPONSE 0x90 236 | #ifdef ZW_ROUTING_DEMO 237 | #define FUNC_ID_ZW_SEND_DATA_ROUTE_DEMO 0x91 238 | #endif 239 | 240 | /* ZW_SetPriorityRoute/ZW_GetPriorityRoute replaces ZW_SetLastWorkingRoute/ZW_GetLastWorkingRoute */ 241 | #define FUNC_ID_ZW_GET_PRIORITY_ROUTE 0x92 242 | #define FUNC_ID_ZW_SET_PRIORITY_ROUTE 0x93 243 | /* NOTE: Obsoleted - BEGIN */ 244 | #define FUNC_ID_ZW_GET_LAST_WORKING_ROUTE 0x92 245 | #define FUNC_ID_ZW_SET_LAST_WORKING_ROUTE 0x93 246 | /* NOTE: Obsoleted - END */ 247 | 248 | #define FUNC_ID_SERIAL_API_TEST 0x95 249 | 250 | #define FUNC_ID_SERIAL_API_EXT 0x98 251 | 252 | /* DevKit 6.7x introduced - slave_enhanced_232 and slave_routing only */ 253 | #define FUNC_ID_ZW_SECURITY_SETUP 0x9C 254 | #define FUNC_ID_APPLICATION_SECURITY_EVENT 0x9D 255 | 256 | /* ZW_CONTROLLER_BRIDGE only START */ 257 | #define FUNC_ID_SERIAL_API_APPL_SLAVE_NODE_INFORMATION 0xA0 258 | /* OBSOLETE: In DevKit 4.5x/6.0x Controller Bridge applications, this is obsoleted */ 259 | /* by the FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE */ 260 | #define FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER 0xA1 261 | #define FUNC_ID_ZW_SEND_SLAVE_NODE_INFORMATION 0xA2 262 | #define FUNC_ID_ZW_SEND_SLAVE_DATA 0xA3 263 | #define FUNC_ID_ZW_SET_SLAVE_LEARN_MODE 0xA4 264 | #define FUNC_ID_ZW_GET_VIRTUAL_NODES 0xA5 265 | #define FUNC_ID_ZW_IS_VIRTUAL_NODE 0xA6 266 | #define FUNC_ID_ZW_RESERVED_SSD 0xA7 267 | /* DevKit 4.5x/6.0x added - obsoletes FUNC_ID_APPLICATION_SLAVE_COMMAND_HANDLER and */ 268 | /* FUNC_ID_APPLICATION_COMMAND_HANDLER for the Controller Bridge applications as */ 269 | /* this handles both cases - only for 4.5x/6.0x based Controller Bridge applications */ 270 | #define FUNC_ID_APPLICATION_COMMAND_HANDLER_BRIDGE 0xA8 271 | /* DevKit 4.5x/6.0x added - Adds sourceNodeID to the parameter list */ 272 | #define FUNC_ID_ZW_SEND_DATA_BRIDGE 0xA9 273 | /* Obsolete */ 274 | #define FUNC_ID_ZW_SEND_DATA_META_BRIDGE 0xAA 275 | #define FUNC_ID_ZW_SEND_DATA_MULTI_BRIDGE 0xAB 276 | /* ZW_CONTROLLER_BRIDGE only END */ 277 | 278 | #define FUNC_ID_PWR_SETSTOPMODE 0xB0 // ZW102 only 279 | #define FUNC_ID_PWR_CLK_PD 0xB1 // ZW102 only 280 | #define FUNC_ID_PWR_CLK_PUP 0xB2 // ZW102 only 281 | #define FUNC_ID_PWR_SELECT_CLK 0xB3 // ZW102 only 282 | #define FUNC_ID_ZW_SET_WUT_TIMEOUT 0xB4 283 | #define FUNC_ID_ZW_IS_WUT_KICKED 0xB5 // ZW201 only 284 | 285 | #define FUNC_ID_ZW_WATCHDOG_ENABLE 0xB6 286 | #define FUNC_ID_ZW_WATCHDOG_DISABLE 0xB7 287 | #define FUNC_ID_ZW_WATCHDOG_KICK 0xB8 288 | /* Obsolete use FUNC_ID_ZW_INT_EXT_LEVEL_SET */ 289 | #define FUNC_ID_ZW_SET_EXT_INT_LEVEL 0xB9 // ZW201 only 290 | #define FUNC_ID_ZW_INT_EXT_LEVEL_SET 0xB9 291 | 292 | #define FUNC_ID_ZW_RF_POWER_LEVEL_GET 0xBA 293 | #define FUNC_ID_ZW_GET_NEIGHBOR_COUNT 0xBB 294 | #define FUNC_ID_ZW_ARE_NODES_NEIGHBOURS 0xBC 295 | 296 | #define FUNC_ID_ZW_TYPE_LIBRARY 0xBD 297 | #define FUNC_ID_ZW_SEND_TEST_FRAME 0xBE 298 | #define FUNC_ID_ZW_GET_PROTOCOL_STATUS 0xBF 299 | 300 | #define FUNC_ID_ZW_SET_PROMISCUOUS_MODE 0xD0 301 | /* SERIAL API ver 5 added - START */ 302 | #define FUNC_ID_PROMISCUOUS_APPLICATION_COMMAND_HANDLER 0xD1 303 | /* SERIAL API ver 5 added - END */ 304 | 305 | #define FUNC_ID_ZW_WATCHDOG_START 0xD2 306 | #define FUNC_ID_ZW_WATCHDOG_STOP 0xD3 307 | 308 | #define FUNC_ID_ZW_SET_ROUTING_MAX 0xD4 309 | /* Unimplemented - START */ 310 | /* Obsoleted */ 311 | #define FUNC_ID_ZW_GET_ROUTING_MAX 0xD5 312 | /* Unimplemented - END */ 313 | 314 | /* Allocated for setting the maximum number of 128sec ticks inbetween SmartStart inclusion requests. */ 315 | #define FUNC_ID_ZW_NETWORK_MANAGEMENT_SET_MAX_INCLUSION_REQUEST_INTERVALS 0xD6 316 | 317 | /* Allocated for NUNIT test */ 318 | #define FUNC_ID_ZW_NUNIT_CMD 0xE0 319 | #define FUNC_ID_ZW_NUNIT_INIT 0xE1 320 | #define FUNC_ID_ZW_NUNIT_LIST 0xE2 321 | #define FUNC_ID_ZW_NUNIT_RUN 0xE3 322 | #define FUNC_ID_ZW_NUNIT_END 0xE4 323 | 324 | #define FUNC_ID_IO_PORT_STATUS 0xE5 325 | #define FUNC_ID_IO_PORT 0xE6 326 | 327 | /* Allocated for Power Management */ 328 | #define FUNC_ID_SERIAL_API_POWER_MANAGEMENT 0xEE 329 | #define FUNC_ID_SERIAL_API_READY 0xEF 330 | 331 | /* Allocated for proprietary serial API commands */ 332 | #define FUNC_ID_PROPRIETARY_0 0xF0 333 | #define FUNC_ID_PROPRIETARY_1 0xF1 334 | #define FUNC_ID_PROPRIETARY_2 0xF2 335 | #define FUNC_ID_PROPRIETARY_3 0xF3 336 | #define FUNC_ID_PROPRIETARY_4 0xF4 337 | #define FUNC_ID_PROPRIETARY_5 0xF5 338 | #define FUNC_ID_PROPRIETARY_6 0xF6 339 | #define FUNC_ID_PROPRIETARY_7 0xF7 340 | #define FUNC_ID_PROPRIETARY_8 0xF8 341 | #define FUNC_ID_PROPRIETARY_9 0xF9 342 | #define FUNC_ID_PROPRIETARY_A 0xFA 343 | #define FUNC_ID_PROPRIETARY_B 0xFB 344 | #define FUNC_ID_PROPRIETARY_C 0xFC 345 | #define FUNC_ID_PROPRIETARY_D 0xFD 346 | #define FUNC_ID_PROPRIETARY_E 0xFE 347 | 348 | 349 | /* Illegal function ID */ 350 | #define FUNC_ID_UNKNOWN 0xFF 351 | 352 | #endif /*_ZW_SERIALAPI_H_*/ 353 | -------------------------------------------------------------------------------- /API_includes/ZW_controller_bridge_api.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2013 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Z-Wave Bridge Controller node application interface 10 | * 11 | * Author: Johann Sigfredsson 12 | * 13 | * Last Changed By: $Author: jsi $ 14 | * Revision: $Revision: 31344 $ 15 | * Last Changed: $Date: 2015-04-17 13:53:23 +0200 (fr, 17 apr 2015) $ 16 | * 17 | ****************************************************************************/ 18 | #ifndef _ZW_CONTROLLER_BRIDGE_API_H_ 19 | #define _ZW_CONTROLLER_BRIDGE_API_H_ 20 | 21 | #ifndef ZW_CONTROLLER_BRIDGE 22 | #define ZW_CONTROLLER_BRIDGE 23 | #endif 24 | 25 | /****************************************************************************/ 26 | /* INCLUDE FILES */ 27 | /****************************************************************************/ 28 | /* A Bridge Controller is a Static Controller with BRIDGE functionality but */ 29 | /* without repeater fundtionality */ 30 | #include 31 | 32 | /****************************************************************************/ 33 | /* EXPORTED TYPES and DEFINITIONS */ 34 | /****************************************************************************/ 35 | 36 | /**************************************************************************** 37 | * Functionality specific for the Bridge Controller API. 38 | ****************************************************************************/ 39 | 40 | /*=============================== ZW_SendSlaveData =========================== 41 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 42 | ** 43 | ** 44 | ** txOptions: 45 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 46 | ** normal RF range). 47 | ** TRANSMIT_OPTION_ACK request acknowledge from destination node. 48 | ** 49 | ** BYTE RET FALSE if transmitter queue overflow 50 | ** ZW_SendSlaveData( 51 | ** BYTE srcNode IN Source node ID 52 | ** BYTE destNode, IN Destination node ID (0xFF == broadcast) 53 | ** BYTE *pData, IN Data buffer pointer 54 | ** BYTE dataLength, IN Data buffer length 55 | ** BYTE txOptions, IN Transmit option flags 56 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 57 | ** BYTE txStatus)); IN Transmit status 58 | **--------------------------------------------------------------------------*/ 59 | #define ZW_SEND_SLAVE_DATA(srcnode,destnode,data,length,options,func) ZW_SendSlaveData(srcnode,destnode,data,length,options,func) 60 | 61 | 62 | /*========================= ZW_SEND_SLAVE_NODE_INFO ===================== 63 | ** Create and transmit a slave node informations frame 64 | ** 65 | ** void RET FALSE if transmitter queue overflow 66 | ** ZW_SEND_SLAVE_NODE_INFO( 67 | ** BYTE sourcenode IN Source Node ID - Who is transmitting 68 | ** BYTE destnode IN Destination Node ID (0xff = broadcast) 69 | ** BYTE txOptions, IN Transmit option flags 70 | ** VOID_CALLBACKFUNC(completedFunc)(BYTE)) IN Transmit completed call back function 71 | **--------------------------------------------------------------------------*/ 72 | #define ZW_SEND_SLAVE_NODE_INFO(sourcenode,destnode,option,func) ZW_SendSlaveNodeInformation(sourcenode,destnode,option,func) 73 | 74 | 75 | /* Defines used to handle inclusion and exclusion of virtual slave nodes */ 76 | /* Are returned as callback parameter when callback, setup with */ 77 | /* ZW_SetSlaveLearnMode, is called during inclusion/exclusion process */ 78 | #define ASSIGN_COMPLETE 0x00 79 | #define ASSIGN_NODEID_DONE 0x01 /* Node ID have been assigned */ 80 | #define ASSIGN_RANGE_INFO_UPDATE 0x02 /* Node is doing Neighbor discovery */ 81 | 82 | /* Defines defining modes possible in ZW_SetSlaveLearnMode : */ 83 | 84 | /* Disable SlaveLearnMode (disable possibility to add/remove Virtual Slave nodes) */ 85 | /* Allowed when bridge is a primary controller, an inclusion controller or a secondary controller */ 86 | #define VIRTUAL_SLAVE_LEARN_MODE_DISABLE 0x00 87 | 88 | /* Enable SlaveLearnMode - Enable possibility for including/excluding a */ 89 | /* Virtual Slave node by an external primary/inclusion controller */ 90 | /* Allowed when bridge is an inclusion controller or a secondary controller */ 91 | #define VIRTUAL_SLAVE_LEARN_MODE_ENABLE 0x01 92 | 93 | /* Add new Virtual Slave node if possible */ 94 | /* Allowed when bridge is a primary or an inclusion controller */ 95 | #define VIRTUAL_SLAVE_LEARN_MODE_ADD 0x02 96 | 97 | /* Remove existing Virtual Slave node */ 98 | /* Allowed when bridge is a primary or an inclusion controller */ 99 | #define VIRTUAL_SLAVE_LEARN_MODE_REMOVE 0x03 100 | 101 | 102 | /*=========================== ZW_SetSlaveLearnMode ======================= 103 | ** Enable/Disable home/node ID learn mode. 104 | ** When learn mode is enabled, received "Assign ID's Command" are handled: 105 | ** If the current stored ID's are zero, the received ID's will be stored. 106 | ** If the received ID's are zero the stored ID's will be set to zero. 107 | ** 108 | ** The learnFunc is called when the received assign command has been handled. 109 | ** The returned parameter is the learned Node ID. 110 | ** 111 | ** void RET Nothing 112 | ** ZW_SetSlaveLearnMode( 113 | ** BYTE node, IN nodeID on node to set Learn Node Mode - 114 | ** ZERO if new node is to be learned 115 | ** BYTE mode, IN VIRTUAL_SLAVE_LEARN_MODE_DISABLE: Disable 116 | ** VIRTUAL_SLAVE_LEARN_MODE_ENABLE: Enable 117 | ** VIRTUAL_SLAVE_LEARN_MODE_ADD: Create New Virtual Slave Node 118 | ** VIRTUAL_SLAVE_LEARN_MODE_REMOVE: Remove Virtual Slave Node 119 | ** VOID_CALLBACKFUNC(learnFunc)(BYTE bStatus, BYTE orgId, BYTE newID)); IN Node learn call back function. 120 | **--------------------------------------------------------------------------*/ 121 | #define ZW_SET_SLAVE_LEARN_MODE(node, mode, func) ZW_SetSlaveLearnMode(node, mode, func) 122 | 123 | 124 | /*============================ ZW_IsVirtualNode ====================== 125 | ** Function description. 126 | ** Returns TRUE if bNodeID is a virtual slave node 127 | ** FALSE if it is not a virtual slave node 128 | ** Side effects: 129 | **--------------------------------------------------------------------------*/ 130 | #define ZW_IS_VIRTUAL_NODE(bNodeID) ZW_IsVirtualNode(bNodeID) 131 | 132 | 133 | /*=========================== ZW_GetVirtualNodes ========================= 134 | ** Request nodemask containing virtual nodes in controller bridge. 135 | ** 136 | ** The nodemask points to nodemask structure where the current virtual node 137 | ** nodemask is to be copied. 138 | ** 139 | **--------------------------------------------------------------------------*/ 140 | #define ZW_GET_VIRTUAL_NODES(nodemask) ZW_GetVirtualNodes(nodemask) 141 | 142 | 143 | /****************************************************************************/ 144 | /* EXPORTED DATA */ 145 | /****************************************************************************/ 146 | 147 | 148 | /* Masks for masking the relevant bits out of the multiDestsOffset_NodeMaskLen */ 149 | /* byte in the ZW_MULTI_DEST structure */ 150 | /* Mask masking the number of bytes in multiDestNodeMask array */ 151 | /* - valid value range [0 - 29] */ 152 | #define MULTI_DEST_MASK_LEN_MASK 0x1F 153 | /* Mask masking the nodeID-1 represented by the first bit in the first byte */ 154 | /* in the multiDestNodeMask */ 155 | /* - valid value range [0, 32, 64, 96...] */ 156 | #define MULTI_DEST_MASK_OFFSET_MASK 0xE0 157 | 158 | typedef struct _ZW_MULTI_DEST_ 159 | { 160 | BYTE multiDestsOffset_NodeMaskLen; /* bit 5-7 states the nodeId-1 (offset 0, 32, 64, 96... - translates into */ 161 | /* respectively nodeID 1, 33, 65, 97...), which is represented by the */ 162 | /* first bit in the multiDestsNodeMask. */ 163 | /* bit 0-4 is the size of the multicast nodemask. */ 164 | BYTE multiDestsNodeMask; /* first byte in the multicast nodemask containing local nodes */ 165 | /* which are to receive the received multicast frame. */ 166 | /* Following bytes can be accessed *(&multiDestsNodeMask + n) */ 167 | /* where n is index. */ 168 | } ZW_MULTI_DEST; 169 | 170 | 171 | /****************************************************************************/ 172 | /* EXPORTED FUNCTIONS */ 173 | /****************************************************************************/ 174 | 175 | #ifdef ZW_EXPLORE 176 | /*======================= ApplicationCommandHandler_Bridge ===============*/ 177 | /** 178 | * \ingroup COMMON 179 | * 180 | * The Z Wave protocol MUST call the \ref ApplicationCommandHandler_Bridge function 181 | * when an application command has been received from another node to the 182 | * Bridge Controller or an existing virtual slave node. The Z Wave protocol 183 | * MUST NOT reuse the receive buffer until the application has exited this function. 184 | * 185 | * A bridge controller application MUST implement this function. 186 | * 187 | * Declared in: ZW_controller_bridge_api.h 188 | * 189 | * \param[in] Multi If received frame is, a multicast frame then multi points 190 | * at the multicast structure containing the destination Node IDs. 191 | * \param[in] pCmd Payload from the received frame. The command class is the very first byte. 192 | * \param[in] cmdLength Number of Command class bytes. 193 | * \param[in] rxopt IN RECEIVE_OPTIONS_TYPE struct. 194 | * |RECEIVE_OPTIONS_TYPE struct member|RECEIVE_OPTIONS_TYPE struct description see \ref RECEIVE_OPTIONS_TYPE | 195 | * |----------------------------------|---------------------------------------------------------------------------------| 196 | * |\ref destNode |Command receiving Node ID. Either Bridge Controller Node ID or | 197 | * | |virtual slave Node ID. If received frame is a multicast frame then destNode is | 198 | * | |not valid and multi points to a multicast structure containing the | 199 | * | |destination nodes. | 200 | * |\ref sourceNode |Command sender Node ID. | 201 | * |\ref rxRSSIVal |RSSI val in dBm with which frame was received with. | 202 | * |\ref rxStatus |Received frame status flags, see \ref RECEIVE_STATUS | 203 | * |Flag Name |Flag Mask|Flag description | 204 | * |----------------------------------|---------|---------------------------------------------------------------------------------| 205 | * |\ref RECEIVE_STATUS_ROUTED_BUSY |xxxxxxx1 |A response route is locked by the application | 206 | * |\ref RECEIVE_STATUS_LOW_POWER |xxxxxx1x |Received at low output power level | 207 | * |\ref RECEIVE_STATUS_TYPE_SINGLE |xxxx00xx |Received a single cast frame | 208 | * |\ref RECEIVE_STATUS_TYPE_BROAD |xxxx01xx |Received a broadcast frame | 209 | * |\ref RECEIVE_STATUS_TYPE_MULTI |xxxx10xx |Received a multicast frame | 210 | * |\ref RECEIVE_STATUS_TYPE_EXPLORE |xxx10xxx |Received an explore frame | 211 | * 212 | * \serialapi{ZW->HOST: REQ | 0xA8 | rxopt->rxStatus | rxopt->destNode | rxopt->sourceNode | cmdLength | pCmd[ ] | multiDestsOffset_NodeMaskLen | multiDestsNodeMask | rxopt->rxRSSIVal } 213 | * 214 | */ 215 | extern void /*RET Nothing */ 216 | ApplicationCommandHandler_Bridge( 217 | ZW_MULTI_DEST *multiMask, /* IN Pointer to multicast destination structure containing, which */ 218 | /* local nodes are destination in a received multicast frame. */ 219 | /* NULL if received not a multicast frame */ 220 | ZW_APPLICATION_TX_BUFFER *pCmd, /* IN Payload from the received frame, the union */ 221 | /* should be used to access the fields */ 222 | BYTE cmdLength, /* IN Number of command bytes including the command */ 223 | RECEIVE_OPTIONS_TYPE *rxopt); /* IN rxopt struct contains rxStatus, sourceNode, destNode and rssiVal */ 224 | 225 | /* ApplicationSlaveCommandHandler is obsoleted */ 226 | 227 | /* ZW_SendSlaveData is obsoleted */ 228 | #define ZW_SendSlaveData(srcnode,destnode,data,length,options,func) ZW_SendData_Bridge(srcnode,destnode,data,length,options,func) 229 | 230 | #else /* ZW_EXPLORE */ 231 | 232 | 233 | /*=========================== ApplicationSlaveCommandHandler ================= 234 | ** The Application command handler function will be called from the Z-Wave 235 | ** command handler when an application command or request has been received. 236 | ** 237 | **--------------------------------------------------------------------------*/ 238 | extern void /*RET Nothing */ 239 | ApplicationSlaveCommandHandler( 240 | BYTE rxStatus, /*IN Frame header info */ 241 | BYTE destNode, /* To whom it might concern - which node is to receive the frame */ 242 | BYTE sourceNode, /*IN Command sender Node ID */ 243 | ZW_APPLICATION_TX_BUFFER *pCmd, /*IN Payload from the received frame, the union 244 | should be used to access the fields*/ 245 | BYTE cmdLength /*IN Number of command bytes including the command */ 246 | ); 247 | 248 | /*=============================== ZW_SendSlaveData =========================== 249 | ** Transmit data buffer to a single Z-Wave node or all Z-Wave nodes - broadcast 250 | ** and transmit it from srcNodeID 251 | ** 252 | ** 253 | ** txOptions: 254 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 255 | ** normal RF range). 256 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 257 | ** singlecast frame to each of the destination nodes 258 | ** and request acknowledge from each destination node. 259 | ** 260 | ** RET TRUE if data buffer was successfully put into the transmit queue 261 | ** FALSE if transmitter queue overflow or if controller primary or srcNodeID invalid 262 | ** then completedFunc will NOT be called 263 | ** 264 | ** BYTE RET FALSE if transmitter queue overflow or srcNodeID invalid or controller primary 265 | ** ZW_SendSlaveData( 266 | ** BYTE srcNodeID, IN Source node ID - Virtuel nodeID 267 | ** BYTE destNodeID, IN Destination node ID - 0xFF == Broadcast 268 | ** BYTE *pData, IN Data buffer pointer 269 | ** BYTE dataLength, IN Data buffer length 270 | ** BYTE txOptions, IN Transmit option flags 271 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 272 | ** BYTE txStatus)); IN Transmit status 273 | **--------------------------------------------------------------------------------*/ 274 | BYTE /*RET FALSE if transmitter busy or srcNodeID invalid or controller primary */ 275 | ZW_SendSlaveData( 276 | BYTE srcNodeID, /* IN Source node ID - Virtuel nodeID */ 277 | BYTE destNodeID, /* IN Destination node ID - 0xFF == all nodes */ 278 | BYTE *pData, /* IN Data buffer pointer */ 279 | BYTE dataLength, /* IN Data buffer length */ 280 | BYTE txOptions, /* IN Transmit option flags */ 281 | VOID_CALLBACKFUNC(completedFunc)(BYTE)); /* IN Transmit completed call back function */ 282 | #endif /* ZW_EXPLORE */ 283 | 284 | 285 | /*========================== ApplicationSlaveNodeInformation =============*/ 286 | /** 287 | * \ingroup COMMON 288 | * 289 | * Request Application Virtual Slave Node information. The Z Wave protocol layer calls 290 | * ApplicationSlaveNodeInformation just before transmitting a "Node Information" frame. 291 | * 292 | * The Z Wave Bridge Controller library requires this function implemented within the Application layer. 293 | * 294 | * Declared in: ZW_controller_bridge_api.h 295 | * 296 | * \param[in] destNode Which Virtual Node do we want the node information from. 297 | * \param[out] listening TRUE if this node is always listening and not moving. 298 | * \param[out] nodeType Pointer to structure with the Device Class: 299 | * - (*nodeType).generic The Generic Device Class [5]. Do not enter zero in this field. 300 | * - (*nodeType).specific The Specific Device Class [5]. 301 | * \param[out] nodeParm Command Class buffer pointer. Command Classes [9] supported 302 | * by the device itself and optional Command Classes the device 303 | * can control in other devices. 304 | * \param[out] parmLength Number of Command Class bytes. 305 | * 306 | * \b Serial API 307 | * 308 | * The ApplicationSlaveNodeInformation is replaced by SerialAPI_ApplicationSlaveNodeInformation. 309 | * Used to set node information for the Virtual Slave Node in the embedded module this node 310 | * information will then be used in subsequent calls to ZW_SendSlaveNodeInformation. 311 | * Replaces the functionality provided by the ApplicationSlaveNodeInformation() callback function. 312 | * \code 313 | void SerialAPI_ApplicationSlaveNodeInformation(BYTE destNode, 314 | BYTE listening, 315 | APPL_NODE_TYPE *nodeType, 316 | BYTE *nodeParm, 317 | BYTE parmLength) 318 | \endcode 319 | * \serialapi{ HOST->ZW:REQ | 0xA0 | destNode | listening | genericType | specificType | parmLength | nodeParm[ ]} 320 | * 321 | */ 322 | extern void /*RET Nothing */ 323 | ApplicationSlaveNodeInformation( 324 | BYTE destNode, /* IN Which node do we want the nodeinfo on */ 325 | BYTE *listening, /*OUT TRUE if this node is always on air */ 326 | APPL_NODE_TYPE *nodeType, /*OUT Generic and Specific Device Type */ 327 | BYTE **nodeParm, /*OUT Device parameter buffer pointer */ 328 | BYTE *parmLength /*OUT Number of Device parameter bytes */ 329 | ); 330 | 331 | /*============================ ZW_SendSlaveNodeInformation ============================ 332 | ** Create and transmit a slave node information frame 333 | ** RET TRUE if Slave NodeInformation frame was successfully put into the transmit queue 334 | ** FALSE if transmitter queue overflow or if controller primary or destNode invalid 335 | ** then completedFunc will NOT be called 336 | **---------------------------------------------------------------------------------------*/ 337 | BYTE /*RET FALSE if SlaveNodeinformation not in transmit queue */ 338 | ZW_SendSlaveNodeInformation( 339 | BYTE sourceNode, /* IN Which node is to transmit the nodeinfo */ 340 | BYTE destNode, /* IN Destination Node ID */ 341 | BYTE txOptions, /* IN Transmit option flags */ 342 | VOID_CALLBACKFUNC(completedFunc)(BYTE, TX_STATUS_TYPE *)); /*IN Transmit completed call back function */ 343 | 344 | 345 | /*=========================== ZW_SetSlaveLearnMode ======================= 346 | ** Enable/Disable home/node ID learn mode. 347 | ** When learn mode is enabled, received "Assign ID's Command" are handled: 348 | ** If the current stored ID's are zero, the received ID's will be stored. 349 | ** If the received ID's are zero the stored ID's will be set to zero. 350 | ** 351 | ** The learnFunc is called when the received assign command has been handled. 352 | ** The returned parameter is the learned Node ID. 353 | ** 354 | ** void RET Nothing 355 | ** ZW_SetSlaveLearnMode( 356 | ** BYTE node, IN nodeID on node to set Learn Node Mode - 357 | ** ZERO if new node is to be learned 358 | ** BYTE mode, IN VIRTUAL_SLAVE_LEARN_MODE_DISABLE: Disable 359 | ** VIRTUAL_SLAVE_LEARN_MODE_ENABLE: Enable 360 | ** VIRTUAL_SLAVE_LEARN_MODE_ADD: Create New Virtual Slave Node 361 | ** VIRTUAL_SLAVE_LEARN_MODE_REMOVE: Remove Virtual Slave Node 362 | ** VOID_CALLBACKFUNC(learnFunc)(BYTE bStatus, BYTE orgId, BYTE newID)); IN Node learn call back function. 363 | **--------------------------------------------------------------------------*/ 364 | BYTE /*RET Returns TRUE if successful or FALSE if node invalid or controller is primary */ 365 | ZW_SetSlaveLearnMode( 366 | BYTE node, /* IN nodeID on Virtual node to set in Learn Node Mode - if new node wanted then it must be ZERO */ 367 | BYTE mode, /* IN TRUE Enable, FALSE Disable */ 368 | VOID_CALLBACKFUNC(learnFunc)(BYTE bStatus, BYTE orgID, BYTE newID)); /* IN Slave node learn call back function. */ 369 | 370 | 371 | /*============================ ZW_IsVirtualNode ====================== 372 | ** Function description. 373 | ** Returns TRUE if bNodeID is a virtual slave node 374 | ** FALSE if it is not a virtual slave node 375 | ** Side effects: 376 | **--------------------------------------------------------------------------*/ 377 | BOOL /*RET TRUE if virtual slave node, FALSE if not */ 378 | ZW_IsVirtualNode(BYTE bNodeID); 379 | 380 | 381 | /*=========================== ZW_GetVirtualNodes ========================= 382 | ** Request nodemask containing virtual nodes in controller bridge. 383 | ** 384 | ** The nodemask points to nodemask structure where the current virtual node 385 | ** nodemask is to be copied. 386 | ** 387 | **--------------------------------------------------------------------------*/ 388 | void 389 | ZW_GetVirtualNodes( 390 | BYTE *nodeMask); 391 | 392 | #endif /* _ZW_CONTROLLER_BRIDGE_API_H_ */ 393 | 394 | -------------------------------------------------------------------------------- /API_includes/ZW_controller_static_api.h: -------------------------------------------------------------------------------- 1 | /*************************** ZW_CONTROLLER_STATIC_API.H ******************* 2 | * ####### 3 | * ## ## 4 | * # ## #### ##### ##### ## ## ##### 5 | * ## ## ## ## ## ## ## ## ## 6 | * ## # ###### ## ## #### ## ## #### 7 | * ## ## ## ## ## ## ##### ## 8 | * ####### #### ## ## ##### ## ##### 9 | * ##### 10 | * Z-Wave, the wireless lauguage. 11 | * 12 | * Copyright (c) 2001 13 | * Zensys A/S 14 | * Denmark 15 | * 16 | * All Rights Reserved 17 | * 18 | * This source file is subject to the terms and conditions of the 19 | * Zensys Software License Agreement which restricts the manner 20 | * in which it may be used. 21 | * 22 | *--------------------------------------------------------------------------- 23 | * 24 | * Description: Z-Wave Static Controller node application interface 25 | * 26 | * Author: Johann Sigfredsson 27 | * 28 | * Last Changed By: $Author: sse $ 29 | * Revision: $Revision: 28973 $ 30 | * Last Changed: $Date: 2014-06-03 15:14:50 +0200 (ti, 03 jun 2014) $ 31 | * 32 | ****************************************************************************/ 33 | #ifndef _ZW_CONTROLLER_STATIC_API_H_ 34 | #define _ZW_CONTROLLER_STATIC_API_H_ 35 | 36 | #ifndef ZW_CONTROLLER_STATIC 37 | #define ZW_CONTROLLER_STATIC 38 | #endif 39 | 40 | /****************************************************************************/ 41 | /* INCLUDE FILES */ 42 | /****************************************************************************/ 43 | /*These are a part of the standard static controller API*/ 44 | #include 45 | /****************************************************************************/ 46 | /* EXPORTED TYPES and DEFINITIONS */ 47 | /****************************************************************************/ 48 | /**************************************************************************** 49 | * Functionality specific for the Static Controller API. 50 | ****************************************************************************/ 51 | 52 | /*======================== ZW_CreateNewPrimaryCtrl ====================== 53 | ** 54 | ** Create a new primary controller 55 | ** 56 | ** The modes are: 57 | ** 58 | ** CREATE_PRIMARY_START Start the creation of a new primary 59 | ** CREATE_PRIMARY_STOP Stop the creation of a new primary 60 | ** CREATE_PRIMARY_STOP_FAILED Report that the replication failed 61 | ** 62 | ** ADD_NODE_OPTION_NORMAL_POWER Set this flag in bMode for High Power inclusion. 63 | ** 64 | ** Side effects: 65 | ** 66 | **--------------------------------------------------------------------------*/ 67 | #define ZW_CREATE_NEW_PRIMARY_CTRL(MODE, FUNC) ZW_CreateNewPrimaryCtrl(MODE, FUNC) 68 | 69 | 70 | /*========================== ZW_SetPriorityRoute ========================= 71 | ** Function description 72 | ** Returns TRUE if specified pPriorityRoute has been saved for bNodeID. 73 | ** Returns FALSE if specified bNodeID is NOT valid and no PriorityRoute 74 | ** has been saved for bNodeID. 75 | ** pPriorityRoute MUST point to a ROUTECACHE_LINE_SIZE (5) byte sized 76 | ** byte array containing the wanted route. The first 4 bytes (index 0-3) 77 | ** contains the repeaters active in the route and last (index 4) byte 78 | ** contains the speed information. 79 | ** First ZERO in repeaters (index 0-3) indicates no more repeaters in route. 80 | ** A direct route is indicated by the first repeater (index 0) being ZERO. 81 | ** 82 | ** Example: {0,0,0,0,ZW_PRIORITY_ROUTE_SPEED_100K} -> 83 | ** Direct 100K Priority route 84 | ** {2,3,0,0,ZW_PRIORITY_ROUTE_SPEED_40K} -> 85 | ** 40K Priority route through repeaters 2 and 3 86 | ** {2,3,4,0,ZW_PRIORITY_ROUTE_SPEED_9600} -> 87 | ** 9600 Priority route through repeaters 2, 3 and 4 88 | ** 89 | ** Side effects: 90 | ** 91 | **--------------------------------------------------------------------------*/ 92 | #define ZW_SET_PRIORITY_ROUTE(bNodeID, pPriorityRoute) ZW_SetPriorityRoute(bNodeID, pPriorityRoute) 93 | 94 | 95 | /* OBSOLETE */ 96 | #define ZW_SetLastWorkingRoute(bNodeID, pLastWorkingRoute) ZW_SetPriorityRoute(bNodeID, pLastWorkingRoute) 97 | #define ZW_SET_LAST_WORKING_ROUTE(bNodeID, pLastWorkingRoute) ZW_SetPriorityRoute(bNodeID, pLastWorkingRoute) 98 | 99 | 100 | /****************************************************************************/ 101 | /* EXPORTED DATA */ 102 | /****************************************************************************/ 103 | 104 | 105 | /****************************************************************************/ 106 | /* EXPORTED FUNCTIONS */ 107 | /* Implemented within the application moduls */ 108 | /****************************************************************************/ 109 | 110 | /****************************************************************************/ 111 | /* EXPORTED FUNCTIONS */ 112 | /* Implemented within the Z-Wave controller modules */ 113 | /****************************************************************************/ 114 | 115 | /*======================== ZW_CreateNewPrimaryCtrl ====================== 116 | ** 117 | ** Create a new primary controller 118 | ** 119 | ** The modes are: 120 | ** 121 | ** CREATE_PRIMARY_START Start the creation of a new primary 122 | ** CREATE_PRIMARY_STOP Stop the creation of a new primary 123 | ** CREATE_PRIMARY_STOP_FAILED Report that the replication failed 124 | ** 125 | ** ADD_NODE_OPTION_NORMAL_POWER Set this flag in bMode for High Power inclusion. 126 | ** 127 | ** Side effects: 128 | ** 129 | **--------------------------------------------------------------------------*/ 130 | void 131 | ZW_CreateNewPrimaryCtrl(BYTE bMode, 132 | VOID_CALLBACKFUNC(completedFunc)(LEARN_INFO*)); 133 | 134 | 135 | /*========================== ZW_SetPriorityRoute ========================= 136 | ** Function description 137 | ** Returns TRUE if specified pPriorityRoute hasbeen saved for bNodeID. 138 | ** Returns FALSE if specified bNodeID is NOT validand no PriorityRoute 139 | ** has been saved for bNodeID. 140 | ** pPriorityRoute MUST point to a ROUTECACHE_LINE_SIZE (5) byte sized 141 | ** byte array containing the wanted route. The first 4 bytes (index 0-3) 142 | ** contains the repeaters active in the route and last (index 4) byte 143 | ** contains the speed information. 144 | ** First ZERO in repeaters (index 0-3) indicates no more repeaters in route. 145 | ** A direct route is indicated by the first repeater (index 0) being ZERO. 146 | ** 147 | ** Example: {0,0,0,0,ZW_PRIORITY_ROUTE_SPEED_100K}-> 148 | ** Direct 100K Priority route 149 | ** {2,3,0,0,ZW_PRIORITY_ROUTE_SPEED_40K} -> 150 | ** 40K Priority route through repeaters 2 and 3 151 | ** {2,3,4,0,ZW_PRIORITY_ROUTE_SPEED_9600} -> 152 | ** 9600 Priority route through repeaters 2, 3 and 4 153 | ** 154 | ** Side effects: 155 | ** 156 | **--------------------------------------------------------------------------*/ 157 | BOOL 158 | ZW_SetPriorityRoute( BYTE bNodeID, XBYTE *pPriorityRoute); 159 | 160 | 161 | #endif /* _ZW_CONTROLLER_STATIC_API_H_ */ 162 | 163 | -------------------------------------------------------------------------------- /API_includes/ZW_firmware_bootloader_defs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2014 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Declaration of Z-Wave firmware bootloader defines. 10 | * 11 | * Last Changed By: $Author: jsi $ 12 | * Revision: $Revision: 22797 $ 13 | * Last Changed: $Date: 2012-05-10 15:55:06 +0200 (to, 10 maj 2012) $ 14 | * 15 | ****************************************************************************/ 16 | #ifndef _FIRMWARE_BOOTLOADER_DEFS_H_ 17 | #define _FIRMWARE_BOOTLOADER_DEFS_H_ 18 | 19 | /****************************************************************************/ 20 | /* INCLUDE FILES */ 21 | /****************************************************************************/ 22 | #include 23 | 24 | 25 | /****************************************************************************/ 26 | /* EXPORTED DATA */ 27 | /****************************************************************************/ 28 | 29 | 30 | /****************************************************************************/ 31 | /* EXPORTED TYPES and DEFINITIONS */ 32 | /****************************************************************************/ 33 | 34 | /*************************************************************************************/ 35 | /* Definitions used by Bootloader library and the NVM Firmware Image functionality */ 36 | /* Firmware Image is written by NVM Firmware Image functionality in NVM according to */ 37 | /* the detected NVM Size: */ 38 | /* NVM Size < 128KB NO Firmware Image can/will be saved/flashed */ 39 | /* NVM Size = 128KB, Firmware Image is partly saved in NVM */ 40 | /* - Firmware Image offset 0x01800-0x1A000 */ 41 | /* - Uses NVM range 0x77FF-0x1FFFF */ 42 | /* NVM Size >= 256KB, Firmware Image is fully saved in NVM */ 43 | /* - Firmware Image offset 0x00000-0x1FFFF */ 44 | /* - Uses NVM range 0x1FFFF-0x3FFFF */ 45 | /*************************************************************************************/ 46 | /* MCU internal flash size is 128kbytes */ 47 | #define FIRMWARE_MCU_SIZE 0x20000 48 | 49 | /* A MCU flash BANK is 32kbytes */ 50 | #define MCU_BANK_SIZE 0x8000 51 | 52 | /* Bootloader occupies the first 6kbytes in the MCU address space */ 53 | #define FIRMWARE_BOOTLOADER_SIZE 0x1800 54 | 55 | /* Firmware boot/start address */ 56 | #define FIRMWARE_START_OFFSET FIRMWARE_BOOTLOADER_SIZE 57 | 58 | #define FIRMWARE_BANK1_START (DWORD)MCU_BANK_SIZE 59 | #define FIRMWARE_BANK2_START ((DWORD)FIRMWARE_BANK1_START + MCU_BANK_SIZE) 60 | #define FIRMWARE_BANK3_START ((DWORD)FIRMWARE_BANK2_START + MCU_BANK_SIZE) 61 | 62 | /* Current NVM is the m25pe10 1mbit FLASH */ 63 | #define NVM_SIZE_1MBIT 0x20000 64 | 65 | /* NVM offset for the New Firmware Image present indicator */ 66 | #define FIRMWARE_NVM_IMAGE_NEW (firmwareUpdate_NVM_Offset - 1) 67 | /* Firmware Image address offset of the first byte written/read in the NVM firmware COMMON area */ 68 | //#define FIRMWARE_START_OFFSET_1MBIT FIRMWARE_BOOTLOADER_SIZE 69 | 70 | 71 | /* The COMMON BANK in Firmware image consist of the Firmware range FIRMWARE_BOOTLOADER_SIZE-0x7FFF and starts at FIRMWARE_NVM_OFFSET_1MBIT */ 72 | #define FIRMWARE_NVM_COMMON_CRC16_1MBIT (FIRMWARE_NVM_OFFSET_1MBIT + FIRMWARE_COMMON_NVM_OFFSET_1MBIT) 73 | /* Only 26KB of the COMMON BANK are saved we therefore need to offset accordingly when defining the placement of the other BANKs in NVM */ 74 | #define FIRMWARE_NVM_BANK1_1MBIT (FIRMWARE_NVM_OFFSET_1MBIT - FIRMWARE_START_OFFSET_1MBIT + FIRMWARE_BANK1_START) 75 | #define FIRMWARE_NVM_BANK2_1MBIT (FIRMWARE_NVM_OFFSET_1MBIT - FIRMWARE_START_OFFSET_1MBIT + FIRMWARE_BANK2_START) 76 | #define FIRMWARE_NVM_BANK3_1MBIT (FIRMWARE_NVM_OFFSET_1MBIT - FIRMWARE_START_OFFSET_1MBIT + FIRMWARE_BANK3_START) 77 | 78 | /* Current NVM is the m25pe20 2mbit FLASH or bigger */ 79 | #define NVM_SIZE_2MBIT 0x40000 80 | #define NVM_SIZE_4MBIT 0x80000 81 | #define NVM_SIZE_8MBIT 0x100000 82 | #define NVM_SIZE_16MBIT 0x200000 83 | 84 | /* Firmware Image address offset of the first byte written/read in the NVM firmware COMMON area */ 85 | //#define FIRMWARE_START_OFFSET_2MBIT 0x0000 86 | 87 | /* The COMMON BANK in Firmware image consist of the Firmware range 0x0000-0x7FFF and starts at FIRMWARE_NVM_OFFSET_2MBIT */ 88 | /* The first 0x1800 of the COMMON BANK is skipped when calculating the Firmware CRC16 */ 89 | #define FIRMWARE_NVM_COMMON_CRC16_2MBIT (FIRMWARE_NVM_OFFSET_2MBIT + FIRMWARE_COMMON_NVM_OFFSET_2MBIT) 90 | #define FIRMWARE_NVM_BANK1_2MBIT (FIRMWARE_NVM_OFFSET_2MBIT - FIRMWARE_START_OFFSET_2MBIT + FIRMWARE_BANK1_START) 91 | #define FIRMWARE_NVM_BANK2_2MBIT (FIRMWARE_NVM_OFFSET_2MBIT - FIRMWARE_START_OFFSET_2MBIT + FIRMWARE_BANK2_START) 92 | #define FIRMWARE_NVM_BANK3_2MBIT (FIRMWARE_NVM_OFFSET_2MBIT - FIRMWARE_START_OFFSET_2MBIT + FIRMWARE_BANK3_START) 93 | 94 | 95 | 96 | #endif /* _FIRMWARE_BOOTLOADER_DEFS_H_ */ 97 | -------------------------------------------------------------------------------- /API_includes/ZW_firmware_descriptor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2012 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Declaration of Z-Wave firmware descriptor. 10 | * 11 | * Author: Erik Friis Harck 12 | * 13 | * Last Changed By: $Author: iza $ 14 | * Revision: $Revision: 22797 $ 15 | * Last Changed: $Date: 2012-05-10 15:55:06 +0200 (to, 10 maj 2012) $ 16 | * 17 | ****************************************************************************/ 18 | #ifndef _FIRMWARE_DESCRIPTOR_H_ 19 | #define _FIRMWARE_DESCRIPTOR_H_ 20 | 21 | #include 22 | 23 | /****************************************************************************/ 24 | /* EXPORTED TYPES and DEFINITIONS */ 25 | /****************************************************************************/ 26 | 27 | /* Firmware descriptor for firmware. Located at the end of firmware. */ 28 | typedef struct s_firmwareDescriptor_ 29 | { 30 | /* Total amount of code used in COMMON bank */ 31 | WORD wFirmWareCommonSize; /* */ 32 | /* Total amount of code used in BANK1 bank */ 33 | WORD wFirmWareBank1Size; /* */ 34 | /* Total amount of code used in BANK2 bank */ 35 | WORD wFirmWareBank2Size; /* */ 36 | /* Total amount of code used in BANK3 bank */ 37 | WORD wFirmWareBank3Size; /* */ 38 | WORD manufacturerID; 39 | WORD firmwareID; 40 | WORD checksum; 41 | } t_firmwareDescriptor; 42 | 43 | 44 | /* Firmware structure */ 45 | typedef struct s_firmware_ 46 | { 47 | BYTE firmwareStart[8]; /* Filler */ 48 | WORD firmwareDescriptorOffs; /* Offset into first 32K bytes where firmwareDescriptor structure is placed */ 49 | BYTE applicationCode[1000]; /* 1000 is just an arbitrary example */ 50 | /* Every field beyond this you must calculate the */ 51 | /* pointer to, because the size of the application */ 52 | /* is unknown at compilation time for the bootloader. */ 53 | t_firmwareDescriptor firmwareDescriptor; 54 | } t_firmware; 55 | 56 | /****************************************************************************/ 57 | /* EXPORTED DATA */ 58 | /****************************************************************************/ 59 | 60 | extern code t_firmwareDescriptor firmwareDescriptor; 61 | extern code WORD firmwareDescriptorAddr; 62 | extern code BYTE bBank1EndMarker; 63 | extern code BYTE bBank2EndMarker; 64 | extern code BYTE bBank3EndMarker; 65 | 66 | 67 | #endif /* _FIRMWARE_DESCRIPTOR_H_ */ 68 | -------------------------------------------------------------------------------- /API_includes/ZW_firmware_update_nvm_api.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2013 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Firmware Update functionality 10 | * 11 | * Author: Johann Sigfredsson 12 | * 13 | * Last Changed By: $Author: jbu $ 14 | * Revision: $Revision: 58 $ 15 | * Last Changed: $Date: 2009-01-12 09:45:03 +0100 (ma, 12 jan 2009) $ 16 | * 17 | ****************************************************************************/ 18 | 19 | #ifndef _ZW_FIRMWARE_UPDATE_NVM_API_H_ 20 | #define _ZW_FIRMWARE_UPDATE_NVM_API_H_ 21 | 22 | /****************************************************************************/ 23 | /* INCLUDE FILES */ 24 | /****************************************************************************/ 25 | #include 26 | 27 | /****************************************************************************/ 28 | /* EXPORTED TYPES and DEFINITIONS */ 29 | /****************************************************************************/ 30 | 31 | /* ZW_FirmwareUpdate_NVM_Init return code definitions */ 32 | #define NVM_FIRMWARE_UPDATE_NOT_SUPPORTED 0 33 | #define NVM_FIRMWARE_UPDATE_SUPPORTED 1 34 | 35 | /* FirmwareUpdate NEWIMAGE definitions - Use when calling ZW_FirmwareUpdate_NVM_Set_NEWIMAGE */ 36 | typedef enum 37 | { 38 | FIRMWARE_UPDATE_NVM_NEWIMAGE_NOT_NEW = 0, 39 | FIRMWARE_UPDATE_NVM_NEWIMAGE_NEW = 1 40 | } FIRMWARE_UPDATE_NVM_NEWIMAGE_T; 41 | 42 | /****************************************************************************/ 43 | /* EXPORTED FUNCTIONS */ 44 | /****************************************************************************/ 45 | 46 | /**************************************************************************** 47 | ** 48 | ** NOTE: 49 | ** 50 | ** The Firmware Update module needs ZW_FirmwareUpdate_NVM_Init to be 51 | ** called prior to calling any other Firmware Update module function 52 | ** as ZW_FirmwareUpdate_NVM_Init determines the external NVM attached 53 | ** so the Application can place new Firmware the correct place in NVM 54 | ** making it possible for the Z-Wave Bootloader to find the new firmware 55 | ** 56 | *****************************************************************************/ 57 | 58 | 59 | /*================ ZW_FirmwareUpdate_NVM_Init ================= 60 | ** 61 | ** Initialize FirmwareUpdate functionality 62 | ** Determines the current attached external NVM and initializes 63 | ** the firmware update functionality accordingly: 64 | ** For firmware update to function (somewhat) NVM needs to be 65 | ** a FLASH based NVM and at least have a capacity of 1MBit . 66 | ** 67 | ** Side effects: 68 | ** 69 | **---------------------------------------------------------------*/ 70 | BYTE /*RET NVM_FIRMWARE_UPDATE_SUPPORTED if NVM is Firmware Update compatible */ 71 | /* NVM_FIRMWARE_UPDATE_NOT_SUPPORTED if NVM is NOT Firmware Update compatible */ 72 | ZW_FirmwareUpdate_NVM_Init(); 73 | 74 | 75 | /*============ ZW_FirmwareUpdate_NVM_Set_NEWIMAGE ============= 76 | ** 77 | ** Set New Firmware image available in NVM indicator 78 | ** 79 | ** bValue == FIRMWARE_UPDATE_NVM_NEWIMAGE_NOT_NEW informs 80 | ** the Bootloader that NO NEW firmware image exists in external NVM 81 | ** bValue == FIRMWARE_UPDATE_NVM_NEWIMAGE_NEW informs 82 | ** the Bootloader that a possible NEW firmware image exist in external NVM 83 | ** 84 | ** Side effects: 85 | ** 86 | **---------------------------------------------------------------*/ 87 | BYTE /* RET TRUE if specified bValue has been written to NVM */ 88 | /* FALSE if either NVM is not firmware update capable or */ 89 | /* the Firmware_NEWIMAGE value is allready set to bValue */ 90 | ZW_FirmwareUpdate_NVM_Set_NEWIMAGE( 91 | BYTE bValue); 92 | 93 | 94 | /*============ ZW_FirmwareUpdate_NVM_Get_NEWIMAGE ============= 95 | ** 96 | ** Get New Firmware image available indicator in NVM 97 | ** 98 | ** Returns FIRMWARE_UPDATE_NVM_NEWIMAGE_NOT_NEW if either external 99 | ** NVM is not OTA capable or if NO NEW firmware image 100 | ** exists in external NVM 101 | ** Returns FIRMWARE_UPDATE_NVM_NEWIMAGE_NEW if external NVM contains 102 | ** a possible NEW firmware image 103 | ** 104 | ** Side effects: 105 | ** 106 | **---------------------------------------------------------------*/ 107 | BYTE /* RET FIRMWARE_UPDATE_NVM_NEWIMAGE_NOT_NEW if either NVM */ 108 | /* not capable or Indicator indicates NO NEW image */ 109 | /* FIRMWARE_UPDATE_NVM_NEWIMAGE_NEW if Indicator */ 110 | /* indicates NEW image present */ 111 | ZW_FirmwareUpdate_NVM_Get_NEWIMAGE(); 112 | 113 | 114 | /*============ ZW_firmwareUpdate_NVM_UpdateCRC16 ============== 115 | ** 116 | ** Calculate CRC16 for NVM block of data 117 | ** 118 | ** Side effects: 119 | ** 120 | **---------------------------------------------------------------*/ 121 | WORD /* RET Resulting CRC16 value after doing CRC16 calculation */ 122 | /* on specified block of data in extrnal NVM */ 123 | ZW_firmwareUpdate_NVM_UpdateCRC16( 124 | WORD crc, 125 | DWORD nvmOffset, 126 | WORD blockSize); 127 | 128 | 129 | /*============= ZW_FirmwareUpdate_NVM_isValidCRC16 ============ 130 | ** 131 | ** Check if NVM firmware is valid using CRC16 check of the 132 | ** compressed firmware image in NVM. The CRC16 is matched 133 | ** against the one in header of the compressed image. 134 | ** 135 | ** The global variables firmwareUpdate_NVM_Offset and 136 | ** compressionHdr must be set before calling this function. 137 | ** 138 | ** Side effects: 139 | ** None 140 | ** 141 | **---------------------------------------------------------------*/ 142 | BOOL /* RET TRUE if NVM contains is a valid Z-Wave Bootloader upgradeable Firmware */ 143 | /* FALSE if NVM do NOT contain a valid Z-Wave Bootloader upgradeable Firmware */ 144 | ZW_FirmwareUpdate_NVM_isValidCRC16(void); 145 | 146 | 147 | /*=============== ZW_FirmwareUpdate_NVM_Write ================= 148 | ** 149 | ** Write Firmware Image block to NVM if applicable. 150 | ** Uses variables initialized by ZW_FirmwareUpdate_NVM_Init together 151 | ** with the specified offset to determine if and where in the external 152 | ** NVM space the sourceBuffer contents should be written. 153 | ** 154 | ** Side effects: 155 | ** 156 | **---------------------------------------------------------------*/ 157 | BYTE /* RET TRUE if specified buffer has been written to NVM */ 158 | /* FALSE if either NVM is not firmware update capable or */ 159 | /* the sourceBuffer contents allready are present at */ 160 | /* specified offset in external NVM */ 161 | ZW_FirmwareUpdate_NVM_Write( 162 | BYTE *sourceBuffer, 163 | WORD fw_bufSize, 164 | DWORD firmwareOffset); 165 | 166 | 167 | #endif /* _ZW_FIRMWARE_UPDATE_NVM_API_H_ */ 168 | -------------------------------------------------------------------------------- /API_includes/ZW_flash_api.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (c) 2001-2012 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Interface driver for the 500 Series Z-Wave Single Chip 10 | * built-in Flash code and NVR spaces 11 | * 12 | * Author: Morten Vested Olesen 13 | * 14 | * Last Changed By: $Author: jdo $ 15 | * Revision: $Revision: 1.38 $ 16 | * Last Changed: $Date: 2005/07/27 15:12:54 $ 17 | * 18 | ****************************************************************************/ 19 | #ifndef _ZW_FLASH_API_H_ 20 | #define _ZW_FLASH_API_H_ 21 | 22 | /***************************************************************************/ 23 | /* INCLUDE FILES */ 24 | /***************************************************************************/ 25 | #include 26 | 27 | /***************************************************************************/ 28 | /* PRIVATE TYPES and DEFINITIONS */ 29 | /***************************************************************************/ 30 | #define FLASH_STATE_DONE 0x04 31 | #define FLASH_STATE_LOCK 0x02 32 | #define FLASH_STATE_ERR 0x01 33 | 34 | /***************************************************************************/ 35 | /* EXPORTED DATA */ 36 | /***************************************************************************/ 37 | 38 | /***************************************************************************/ 39 | /* EXPORTED FUNCTIONS */ 40 | /***************************************************************************/ 41 | 42 | #ifndef ZW_bootloader_ZW050x 43 | /*========================= ZW_FLASH_nvr0_get ============================ 44 | ** Reads byte from NVR0 45 | ** 46 | ** Side effects: will halt MCU for 3 clock periods 47 | **--------------------------------------------------------------------------*/ 48 | BYTE /* return: data read from NVR0 mem*/ 49 | ZW_FLASH_nvr0_get(BYTE bNvrAddress); 50 | #endif 51 | 52 | /*========================= ZW_FLASH_code_prog_unlock ============================ 53 | ** Enables code area erase and program 54 | ** 55 | ** Side effects: 56 | **--------------------------------------------------------------------------*/ 57 | BYTE /* return: 0x00 when unclocked */ 58 | ZW_FLASH_code_prog_unlock(BYTE *pbUnlockString); 59 | 60 | /*========================= ZW_FLASH_code_prog_lock ============================ 61 | ** Disables code area erase and program 62 | ** 63 | ** Side effects: 64 | **--------------------------------------------------------------------------*/ 65 | BYTE /* return: 0x00 when locked */ 66 | ZW_FLASH_code_prog_lock(void); 67 | 68 | /*========================= ZW_FLASH_code_sector_erase ============================ 69 | ** Erase code sector 70 | ** 71 | ** Side effects: halts MCU for 4ms 72 | **--------------------------------------------------------------------------*/ 73 | BYTE /* return: 0x00: page prog OK, non-0x00: failed */ 74 | ZW_FLASH_code_sector_erase(BYTE bSector); 75 | 76 | /*========================= ZW_FLASH_code_page_prog ============================ 77 | ** Program code page 78 | ** 79 | ** Side effects: halts MCU for 6us per programemd byte that is different from 0xFF 80 | **--------------------------------------------------------------------------*/ 81 | BYTE /* return: 0x00: page prog passed, non-0x00: page progfailed */ 82 | ZW_FLASH_code_page_prog(BYTE *pbRamAddress, 83 | BYTE bSector, 84 | BYTE bPage); 85 | 86 | #ifndef ZW_bootloader_ZW050x 87 | /*========================= ZW_FLASH_auto_prog_set ============================ 88 | ** Sets auto prog mode register bit 89 | ** 90 | ** Side effects: 91 | **--------------------------------------------------------------------------*/ 92 | void /* return: nothing */ 93 | ZW_FLASH_auto_prog_set(void); 94 | 95 | 96 | /*========================= ZW_FLASH_prog_status_get ============================ 97 | ** Reads the status of the flash programming state machine 98 | ** Returns bitmask: FLASH_STATE_LOCK Programming is locked 99 | ** FLASH_STATE_ERR Programming is in error state 100 | ** 101 | ** Side effects: 102 | **--------------------------------------------------------------------------*/ 103 | BYTE /* return: flash state */ 104 | ZW_FLASH_prog_state(void); 105 | #endif 106 | 107 | #endif // _ZW_FLASH_API_H_ 108 | -------------------------------------------------------------------------------- /API_includes/ZW_network_management_api.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file contains a Sigma Designs implementation of how learn mode should 4 | * be implemented according to Classic, Network wide and Smart Start modes. 5 | * @copyright Copyright (c) 2001-2017, Sigma Designs Inc., All Rights Reserved 6 | */ 7 | 8 | #ifndef _NETWORK_MANAGEMENT_API_H_ 9 | #define _NETWORK_MANAGEMENT_API_H_ 10 | /****************************************************************************/ 11 | /* INCLUDE FILES */ 12 | /****************************************************************************/ 13 | #include 14 | #include 15 | 16 | /****************************************************************************/ 17 | /* EXPORTED TYPES and DEFINITIONS */ 18 | /****************************************************************************/ 19 | typedef enum 20 | { 21 | STATE_LEARN_IDLE, 22 | STATE_LEARN_STOP, 23 | STATE_LEARN_CLASSIC, 24 | STATE_LEARN_NWI 25 | } learn_state_t; 26 | 27 | 28 | /****************************************************************************/ 29 | /* EXPORTED DATA */ 30 | /****************************************************************************/ 31 | 32 | /****************************************************************************/ 33 | /* EXPORTED FUNCTIONS */ 34 | /****************************************************************************/ 35 | 36 | 37 | BYTE 38 | ZW_NetworkLearnModeStart( 39 | E_NETWORK_LEARN_MODE_ACTION bMode); 40 | 41 | /** 42 | * Return learn state for learn mode process. Return STATE_LEARN_IDLE if process is not 43 | * started. 44 | * @return learn state of type learn_state_t 45 | */ 46 | learn_state_t 47 | GetLearnState(); 48 | 49 | #endif /* _NETWORK_MANAGE_API_H_ */ 50 | -------------------------------------------------------------------------------- /API_includes/ZW_nvm_descriptor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2014 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Declaration of Z-Wave NVM descriptor. 10 | * 11 | * Author: Erik Friis Harck 12 | * 13 | * Last Changed By: $Author: iza $ 14 | * Revision: $Revision: 22797 $ 15 | * Last Changed: $Date: 2012-05-10 15:55:06 +0200 (to, 10 maj 2012) $ 16 | * 17 | ****************************************************************************/ 18 | #ifndef _NVM_DESCRIPTOR_H_ 19 | #define _NVM_DESCRIPTOR_H_ 20 | #include 21 | 22 | /****************************************************************************/ 23 | /* EXTERNALS */ 24 | /****************************************************************************/ 25 | 26 | /* Make _ZW_VERSION_ public, so that Z-Wave application code can access it. */ 27 | /* Use it from C-code like this: */ 28 | extern unsigned char _ZW_VERSION_; /* referenced with = (WORD)&_ZW_VERSION_); */ 29 | /* Make _APP_VERSION_ public, so that Z-Wave protocol code can access it. */ 30 | /* Use it from C-code like this: */ 31 | extern unsigned char _APP_VERSION_; /* referenced with = (WORD)&_APP_VERSION_); */ 32 | 33 | /****************************************************************************/ 34 | /* EXPORTED DATA */ 35 | /****************************************************************************/ 36 | 37 | typedef enum _eNvmModuleType 38 | { 39 | NVM_MODULE_TYPE_UNDEFINED = 0x00, 40 | NVM_MODULE_TYPE_ZW_PHY_LIBRARY = 0x01, 41 | NVM_MODULE_TYPE_ZW_LIBRARY = 0x02, 42 | NVM_MODULE_TYPE_ZW_FRAMEWORK = 0x03, 43 | NVM_MODULE_TYPE_APPLICATION = 0x04, 44 | NVM_MODULE_TYPE_HOST_APPLICATION = 0x05, 45 | NVM_MODULE_TYPE_SECURITY_2 = 0x06, 46 | NVM_MODULE_TYPE_NVM_DESCRIPTOR = 0xFF 47 | } eNvmModuleType; 48 | 49 | typedef WORD t_NvmModuleSize; 50 | 51 | /* NVM module descriptor for module. Located at the end of NVM module. */ 52 | typedef struct s_nvmModuleDescriptor_ 53 | { 54 | t_NvmModuleSize wNvmModuleSize; /* Used to compare with nvmModuleSize for validation */ 55 | eNvmModuleType bNvmModuleType; /* Used to compare with other firmware module type */ 56 | WORD wNvmModuleVersion; /* Used to compare with other firmware version */ 57 | } t_nvmModuleDescriptor; 58 | 59 | typedef t_nvmModuleDescriptor * p_nvmModuleDescriptor; 60 | 61 | /* NVM module structure */ 62 | typedef struct s_nvmModule_ 63 | { 64 | t_NvmModuleSize nvmModuleSize; /* Offset from &nvmModule where nvmModuleDescriptor structure is placed */ 65 | BYTE nvmModuleVariables[1000]; /* 1000 is just an arbitrary example */ 66 | /* Every field beyond this you must calculate the */ 67 | /* pointer to, because the size of the mvmModule */ 68 | /* is unknown at compilation time for other versions */ 69 | /* of the firmware. */ 70 | t_nvmModuleDescriptor nvmModuleDescriptor; 71 | } t_nvmModule; 72 | 73 | typedef t_nvmModule * p_nvmModule; 74 | 75 | /* NVM module update structure */ 76 | typedef struct s_nvmModuleUpdate_ 77 | { 78 | p_nvmModule nvmModulePtr; /* Pointer to where nvmModule structure will be placed in NVM memory */ 79 | t_NvmModuleSize wNvmModuleSizeOld; /* Size of the old NVM data from previous version of */ 80 | /* firmware, which may not be prepared for keeping old */ 81 | /* NVM data across firmware updates. */ 82 | /* Set this to the beginning of new NVM data. */ 83 | t_nvmModuleDescriptor nvmModuleDescriptor; 84 | } t_nvmModuleUpdate; 85 | 86 | /* NVM descriptor for OTA firmware update. Located at the end of NVM. */ 87 | typedef struct s_nvmDescriptor_ 88 | { 89 | WORD manufacturerID; 90 | WORD firmwareID; 91 | WORD productTypeID; 92 | WORD productID; 93 | WORD applicationVersion; 94 | WORD zwaveProtocolVersion; 95 | } t_nvmDescriptor; 96 | 97 | typedef t_nvmDescriptor * p_nvmDescriptor; 98 | 99 | /* Note from Keil knowledgebase: http://www.keil.com/support/docs/901.htm */ 100 | /* "The order is not necessarily taken from the variable declarations, but */ 101 | /* the first use of the variables." */ 102 | /* Therefore, when using #pragma ORDER to order variables, declare them in */ 103 | /* the order they should be in a collection. And none of them may be */ 104 | /* declared or known in any way from other header files. */ 105 | /* As nvmDescriptor shall be loacated last, the declaration below must not */ 106 | /* be done here, when someone includes this file to get knowledge of the */ 107 | /* struct t_nvmDescriptor for its size. */ 108 | /* "extern t_nvmDescriptor far nvmDescriptor;" */ 109 | 110 | /* NVM layout of NVM descriptor for firmware */ 111 | extern t_NvmModuleSize far nvmDescriptorSize; 112 | extern t_nvmDescriptor far nvmDescriptor; 113 | extern t_nvmModuleDescriptor far nvmDescriptorDescriptor; 114 | extern WORD far nvmModuleSizeEndMarker; /* Marks the end of NVM (no more NVM modules) with a zero WORD */ 115 | 116 | /* The starting address of the segment ?FD?ZW_NVM_DESCRIPTOR (to be used as a constant as (WORD)&_FD_ZW_NVM_DESCRIPTOR_S_) */ 117 | extern unsigned char _FD_ZW_NVM_DESCRIPTOR_S_; 118 | /* The length of the segment ?FD?ZW_NVM_DESCRIPTOR in bytes (to be used as a constant as (WORD)&_FD_ZW_NVM_DESCRIPTOR_L_) */ 119 | extern unsigned char _FD_ZW_NVM_DESCRIPTOR_L_; 120 | 121 | #endif /* _NVM_DESCRIPTOR_H_ */ 122 | -------------------------------------------------------------------------------- /API_includes/ZW_nvm_ext_api.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2014 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Declaration of external NVM application interface. 10 | * 11 | * Last Changed By: $Author: jsi $ 12 | * Revision: $Revision: 22797 $ 13 | * Last Changed: $Date: 2012-05-10 15:55:06 +0200 (to, 10 maj 2012) $ 14 | * 15 | ****************************************************************************/ 16 | #ifndef _ZW_NVM_EXT_API_H_ 17 | #define _ZW_NVM_EXT_API_H_ 18 | 19 | /****************************************************************************/ 20 | /* INCLUDE FILES */ 21 | /****************************************************************************/ 22 | 23 | 24 | /****************************************************************************/ 25 | /* EXPORTED DATA */ 26 | /****************************************************************************/ 27 | 28 | 29 | /****************************************************************************/ 30 | /* EXPORTED TYPES and DEFINITIONS */ 31 | /****************************************************************************/ 32 | 33 | 34 | /* ------------------------------------------------------------------------ */ 35 | /* NVM NVR specific definitions - MUST be set in NVR */ 36 | /* ------------------------------------------------------------------------ */ 37 | 38 | /* ------------------------------------------------------------------------ */ 39 | /* NVR field NVMT - NVM type - used by this SPI NVM driver for selecting */ 40 | /* the correct number of address bytes */ 41 | 42 | /* Current supported NVR NVMT settings */ 43 | 44 | /* ------------------------------------------------------------------------ */ 45 | /* NVR field NVMS - NVM size - used to set the correct Memorycapacity */ 46 | 47 | /* Current supported NVR NVMS settings */ 48 | 49 | /* ------------------------------------------------------------------------ */ 50 | /* NVR field NVMP - NVM page size - used to control the NVM buffer boundary */ 51 | 52 | /* Current supported NVR NVMP settings */ 53 | 54 | /* ------------------------------------------------------------------------ */ 55 | /* NVR field NVMCS - NVM Chip Select used to control which pin is used for */ 56 | /* chip select of the external SPI NVM */ 57 | 58 | /* Current supported NVR NVMCS settings */ 59 | /* NVMCS = 0x04 - PORT0.4 */ 60 | /* NVMCS = 0x14 - PORT1.4 */ 61 | /* NVMCS = 0x15 - PORT1.5 */ 62 | /* NVMCS = 0x25 - PORT2.5 */ 63 | /* NVMCS = 0x30 - PORT3.0 */ 64 | /* NVMCS = 0x34 - PORT3.4 */ 65 | /* NVMCS = 0x36 - PORT3.6 */ 66 | /* NVMCS = 0x37 - PORT3.7 */ 67 | 68 | /* ------------------------------------------------------------------------ */ 69 | /* NVM Definitions */ 70 | /* ------------------------------------------------------------------------ */ 71 | 72 | typedef struct _NVM_TYPE_T_ 73 | { 74 | BYTE manufacturerID; 75 | BYTE memoryType; 76 | BYTE memoryCapacity; 77 | } NVM_TYPE_T; 78 | 79 | 80 | /* --------------------- List of recognized NVM chips -------------------------------------------------------------- */ 81 | /* manufacturerID memoryType memoryCapacity NVMT NVMS NVMP Adressbytes */ 82 | /* at25128a 0xFF 0xFF 0xFF 0x01 0x0010 0x0040 0x02 */ 83 | /* M25PE10VP (SGS Thomson) 0x20 0x80 0x11 0x02 0x0080 0x0100 0x03 */ 84 | /* M25PE10VP (Micron) 0x20 0x80 0x11 0x02 0x0080 0x0100 0x03 */ 85 | /* M25PE20VP (Micron) 0x20 0x80 0x12 0x02 0x0100 0x0100 0x03 */ 86 | /* M25PE40VP (?) 0x20 0x80 0x13? 0x02 0x0200 0x0100 0x03 */ 87 | /* 25PE80VP (STMicro) 0x20 0x80 0x14 0x02 0x0400 0x0100 0x03 */ 88 | /* 25PE16VP (STMicro) 0x20 0x80 0x15 0x02 0x0800 0x0100 0x03 */ 89 | /* S25CM01A (SeikoInstruments) 0xFF 0xFF 0xFF 0x03 0x0080 0x0100 0x03 */ 90 | /* CAT25M01 (ON Semiconductor) 0xFF 0xFF 0xFF 0x03 0x0080 0x0100 0x03 */ 91 | 92 | typedef enum 93 | { 94 | NVM_MANUFACTURER = 0x20, 95 | NVM_MANUFACTURER_UNKNOWN = 0xFF 96 | } ENVM_MANUFACTURER_T; 97 | 98 | 99 | /* memoryType NVM type */ 100 | /* 0xFF EEPROM */ 101 | /* 0x80 FLASH */ 102 | typedef enum 103 | { 104 | NVM_TYPE_FLASH = 0x80, /* NVM is a FLASH */ 105 | NVM_TYPE_DATA_FLASH = 0x81, /* NVM is a DATAFLASH */ 106 | NVM_TYPE_EEPROM = 0xFF /* NVM is probably an EEPROM */ 107 | } ENVM_TYPE_T; 108 | 109 | 110 | /* memoryCapacity NVM size */ 111 | /* 0x0A 128kbit(16kB) */ 112 | /* 0x10 256kbit(32kB) */ 113 | /* 0x11 1mbit(128kB) */ 114 | /* 0x12 2mbit(256kB) */ 115 | /* 0x13 4mbit(512kB) */ 116 | /* 0x14 8mbit(1MB) */ 117 | /* 0x15 16mbit(2MB) */ 118 | /* 0x16 32mbit(4MB) */ 119 | /* 0x17 64mbit(8MB) */ 120 | typedef enum 121 | { 122 | NVM_SIZE_16KB = 0x0E, /* NVM is a known type and the size of 16KByte */ 123 | NVM_SIZE_32KB = 0x0F, /* NVM is a known type and the size of 32KByte */ 124 | NVM_SIZE_64KB = 0x10, /* NVM is a known type and the size of 32KByte */ 125 | NVM_SIZE_128KB = 0x11, /* NVM is a known type and the size of 128KByte */ 126 | NVM_SIZE_256KB = 0x12, /* NVM is a known type and the size of 256KByte */ 127 | NVM_SIZE_512KB = 0x13, /* NVM is a known type and the size of 512KByte */ 128 | NVM_SIZE_1MB = 0x14, /* NVM is a known type and the size of 1MByte */ 129 | NVM_SIZE_2MB = 0x15, /* NVM is a known type and the size of 2MByte */ 130 | NVM_SIZE_4MB = 0x16, /* NVM is a known type and the size of 4MByte */ 131 | NVM_SIZE_8MB = 0x17, /* NVM is a known type and the size of 8MByte */ 132 | NVM_SIZE_16MB = 0x18, /* NVM is a known type and the size of 16MByte */ 133 | NVM_SIZE_UNKNOWN = 0xFF /* NVM is a type unknown and size could not be determined */ 134 | } ENVM_CAPACITY_T; 135 | 136 | 137 | /****************************************************************************/ 138 | /* EXPORTED FUNCTIONS */ 139 | /****************************************************************************/ 140 | 141 | /*=============================== NVM_get_id ============================= 142 | ** Get the NVM ID 143 | ** 144 | ** Returns the NVM ID info in NVM_TYPE structure specified 145 | ** 146 | **--------------------------------------------------------------------------*/ 147 | void 148 | NVM_get_id( 149 | NVM_TYPE_T *pNVM_type); 150 | 151 | 152 | /*======================= NVM_ext_read_long_byte ========================= 153 | ** Read one byte from the External NVM 154 | ** 155 | **--------------------------------------------------------------------------*/ 156 | BYTE /*RET External EEPROM data */ 157 | NVM_ext_read_long_byte( 158 | DWORD offset); /*IN offset in the External NVM */ 159 | 160 | 161 | /*======================== NVM_ext_read_long_buffer ====================== 162 | ** Read an array of bytes from the External NVM to data buffer 163 | ** 164 | **--------------------------------------------------------------------------*/ 165 | void /*RET Nothing */ 166 | NVM_ext_read_long_buffer( 167 | DWORD offset, /*IN offset in the External NVM */ 168 | BYTE *buf, /*IN destination buffer pointer */ 169 | WORD length); /*IN number of bytes to read */ 170 | 171 | 172 | /*========================= NVM_ext_write_long_byte ====================== 173 | ** Write one byte to the External EEPROM 174 | ** 175 | **--------------------------------------------------------------------------*/ 176 | BOOL /*RET FALSE if value is identical to value in EEPROM else TRUE*/ 177 | NVM_ext_write_long_byte( 178 | DWORD offset, /*IN offset in the External NVM */ 179 | BYTE bData); /*IN data to write */ 180 | 181 | 182 | /*====================== NVM_ext_write_long_buffer ======================= 183 | ** Write an array of up to 64kbytes to the External EEPROM 184 | ** 185 | **--------------------------------------------------------------------------*/ 186 | BOOL /*RET false if buffer is identical to buffer in EEPROM */ 187 | NVM_ext_write_long_buffer( 188 | DWORD offset, /*IN offset in the External NVM */ 189 | BYTE *buf, /*IN source buffer pointer */ 190 | WORD length); /*IN number of bytes to write */ 191 | 192 | 193 | #endif /* _ZW_NVM_EXT_API_H_ */ 194 | 195 | -------------------------------------------------------------------------------- /API_includes/ZW_ota_compression_header.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (c) 2016 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Definition of the compression header format for OTA updates. 10 | * 11 | * Author: Jakob Buron 12 | * 13 | ****************************************************************************/ 14 | #ifndef ZW_OTA_COMPRESSION_HEADER_H_ 15 | #define ZW_OTA_COMPRESSION_HEADER_H_ 16 | #ifdef __C51__ 17 | #include 18 | #else 19 | #include 20 | #define BYTE BYTE /* This prevents subsequent includes of ZW_typedef from redefining BYTE/WORD/DWORD...*/ 21 | typedef uint8_t BYTE; 22 | typedef uint16_t WORD; 23 | #ifndef _ZW_TYPEDEFS_H_ 24 | typedef uint32_t DWORD; 25 | #endif 26 | typedef uint8_t BOOL; 27 | typedef BYTE * BYTE_P; 28 | // code is a reserved word in Keil C51, ignore with gcc 29 | #define code 30 | #endif 31 | #include 32 | #include "ZW_firmware_descriptor.h" 33 | #include "ZW_firmware_bootloader_defs.h" 34 | 35 | #ifdef __C51__ 36 | #define PACKED 37 | #else 38 | # ifdef __GNUC__ 39 | # ifdef __MINGW32__ 40 | /* mingw 4.7 and newer miscompiles packed structures in MS-bitfield mode */ 41 | # define PACKED __attribute__((packed,gcc_struct)) 42 | # else 43 | # define PACKED __attribute__((packed)) 44 | # endif 45 | # else 46 | # error "Need to define PACKED for this compiler" 47 | # endif 48 | #endif 49 | 50 | /* Compression Header types */ 51 | #define COMPRESSION_HEADER_TYPE_V1 0x80 /* V1 using FastLZ compression. Arbitrary numbering, not starting from zero because NVM could be initialized to that value*/ 52 | 53 | //#define ANYSIZE_ARRAY 1 54 | 55 | /* Header preceeding the compressed firmware. */ 56 | typedef struct s_compressedFirmwareHeader 57 | { 58 | /* All fields are BIG ENDIAN */ 59 | /* Type of the following header and compression format*/ 60 | uint8_t compressionHeaderType; 61 | /* Total length of compressed data */ 62 | uint32_t compressedLength; 63 | /* CRC16 covering this header and the compressed data */ 64 | uint16_t compressedCrc16; 65 | /* CRC16 covering the uncompressed image. 66 | * Can be compared to the firmwaredescriptor ApplicationImageCrcValue in code flash. */ 67 | uint16_t uncompressedCrc16; 68 | /* The scrambling key used for scrambling security keys in the compressed firmware */ 69 | uint8_t scramblingKey[16]; 70 | /* Variable length compressed data follows next */ 71 | uint16_t firmwareDescriptorChecksum; 72 | /* uint8_t compressedData[ANYSIZE_ARRAY]; */ 73 | } PACKED t_compressedFirmwareHeader; 74 | 75 | // Used for asserting struct is indeed packed 76 | #define COMPRESSED_FIRMWARE_HEADER_PACKED_LENGTH 27 77 | 78 | #endif /* ZW_OTA_COMPRESSION_HEADER_H_ */ 79 | -------------------------------------------------------------------------------- /API_includes/ZW_security_api.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * Copyright (c) 2013 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Some nice descriptive description. 10 | * 11 | * Author: Jakob Buron 12 | * 13 | * Last Changed By: $Author: jdo $ 14 | * Revision: $Revision: 1.38 $ 15 | * Last Changed: $Date: 2005/07/27 15:12:54 $ 16 | * 17 | ****************************************************************************/ 18 | #ifndef ZW_SECURITY_API_H_ 19 | #define ZW_SECURITY_API_H_ 20 | 21 | /****************************************************************************/ 22 | /* INCLUDE FILES */ 23 | /****************************************************************************/ 24 | #include 25 | 26 | /****************************************************************************/ 27 | /* EXPORTED TYPES and DEFINITIONS */ 28 | /****************************************************************************/ 29 | /* The security key a frame was received with or should be sent with. 30 | * 31 | * Special values: 32 | */ 33 | typedef enum SECURITY_KEY 34 | { 35 | SECURITY_KEY_NONE = 0x00, 36 | SECURITY_KEY_S2_UNAUTHENTICATED = 0x01, 37 | SECURITY_KEY_S2_AUTHENTICATED = 0x02, 38 | SECURITY_KEY_S2_ACCESS = 0x03, 39 | SECURITY_KEY_S0 = 0x04, 40 | } security_key_t; 41 | 42 | 43 | /** 44 | * Bitmask for security keys. Used by \ref ZW_GetSecurityKeys. 45 | */ 46 | #define SECURITY_KEY_S2_UNAUTHENTICATED_BIT 0x01 47 | #define SECURITY_KEY_S2_AUTHENTICATED_BIT 0x02 48 | #define SECURITY_KEY_S2_ACCESS_BIT 0x04 49 | #define SECURITY_KEY_S0_BIT 0x80 50 | 51 | #define SECURITY_KEY_S2_MASK (SECURITY_KEY_S2_UNAUTHENTICATED_BIT \ 52 | | SECURITY_KEY_S2_AUTHENTICATED_BIT \ 53 | | SECURITY_KEY_S2_ACCESS_BIT) 54 | #define SECURITY_KEY_NONE_MASK 0x00 55 | 56 | 57 | /** 58 | * Security S2 Public DSK Key length 59 | */ 60 | #define SECURITY_KEY_S2_PUBLIC_DSK_LENGTH 16 61 | 62 | 63 | /** 64 | * Security S2 Public CSA DSK Key length 65 | */ 66 | #define SECURITY_KEY_S2_PUBLIC_CSA_DSK_LENGTH 4 67 | 68 | 69 | /** 70 | * definitions for Security S2 inclusion Authentication 71 | */ 72 | typedef enum _E_SECURTIY_S2_AUTHENTICATION_ 73 | { 74 | SECURITY_AUTHENTICATION_SSA = 0x00, 75 | SECURITY_AUTHENTICATION_CSA = 0x01 76 | } e_security_s2_authentication_t; 77 | 78 | 79 | typedef struct _S_SECURITY_S2_INCLUSION_CSA_PUBLIC_DSK_ 80 | { 81 | BYTE aCSA_DSK[SECURITY_KEY_S2_PUBLIC_CSA_DSK_LENGTH]; 82 | } s_SecurityS2InclusionCSAPublicDSK_t; 83 | 84 | 85 | /** 86 | * Definitions for Application bound Security events 87 | * Delivered from protocol to Application through the Application implmemented 88 | * ApplicationSecurityEvent(s_application_security_event_data_t) 89 | */ 90 | typedef enum _E_APPLICATION_SECURITY_EVENT_ 91 | { 92 | E_APPLICATION_SECURITY_EVENT_S2_INCLUSION_REQUEST_DSK_CSA 93 | } e_application_security_event_t; 94 | 95 | 96 | /** 97 | * 98 | * 99 | */ 100 | typedef struct _S_APPLICATION_SECURITY_EVENT_DATA_ 101 | { 102 | e_application_security_event_t event; 103 | BYTE eventDataLength; 104 | BYTE *eventData; 105 | } s_application_security_event_data_t; 106 | 107 | 108 | /** 109 | * Application must implement this. Used by protocol to request/inform Application 110 | * of Security based Events. Currently only an event for Client Side Authentication (CSA) 111 | * has been defined - E_APPLICATION_SECURITY_EVENT_S2_INCLUSION_REQUEST_DSK_CSA. 112 | * 113 | * \ref E_APPLICATION_SECURITY_EVENT_S2_INCLUSION_REQUEST_DSK_CSA Security Event 114 | * Is posted by protocol when in S2 inclusion with CSA enabled and the 115 | * Server side DSK is needed. 116 | * Application must call ZW_SetSecurityS2InclusionCSA_DSK(s_SecurityS2InclusionCSAPublicDSK_t *) 117 | * with the retrieved Server/Controller side DSK. 118 | * 119 | * @param[in] securityEvent Pointer to structure containing the security event 120 | * and any possible data connected to the event. 121 | */ 122 | void ApplicationSecurityEvent(s_application_security_event_data_t *securiyEvent); 123 | 124 | 125 | /** 126 | * Application must implement this function 127 | * NOTE: If Z-Wave framework are used then ApplicationSecureCommandsSupported 128 | * are allready implemented in \ref ZW_TransportSecProtocol.c. 129 | */ 130 | void 131 | ApplicationSecureCommandsSupported( 132 | enum SECURITY_KEY eKey, /* IN Security Key to report on */ 133 | BYTE **pCmdClasses, /* OUT Cmd classes supported by endpoint */ 134 | BYTE *pLength); /* OUT Length of pCmdClasses, 0 if endpoint does not exist */ 135 | 136 | 137 | /** 138 | * Application must implement this function to return a bitmask of the 139 | * security keys requested by the node when joining a network. 140 | * The including controller may grant all or a subset of the requested 141 | * keys. 142 | * Supported keys: 143 | * \ref SECURITY_KEY_S0_BIT; 144 | * \ref SECURITY_KEY_S2_ACCESS_BIT; 145 | * \ref SECURITY_KEY_S2_AUTHENTICATED_BIT; 146 | * \ref SECURITY_KEY_S2_UNAUTHENTICATED_BIT; 147 | * \return A bitmask of supported security keys. 148 | * 149 | */ 150 | BYTE ApplicationSecureKeysRequested(void); 151 | 152 | 153 | /** 154 | * Application must implement this function to return a value of the 155 | * security authentication requested by the node when joining a network. 156 | * Supported methods: 157 | * \ref SECURITY_AUTHENTICATION_SSA; 158 | * \ref SECURITY_AUTHENTICATION_CSA; 159 | * 160 | */ 161 | BYTE ApplicationSecureAuthenticationRequested(void); 162 | 163 | 164 | /** 165 | * @brief 166 | * Set the Controller DSK requested by protocol for CSA inclusion through 167 | * calling ApplicationSecurityS2InclusionRequestDSK_CSA 168 | * 169 | * @param[in] response retrieved CSA DSK 170 | * 171 | */ 172 | void ZW_SetSecurityS2InclusionPublicDSK_CSA(s_SecurityS2InclusionCSAPublicDSK_t *response); 173 | 174 | 175 | /*=========================== ZW_GetSecurityKeys ========================= 176 | ** 177 | ** Returns a bitmask of security keys the application can request 178 | ** ZW_SendDataEX() to use. When the node is excluded, no security keys 179 | ** will be reported. 180 | ** 181 | ** Side effects: 182 | ** 183 | **--------------------------------------------------------------------------*/ 184 | BYTE ZW_GetSecurityKeys(void); 185 | 186 | 187 | /*====================== ZW_SetSecurityS0NetworkKey ====================== 188 | ** @brief 189 | ** Set the network key S0 in the protocol. 190 | ** This function is only to be called after a firmware update from an 191 | ** application based upon an SDK prior to 6.70, as example 6.51, 6.60, or 192 | ** 6.61 to an application based upon SDK 6.70 or later. 193 | ** 194 | ** Note: This is only relevant for a node that was securely included in an 195 | ** S0 based network. 196 | ** 197 | ** @param[in] network_key Pointer to the S0 network key for the home 198 | ** network. 16 bytes long. 199 | ** 200 | ** Side effects: 201 | ** 202 | **--------------------------------------------------------------------------*/ 203 | void ZW_SetSecurityS0NetworkKey(BYTE * network_key); 204 | 205 | 206 | /** 207 | * 208 | * 209 | */ 210 | void ZW_GetSecurityS2PublicDSK(BYTE *buf); 211 | 212 | 213 | #ifdef ZW_SECURITY_PROTOCOL_SINGLE_NETWORK_KEY 214 | /** 215 | * 216 | * 217 | */ 218 | void ZW_SetSecurityS2CriticalNodeID(BYTE bNodeID); 219 | #endif 220 | 221 | 222 | /* 223 | * 224 | * 225 | */ 226 | void ZW_s2_inclusion_init(void); 227 | 228 | 229 | #endif /* ZW_SECURITY_API_H_ */ 230 | -------------------------------------------------------------------------------- /API_includes/ZW_slave_api.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2013 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Z-Wave Slave node application interface 10 | * 11 | * Author: Ivar Jeppesen 12 | * 13 | * Last Changed By: $Author: jsi $ 14 | * Revision: $Revision: 28977 $ 15 | * Last Changed: $Date: 2014-06-04 13:28:14 +0200 (on, 04 jun 2014) $ 16 | * 17 | ****************************************************************************/ 18 | #ifndef _ZW_SLAVE_API_H_ 19 | #define _ZW_SLAVE_API_H_ 20 | 21 | #ifndef ZW_SLAVE 22 | #define ZW_SLAVE 23 | #endif 24 | 25 | /****************************************************************************/ 26 | /* INCLUDE FILES */ 27 | /****************************************************************************/ 28 | #include 29 | 30 | 31 | /****************************************************************************/ 32 | /* EXPORTED TYPES and DEFINITIONS */ 33 | /****************************************************************************/ 34 | 35 | /* ApplicationcSlaveUpdate status */ 36 | #define UPDATE_STATE_NODE_INFO_RECEIVED 0x84 37 | #define UPDATE_STATE_NOP_POWER_RECEIVED 0x83 38 | 39 | /*Defines used to handle inclusion and exclusion of node*/ 40 | #define ASSIGN_COMPLETE 0x00 41 | #define ASSIGN_NODEID_DONE 0x01 /*Node ID have been assigned*/ 42 | #define ASSIGN_RANGE_INFO_UPDATE 0x02 /*Node is doing Neighbor discovery*/ 43 | 44 | /* Mode parameters to ZW_SetLearnMode */ 45 | #define ZW_SET_LEARN_MODE_DISABLE 0x00 46 | #define ZW_SET_LEARN_MODE_CLASSIC 0x01 47 | #define ZW_SET_LEARN_MODE_NWI 0x02 48 | #define ZW_SET_LEARN_MODE_NWE 0x03 49 | 50 | /*=========================== ZW_SetLearnMode =========================== 51 | ** Enable/Disable home/node ID learn mode. 52 | ** When learn mode is enabled, received "Assign ID's Command" are handled: 53 | ** If the current stored ID's are zero, the received ID's will be stored. 54 | ** If the received ID's are zero the stored ID's will be set to zero. 55 | ** 56 | ** The learnFunc is called when the received assign command has been handled. 57 | ** The returned parameter is the learned Node ID. 58 | ** 59 | ** void RET Nothing 60 | ** ZW_SetLearnMode( 61 | ** BYTE mode, IN learnMode bitmask 62 | ** VOID_CALLBACKFUNC(learnFunc)(BYTE)); IN Node learn call back function. 63 | **--------------------------------------------------------------------------*/ 64 | #define ZW_SET_LEARN_MODE(mode, func) ZW_SetLearnMode(mode, func) 65 | 66 | 67 | /*=========================== ZW_SetDefault ================================ 68 | ** Remove all Nodes and timers from the EEPROM memory. 69 | ** Reset the homeID and nodeID 70 | ** Side effects: 71 | ** 72 | **--------------------------------------------------------------------------*/ 73 | #define ZW_SET_DEFAULT ZW_SetDefault 74 | 75 | 76 | /****************************************************************************/ 77 | /* EXPORTED DATA */ 78 | /****************************************************************************/ 79 | 80 | /****************************************************************************/ 81 | /* EXPORTED FUNCTIONS */ 82 | /* Implemented within the application moduls */ 83 | /****************************************************************************/ 84 | 85 | 86 | /*========================== ApplictionSlaveUpdate ======================= 87 | ** Inform a slave application that a node information is received. 88 | ** Called from the slave command handler when a node information frame 89 | ** is received and the Z-Wave protocol is not in a state where it is needed. 90 | ** 91 | **--------------------------------------------------------------------------*/ 92 | 93 | /** 94 | * \ingroup COMMON 95 | * The Z Wave protocol MAY notify a slave application by calling 96 | * \ref ApplicationSlaveUpdate when a Node Information Frame has been received. 97 | * The Z Wave protocol MAY refrain from calling the function if the protocol is 98 | * currently expecting node information. 99 | * 100 | * All slave libraries requires this function implemented by the application. 101 | * 102 | * Declared in: ZW_slave_api.h 103 | * 104 | * \param[in] bStatus The status, value could be one of the following: 105 | * - UPDATE_STATE_NODE_INFO_RECEIVED A node has sent its Node Info while the 106 | * Z Wave protocol is idle. 107 | * \param[in] bNodeID The updated node's node ID (1..232). 108 | * \param[in] pCmd Pointer of the updated node's node info. 109 | * \param[in] bLen The length of the pCmd parameter. 110 | * \serialapi{ZW->HOST: REQ | 0x49 | bStatus | bNodeID | bLen | basic | generic | specific | commandclasses[ ]} 111 | * 112 | */ 113 | extern void 114 | ApplicationSlaveUpdate( 115 | BYTE bStatus, /*IN Status event */ 116 | BYTE bNodeID, /*IN Node id of the node that send node info */ 117 | BYTE* pCmd, /*IN Pointer to Application Node information */ 118 | BYTE bLen); /*IN Node info length */ 119 | 120 | 121 | /** 122 | * Defines for ApplicationNetworkLearnModeCompleted nodeID. 123 | * if not 0-232 then following values are defined 124 | */ 125 | #define APPLICATION_NETWORK_LEARN_MODE_COMPLETED_FAILED 0xFF 126 | #define APPLICATION_NETWORK_LEARN_MODE_COMPLETED_SMART_START_IN_PROGRESS 0xFE 127 | #define APPLICATION_NETWORK_LEARN_MODE_COMPLETED_TIMEOUT 0xFD 128 | 129 | 130 | /** 131 | * @brief ApplicationNetworkLearnModeCompleted 132 | * Should be implemented by the Application. Called when node have started 133 | * inclusion/exclusion through ZW_NetworkLearnModeStart and node has been 134 | * included, excluded or learnmode either failed or timed out: 135 | * valid values for nodeID parameter: 136 | * @param nodeID IN parameter nodeID assigned, value can be on of the following 137 | * - 0 node has been Excluded and has been assigned this nodeID 138 | * - 1-232 node has been Included and has been assigned this nodeID 139 | * - APPLICATION_NETWORK_LEARN_MODE_COMPLETED_FAILED 140 | * Smart Start Security inclusion failed 141 | * - APPLICATION_NETWORK_LEARN_MODE_COMPLETED_SMART_START_IN_PROGRESS 142 | * A nodeID has been assigned do not go into sleepmode. Another call to 143 | * ApplicationNetworkLearnModeCompleted will come with final result. 144 | * - APPLICATION_NETWORK_LEARN_MODE_COMPLETED_TIMEOUT 145 | * LearnMode process timeout inclusion/exclusion did not start. 146 | * 147 | */ 148 | extern void 149 | ApplicationNetworkLearnModeCompleted( 150 | BYTE nodeID); 151 | 152 | 153 | /****************************************************************************/ 154 | /* EXPORTED FUNCTIONS */ 155 | /* Implemented within the Z-Wave slave modules */ 156 | /****************************************************************************/ 157 | 158 | 159 | /*=========================== ZW_SetLearnMode =========================== 160 | ** Enable/Disable home/node ID learn mode. 161 | ** When learn mode is enabled, received "Assign ID's Command" are handled: 162 | ** If the current stored ID's are zero, the received ID's will be stored. 163 | ** If the received ID's are zero the stored ID's will be set to zero. 164 | ** 165 | ** The learnFunc is called when the received assign command has been handled. 166 | ** 167 | **--------------------------------------------------------------------------*/ 168 | extern void /*RET Nothing */ 169 | ZW_SetLearnMode( 170 | BYTE mode, /* IN learnMode bitmask */ 171 | VOID_CALLBACKFUNC(learnFunc)(BYTE bStatus, BYTE nodeID)); /*IN Node learn call back function. */ 172 | 173 | 174 | /*=========================== ZW_SetDefault ================================ 175 | ** Reset the slave to its default state. 176 | ** Delete all routes in routing slave 177 | ** Reset the homeID and nodeID 178 | ** Side effects: 179 | ** 180 | **--------------------------------------------------------------------------*/ 181 | void /*RET Nothing */ 182 | ZW_SetDefault(void); 183 | 184 | #endif /* _ZW_SLAVE_API_H_ */ 185 | 186 | -------------------------------------------------------------------------------- /API_includes/ZW_slave_routing_api.h: -------------------------------------------------------------------------------- 1 | /******************************* ZW_SLAVE_ROUTING_API.H ******************************* 2 | * ####### 3 | * ## ## 4 | * # ## #### ##### ##### ## ## ##### 5 | * ## ## ## ## ## ## ## ## ## 6 | * ## # ###### ## ## #### ## ## #### 7 | * ## ## ## ## ## ## ##### ## 8 | * ####### #### ## ## ##### ## ##### 9 | * ##### 10 | * Z-Wave, the wireless lauguage. 11 | * 12 | * Copyright (c) 2001 13 | * Zensys A/S 14 | * Denmark 15 | * 16 | * All Rights Reserved 17 | * 18 | * This source file is subject to the terms and conditions of the 19 | * Zensys Software License Agreement which restricts the manner 20 | * in which it may be used. 21 | * 22 | *--------------------------------------------------------------------------- 23 | * 24 | * Description: Z-Wave Routing Slave node application interface 25 | * 26 | * Author: Johann Sigfredsson 27 | * 28 | * Last Changed By: $Author: jbu $ 29 | * Revision: $Revision: 30174 $ 30 | * Last Changed: $Date: 2014-12-08 15:02:53 +0100 (ma, 08 dec 2014) $ 31 | * 32 | ****************************************************************************/ 33 | #ifndef _ZW_SLAVE_ROUTING_API_H_ 34 | #define _ZW_SLAVE_ROUTING_API_H_ 35 | 36 | #ifndef ZW_SLAVE_ROUTING 37 | #define ZW_SLAVE_ROUTING 38 | #endif 39 | 40 | /****************************************************************************/ 41 | /* INCLUDE FILES */ 42 | /****************************************************************************/ 43 | /* Include the basic slave functionality */ 44 | #include 45 | 46 | #include 47 | 48 | /****************************************************************************/ 49 | /* EXPORTED TYPES and DEFINITIONS */ 50 | /****************************************************************************/ 51 | 52 | 53 | /* ZW_REQUEST_NETWORK_UPDATE callback values */ 54 | #define ZW_ROUTE_UPDATE_DONE 0x00 55 | #define ZW_ROUTE_UPDATE_ABORT 0x01 56 | #define ZW_ROUTE_UPDATE_WAIT 0x02 57 | #define ZW_ROUTE_UPDATE_DISABLED 0x03 58 | 59 | 60 | /*================== ZW_REQUEST_NEW_ROUTE_DESTINATIONS ==================== 61 | ** Request new destinations for return routes. 62 | ** list = pointer to array of node ids 63 | ** len = length of nodeID array (Max len = 64 | ** ZW_MAX_RETURN_ROUTE_DESTINATIONS 65 | ** func = callback, called with status when operation is done. 66 | ** status can be one of the following: 67 | ** 68 | ** ZW_ROUTE_UPDATE_DONE - The update process is ended successfully. 69 | ** ZW_ROUTE_UPDATE_ABORT - The update process aborted because of error. 70 | ** ZW_ROUTE_UPDATE_WAIT - The SUC node is busy. 71 | ** ZW_ROUTE_UPDATE_DISABLED - The SUC functionality is disabled. 72 | ** 73 | **--------------------------------------------------------------------------*/ 74 | #define ZW_REQUEST_NEW_ROUTE_DESTINATIONS(list,len,func) ZW_RequestNewRouteDestinations(list,len,func) 75 | 76 | /*================== ZW_REQUEST_NEW_ROUTE_DESTINATIONS ==================== 77 | ** This function request network update from the Static Update Controller 78 | ** Callback status will be one of following 79 | ** ZW_ROUTE_UPDATE_DONE - The update process is ended successfully. 80 | ** ZW_ROUTE_UPDATE_ABORT - The update process aborted because of error. 81 | ** ZW_ROUTE_UPDATE_WAIT - The SUC node is busy. 82 | ** ZW_ROUTE_UPDATE_DISABLED - The SUC functionality is disabled. 83 | 84 | ------------------------------------------------------------------------*/ 85 | #define ZW_REQUEST_NETWORK_UPDATE(FUNC) ZW_RequestNetWorkUpdate(FUNC) 86 | 87 | /*==================== ZW_IS_NODE_WITHIN_DIRECT_RANGE ===================== 88 | ** Test if ReturnRouted indicate that bNodeID is within direct range. 89 | ** 90 | **--------------------------------------------------------------------------*/ 91 | #define ZW_IS_NODE_WITHIN_DIRECT_RANGE(nid) ZW_IsNodeWithinDirectRange(nid) 92 | 93 | /*============================ ZW_RequestNodeInfo ====================== 94 | ** Function description. 95 | ** Request a node to send it's node information. 96 | ** Function return TRUE if the request is send, else it return FALSE. 97 | ** FUNC is a callback function, which is called with the status of the 98 | ** Request nodeinformation frame transmission. 99 | ** If a node sends its node info, ApplicationSlaveUpdate will be called 100 | ** with UPDATE_STATE_NODE_INFO_RECEIVED as status together with the received 101 | ** nodeinformation. 102 | ** 103 | ** Side effects: 104 | ** 105 | **--------------------------------------------------------------------------*/ 106 | #define ZW_REQUEST_NODE_INFO(NODEID, FUNC) ZW_RequestNodeInfo(NODEID, FUNC) 107 | 108 | 109 | /*=========================== ZW_GET_SUC_NODEID =========================== 110 | ** Function description 111 | ** This function gets the nodeID of the current Static Update Controller 112 | ** if ZERO then no SUC is available 113 | ** 114 | **--------------------------------------------------------------------------*/ 115 | #define ZW_GET_SUC_NODEID() ZW_GetSUCNodeID() 116 | 117 | 118 | /****************************************************************************/ 119 | /* EXPORTED FUNCTIONS */ 120 | /* Implemented within the Z-Wave moduls */ 121 | /****************************************************************************/ 122 | 123 | /*====================== ZW_AreNodeWithinDirectRange ====================== 124 | ** Test if ReturnRouted indicate that bNodeID is within direct range. 125 | ** 126 | **--------------------------------------------------------------------------*/ 127 | BOOL /*RET TRUE if neighbours, FALSE if not*/ 128 | ZW_IsNodeWithinDirectRange( 129 | BYTE bNodeID); /*IN nodeID to check*/ 130 | /*======================= ZW_RequestNewRouteDestinations ================= 131 | ** Request new destinations for return routes. 132 | ** 133 | ** Side effects: 134 | ** 135 | **--------------------------------------------------------------------------*/ 136 | BOOL /*RET TRUE if SUC/SIS exist FALSE if not*/ 137 | ZW_RequestNewRouteDestinations( 138 | BYTE_P destList, /*IN Pointer to new destinations*/ 139 | BYTE destListLen, /*IN len of buffer */ 140 | VOID_CALLBACKFUNC(completedFunc)(BYTE txStatus)); /* IN callback function called when completed*/ 141 | 142 | /*---------------------------------------------------------------------------- 143 | This function resquest network update from the Static Update Controller 144 | ----------------------------------------------------------------------------*/ 145 | BYTE /* RET: True; SUC is known to the controller, */ 146 | /* FALSE; SUC not known to the controller */ 147 | ZW_RequestNetWorkUpdate( 148 | VOID_CALLBACKFUNC(completedFunc)(BYTE txStatus)); /* IN call back function indicates of the update sucessed or failed*/ 149 | 150 | /*============================ ZW_RequestNodeInfo ====================== 151 | ** Function description. 152 | ** Request a node to send it's node information. 153 | ** Function return TRUE if the request is send, else it return FALSE. 154 | ** FUNC is a callback function, which is called with the status of the 155 | ** Request nodeinformation frame transmission. 156 | ** If a node sends its node info, ApplicationSlaveUpdate will be called 157 | ** with UPDATE_STATE_NODE_INFO_RECEIVED as status together with the received 158 | ** nodeinformation. 159 | ** 160 | ** Side effects: 161 | ** 162 | **--------------------------------------------------------------------------*/ 163 | BOOL /*RET FALSE if transmitter busy */ 164 | ZW_RequestNodeInfo( 165 | BYTE nodeID, /*IN: node id of the node to request node info from it.*/ 166 | VOID_CALLBACKFUNC(completedFunc)(BYTE, TX_STATUS_TYPE *)); /* IN Callback function */ 167 | 168 | 169 | /*============================ ZW_GetSUCNodeID =========================== 170 | ** Function description 171 | ** This function gets the nodeID of the current Static Update Controller 172 | ** if ZERO then no SUC is available 173 | ** 174 | **--------------------------------------------------------------------------*/ 175 | BYTE /*RET nodeID on SUC, if ZERO -> no SUC */ 176 | ZW_GetSUCNodeID(void); /* IN Nothing */ 177 | 178 | #endif /* _ZW_SLAVE_ROUTING_API_H_ */ 179 | 180 | -------------------------------------------------------------------------------- /API_includes/ZW_transport_api.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * Copyright (c) 2001-2013 4 | * Sigma Designs, Inc. 5 | * All Rights Reserved 6 | * 7 | *--------------------------------------------------------------------------- 8 | * 9 | * Description: Z-Wave Transport Application layer interface 10 | * 11 | * Author: Ivar Jeppesen 12 | * 13 | * Last Changed By: $Author: jsi $ 14 | * Revision: $Revision: 31344 $ 15 | * Last Changed: $Date: 2015-04-17 13:53:23 +0200 (fr, 17 apr 2015) $ 16 | * 17 | ****************************************************************************/ 18 | /** 19 | * \file ZW_transport_api.h 20 | * \brief Z-Wave Transport Application layer interface. 21 | * 22 | * The Z Wave transport layer controls transfer of data between Z Wave nodes 23 | * including retransmission, frame check and acknowledgement. The Z Wave 24 | * transport interface includes functions for transfer of data to other Z Wave 25 | * nodes. Application data received from other nodes is handed over to the 26 | * application via the \ref ApplicationCommandHandler function. The ZW_MAX_NODES 27 | * define defines the maximum of nodes possible in a Z Wave network. 28 | */ 29 | #ifndef _ZW_TRANSPORT_API_H_ 30 | #define _ZW_TRANSPORT_API_H_ 31 | #include 32 | #include 33 | 34 | /****************************************************************************/ 35 | /* INCLUDE FILES */ 36 | /****************************************************************************/ 37 | 38 | /****************************************************************************/ 39 | /* EXPORTED TYPES and DEFINITIONS */ 40 | /****************************************************************************/ 41 | 42 | /* Max number of nodes in a Z-wave system */ 43 | #define ZW_MAX_NODES 232 44 | 45 | /************************************************************/ 46 | /* Node Information frame*/ 47 | /************************************************************/ 48 | #define NODEPARM_MAX 35 /* max. number of parameters */ 49 | 50 | 51 | /* Transmit frame option flags */ 52 | #define TRANSMIT_OPTION_ACK 0x01 /* request acknowledge from destination node */ 53 | #define TRANSMIT_OPTION_LOW_POWER 0x02 /* transmit at low output power level (1/3 of normal RF range) */ 54 | #define TRANSMIT_OPTION_MULTICAST_AS_BROADCAST 0x02 /* The multicast frame should be send as a broadcast */ 55 | #ifdef ZW_SLAVE 56 | #define TRANSMIT_OPTION_RETURN_ROUTE 0x04 /* request transmission via return route */ 57 | #endif 58 | #define TRANSMIT_OPTION_AUTO_ROUTE 0x04 /* request retransmission via repeater nodes */ 59 | /* do not use response route - Even if available */ 60 | #define TRANSMIT_OPTION_NO_ROUTE 0x10 61 | /* Use explore frame if needed */ 62 | #define TRANSMIT_OPTION_EXPLORE 0x20 63 | 64 | /* Transmit frame option flag which are valid when sending explore frames */ 65 | #define TRANSMIT_EXPLORE_OPTION_ACK TRANSMIT_OPTION_ACK 66 | #define TRANSMIT_EXPLORE_OPTION_LOW_POWER TRANSMIT_OPTION_LOW_POWER 67 | 68 | /* Allow Transport Service segmentation of long messages */ 69 | #define TRANSMIT_OPTION_2_TRANSPORT_SERVICE 0x01 70 | #define TRANSMIT_OPTION_2_FOLLOWUP 0x08 71 | 72 | /* Received frame status flags */ 73 | /** 74 | * \defgroup RECEIVE_STATUS Status codes for receiving frames. 75 | * \addtogroup RECEIVE_STATUS 76 | * @{ 77 | */ 78 | 79 | /** 80 | * A response route is locked by the application 81 | */ 82 | #define RECEIVE_STATUS_ROUTED_BUSY 0x01 83 | /** 84 | * Received at low output power level, this must 85 | * have the same value as TRANSMIT_OPTION_LOW_POWER 86 | */ 87 | #define RECEIVE_STATUS_LOW_POWER 0x02 88 | /** 89 | * Mask for masking out the received frametype bits 90 | */ 91 | #define RECEIVE_STATUS_TYPE_MASK 0x0C 92 | /** 93 | * Received frame is singlecast frame (rxOptions == xxxx00xx) 94 | */ 95 | #define RECEIVE_STATUS_TYPE_SINGLE 0x00 96 | /** 97 | * Received frame is broadcast frame (rxOptions == xxxx01xx) 98 | */ 99 | #define RECEIVE_STATUS_TYPE_BROAD 0x04 100 | /** 101 | * Received frame is multicast frame (rxOptions == xxxx10xx) 102 | */ 103 | #define RECEIVE_STATUS_TYPE_MULTI 0x08 104 | /** 105 | * Received frame is an explore frame (rxOptions == xxx1xxxx) 106 | * Only TYPE_BROAD can be active at the same time as TYPE_EXPLORE 107 | */ 108 | #define RECEIVE_STATUS_TYPE_EXPLORE 0x10 109 | /** 110 | * Received frame is not send to me (rxOptions == x1xxxxxx) 111 | * - useful only in promiscuous mode 112 | */ 113 | #define RECEIVE_STATUS_FOREIGN_FRAME 0x40 114 | /** 115 | * Received frame is send on another network (rxOptions == 1xxxxxxx) 116 | * - useful only in Smart Start - used when receiving INIF from another network 117 | */ 118 | #define RECEIVE_STATUS_FOREIGN_HOMEID 0x80 119 | 120 | /** 121 | * @} 122 | */ 123 | 124 | /* Predefined Node ID's */ 125 | #define NODE_BROADCAST 0xFF /* broadcast */ 126 | #define ZW_TEST_NOT_A_NODEID 0x00 /* */ 127 | 128 | /* Transmit complete codes */ 129 | #define TRANSMIT_COMPLETE_OK 0x00 130 | #define TRANSMIT_COMPLETE_NO_ACK 0x01 /* retransmission error */ 131 | #define TRANSMIT_COMPLETE_FAIL 0x02 /* transmit error */ 132 | #define TRANSMIT_ROUTING_NOT_IDLE 0x03 /* transmit error */ 133 | #ifdef ZW_CONTROLLER 134 | /* Assign route transmit complete but no routes was found */ 135 | #define TRANSMIT_COMPLETE_NOROUTE 0x04 /* no route found in assignroute */ 136 | /* therefore nothing was transmitted */ 137 | #define TRANSMIT_COMPLETE_VERIFIED 0x05 /* Verified delivery */ 138 | #endif 139 | 140 | /* ZW_REDISCOVERY_NEEDED callback values. */ 141 | /* Note that they are different from ZW_REQUEST_NETWORK_UPDATE callbacks */ 142 | #define ZW_ROUTE_LOST_FAILED 0x04 /*Node Asked wont help us*/ 143 | #define ZW_ROUTE_LOST_ACCEPT 0x05 /*Accepted to help*/ 144 | 145 | 146 | #ifdef ZW_ROUTING_DEMO 147 | /* Max hops in route */ 148 | #define TRANSMIT_ROUTED_ATTEMPT 0x08 149 | #endif /*ZW_ROUTING_DEMO*/ 150 | 151 | #define ZW_MAX_CACHED_RETURN_ROUTE_DESTINATIONS 5 152 | 153 | #define ZW_RF_TEST_SIGNAL_CARRIER 0x00 154 | #define ZW_RF_TEST_SIGNAL_CARRIER_MODULATED 0x01 155 | 156 | /* Max hops in route */ 157 | #define MAX_REPEATERS 4 158 | 159 | 160 | /* TX_STATUS_TYPE Last Used Route array size definitions */ 161 | #define LAST_USED_ROUTE_CONF_SIZE 1 162 | #define LAST_USED_ROUTE_SIZE (MAX_REPEATERS + LAST_USED_ROUTE_CONF_SIZE) 163 | 164 | /* TX_STATUS_TYPE Last Used Route array index definitions */ 165 | #define LAST_USED_ROUTE_REPEATER_0_INDEX 0 166 | #define LAST_USED_ROUTE_REPEATER_1_INDEX 1 167 | #define LAST_USED_ROUTE_REPEATER_2_INDEX 2 168 | #define LAST_USED_ROUTE_REPEATER_3_INDEX 3 169 | #define LAST_USED_ROUTE_CONF_INDEX 4 170 | 171 | 172 | /* RSSI feedback constants */ 173 | /* This is a signed 8-bit value. Note that values from RSSI_RESERVED_START to 174 | * 124 are reserved. All values below RSSI_RESERVED_START are received power 175 | * in dBms. Other values are defined below. */ 176 | #define RSSI_NOT_AVAILABLE 127 /* RSSI measurement not available */ 177 | #define RSSI_MAX_POWER_SATURATED 126 /* Receiver saturated. RSSI too high to measure precisely. */ 178 | #define RSSI_BELOW_SENSITIVITY 125 /* No signal detected. The RSSI is too low to measure precisely. */ 179 | #define RSSI_RESERVED_START 11 /* All values above and including RSSI_RESERVED_START are reserved, 180 | except those defined above. */ 181 | 182 | 183 | /* RSSI value array used in TX_STATUS_TYPE. 184 | * Each value is an RSSI feedback constant defined above. */ 185 | struct rssi_val { 186 | signed char incoming[MAX_REPEATERS + 1]; 187 | }; 188 | 189 | typedef struct _S_ROUTE_LINK_ 190 | { 191 | BYTE from; 192 | BYTE to; 193 | } S_ROUTE_LINK; 194 | 195 | /* Transport routing scheme state define definitions */ 196 | /* 1 = direct, 2 = ApplicationStaticRoute, 3 = responseRoute/lastworkingRoute, */ 197 | /* 4 = Next to LastWorkingRoute(controller), 5 = returnRoute/controllerAutoRoute, 6 = directResort and 7 = explore */ 198 | typedef enum _E_ROUTING_SCHEME_ 199 | { 200 | ROUTINGSCHEME_IDLE = 0, 201 | ROUTINGSCHEME_DIRECT = 1, 202 | ROUTINGSCHEME_CACHED_ROUTE_SR = 2, 203 | ROUTINGSCHEME_CACHED_ROUTE = 3, 204 | ROUTINGSCHEME_CACHED_ROUTE_NLWR = 4, 205 | ROUTINGSCHEME_ROUTE = 5, 206 | ROUTINGSCHEME_RESORT_DIRECT = 6, 207 | ROUTINGSCHEME_RESORT_EXPLORE = 7 208 | } E_ROUTING_SCHEME; 209 | 210 | 211 | typedef struct _TX_STATUS_TYPE_ 212 | { 213 | WORD wTransmitTicks; /* Passed 10ms ticks */ 214 | BYTE bRepeaters; /* Repeaters in route, zero for direct range */ 215 | /* rssi_values per hop for direct and routed frames. 216 | * Contains repeaters + 1 values. */ 217 | struct rssi_val rssi_values; 218 | BYTE bACKChannelNo; 219 | BYTE bLastTxChannelNo; 220 | E_ROUTING_SCHEME bRouteSchemeState; 221 | BYTE pLastUsedRoute[LAST_USED_ROUTE_SIZE]; 222 | BYTE bRouteTries; 223 | S_ROUTE_LINK bLastFailedLink; 224 | } TX_STATUS_TYPE; 225 | 226 | 227 | typedef struct _RECEIVE_OPTIONS_TYPE 228 | { 229 | /* Frame header info */ 230 | BYTE rxStatus; 231 | /* Command sender Node ID */ 232 | BYTE sourceNode; 233 | /* Frame destination ID, only valid when frame is not Multicast*/ 234 | BYTE destNode; 235 | /* Average RSSI val in dBm as defined in RSSI feedback constants above */ 236 | signed char rxRSSIVal; 237 | /* Security key frame was received with. */ 238 | enum SECURITY_KEY securityKey; 239 | } RECEIVE_OPTIONS_TYPE; 240 | 241 | 242 | #if defined(ZW_SLAVE_ENHANCED_232) || defined(ZW_SLAVE_ROUTING) 243 | enum ZW_SENDDATA_EX_RETURN_CODES 244 | { 245 | ZW_TX_FAILED = 0, 246 | ZW_TX_IN_PROGRESS = 1 247 | } ; 248 | 249 | 250 | /** 251 | * This flag will activate frame delivery. 252 | * 253 | * In this transmission mode the S2_send_data will try 254 | * to verify that the receiver understood the sent message. 255 | * This is done by waiting a little to see if the node will 256 | * respond nonce report to the encrypted message. If the node 257 | * does respond with a nonce report then the S2_send_data 258 | * call will automatically cause the system to re-sync the node, 259 | * and deliver the message 260 | * 261 | */ 262 | #define S2_TXOPTION_VERIFY_DELIVERY 1 263 | 264 | /** 265 | * This flag must be present on all single cast followup messages. 266 | */ 267 | #define S2_TXOPTION_SINGLECAST_FOLLOWUP 2 268 | 269 | /** 270 | * This flag must be present on the first, and only the first single 271 | * cast followup message in a S2 multicast transmission. 272 | */ 273 | #define S2_TXOPTION_FIRST_SINGLECAST_FOLLOWUP 4 274 | 275 | 276 | /* Transmit options for ZW_SendDataEx */ 277 | typedef struct _TRANSMIT_OPTIONS_TYPE 278 | { 279 | /* Destination node ID - 0xFF == all nodes */ 280 | BYTE destNode; 281 | /* Reserved */ 282 | BYTE bSrcNode; 283 | /* Transmit options*/ 284 | BYTE txOptions; 285 | /* Options for enabling specific Security scheme functionality */ 286 | BYTE txSecOptions; 287 | /* Security key to use for sending. */ 288 | enum SECURITY_KEY securityKey; 289 | /* More transmit options */ 290 | BYTE txOptions2; 291 | } TRANSMIT_OPTIONS_TYPE; 292 | 293 | /* Transmit options for ZW_SendDataMultiEx */ 294 | typedef struct _TRANSMIT_MULTI_OPTIONS_TYPE 295 | { 296 | /* Destination group ID */ 297 | BYTE groupID; 298 | /* Reserved */ 299 | BYTE bSrcNode; 300 | /* Transmit options*/ 301 | BYTE txOptions; 302 | /* Security key to use for sending - only S2 keys are valid. */ 303 | enum SECURITY_KEY securityKey; 304 | } TRANSMIT_MULTI_OPTIONS_TYPE; 305 | 306 | typedef BYTE nodemask_t[MAX_NODEMASK_LENGTH]; 307 | 308 | #endif /* #if defined(ZW_SLAVE_ENHANCED_232) || defined(ZW_SLAVE_ROUTING) */ 309 | 310 | 311 | 312 | #ifdef ZW_SLAVE_ROUTING 313 | 314 | /*============================ ZW_RouteDestinations ====================== 315 | ** Structure description 316 | ** This contains a list of nodes that currently can be reached via 317 | ** return routes. 318 | ** This list MUST not be altered by the Application 319 | ** 320 | **--------------------------------------------------------------------------*/ 321 | extern BYTE ZW_RouteDestinations[ZW_MAX_CACHED_RETURN_ROUTE_DESTINATIONS]; 322 | 323 | #endif /* ZW_SLAVE_ROUTING */ 324 | 325 | #if defined(ZW_CONTROLLER) && !defined(ZW_CONTROLLER_BRIDGE) || (defined(ZW_SLAVE) && !defined(ZW_SLAVE_ROUTING) && !defined(ZW_SLAVE_ENHANCED_232)) 326 | /*============================== ZW_SendData ============================ 327 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 328 | ** 329 | ** 330 | ** txOptions: 331 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 332 | ** normal RF range). 333 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 334 | ** singlecast frame to each of the destination nodes 335 | ** and request acknowledge from each destination node. 336 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames 337 | ** via repeater nodes (at normal output power level). 338 | ** TRANSMIT_OPTION_EXPLORE Use explore frame route resolution if all else fails 339 | ** 340 | ** extern BYTE RET FALSE if transmitter queue overflow 341 | ** ZW_SendData( 342 | ** BYTE nodeID, IN Destination node ID (0xFF == broadcast) 343 | ** BYTE *pData, IN Data buffer pointer 344 | ** BYTE dataLength, IN Data buffer length 345 | ** BYTE txOptions, IN Transmit option flags 346 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 347 | ** BYTE txStatus, IN Transmit status 348 | ** TX_STATUS_TYPE*)); IN Transmit status report 349 | **--------------------------------------------------------------------------*/ 350 | #define ZW_SEND_DATA(node,data,length,options,func) ZW_SendData(node,data,length,options,func) 351 | 352 | #endif /* #if defined(ZW_CONTROLLER) && !defined(ZW_CONTROLLER_BRIDGE) || (defined(ZW_SLAVE) && !defined(ZW_SLAVE_ROUTING) && !defined(ZW_SLAVE_ENHANCED_232)) */ 353 | 354 | #ifdef ZW_CONTROLLER_BRIDGE 355 | 356 | /*=============================== ZW_SendData_Bridge ======================= 357 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 358 | ** 359 | ** 360 | ** txOptions: 361 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 362 | ** normal RF range). 363 | ** TRANSMIT_OPTION_ACK The destination is asked to acknowledge the reception 364 | ** of the frame. A maximum of 2 retries are done if no 365 | ** ACK received. 366 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames 367 | ** via repeater nodes (at normal output power level). 368 | ** TRANSMIT_OPTION_EXPLORE Use explore frame route resolution if all else fails 369 | ** 370 | ** extern BYTE RET FALSE if transmitter queue overflow 371 | ** ZW_SendData_Bridge( 372 | ** BYTE bSrcNodeID, IN Source node ID 373 | ** BYTE nodeID, IN Destination node ID (0xFF == broadcast) 374 | ** BYTE *pData, IN Data buffer pointer 375 | ** BYTE dataLength, IN Data buffer length 376 | ** BYTE txOptions, IN Transmit option flags 377 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 378 | ** BYTE txStatus, IN Transmit status 379 | ** TX_STATUS_TYPE*)); IN Transmit status report 380 | **--------------------------------------------------------------------------*/ 381 | /* For backward compilability */ 382 | #define ZW_SendData(node,data,length,options,func) ZW_SendData_Bridge(0xff,node,data,length,options,func) 383 | #define ZW_SEND_DATA(node,data,length,options,func) ZW_SendData_Bridge(0xff,node,data,length,options,func) 384 | /* Use this */ 385 | #define ZW_SEND_DATA_BRIDGE(srcnode,node,data,length,options,func) ZW_SendData_Bridge(srcnode,node,data,length,options,func) 386 | 387 | #endif /* ZW_CONTROLLER_BRIDGE */ 388 | 389 | 390 | #if defined(ZW_CONTROLLER) || defined(ZW_SLAVE_ROUTING) 391 | 392 | /*============================ ZW_SendDataAbort ======================== 393 | ** Abort the ongoing transmit started with ZW_SendData() 394 | ** 395 | ** Side effects: 396 | ** 397 | **--------------------------------------------------------------------------*/ 398 | #define ZW_SEND_DATA_ABORT() ZW_SendDataAbort() 399 | 400 | 401 | #ifndef ZW_CONTROLLER_BRIDGE 402 | /*=============================== ZW_SendDataMulti ====================== 403 | ** Transmit data buffer to a list of Z-Wave Nodes (multicast frame). 404 | ** 405 | ** 406 | ** txOptions: 407 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 408 | ** normal RF range). 409 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 410 | ** singlecast frame to each of the destination nodes 411 | ** and request acknowledge from each destination node. 412 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames 413 | ** via repeater nodes (at normal output power level). 414 | ** 415 | ** extern BYTE RET FALSE if transmitter queue overflow 416 | ** ZW_SendDataMulti( 417 | ** BYTE *pNodeIDList, IN List of destination node ID's 418 | ** BYTE numberNodes, IN Number of Nodes 419 | ** BYTE *pData, IN Data buffer pointer 420 | ** BYTE dataLength, IN Data buffer length 421 | ** BYTE txOptions, IN Transmit option flags 422 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 423 | ** BYTE txStatus)); IN Transmit status 424 | **--------------------------------------------------------------------------*/ 425 | #define ZW_SEND_DATA_MULTI(nodelist,data,length,options,func) ZW_SendDataMulti(nodelist,data,length,options,func) 426 | 427 | #else 428 | 429 | /*============================= ZW_SendDataMulti_Bridge ==================== 430 | ** Transmit data buffer to a list of Z-Wave Nodes (multicast frame). 431 | ** 432 | ** 433 | ** txOptions: 434 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 435 | ** normal RF range). 436 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 437 | ** singlecast frame to each of the destination nodes 438 | ** and request acknowledge from each destination node. 439 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames 440 | ** via repeater nodes (at normal output power level). 441 | ** TRANSMIT_OPTION_EXPLORE Use explore frame route resolution if all else fails 442 | ** 443 | ** extern BYTE RET FALSE if transmitter queue overflow 444 | ** ZW_SendDataMulti_Bridge( 445 | ** BYTE bSrcNodeID, IN Source NodeID - if 0xFF then controller ID is set as source 446 | ** BYTE *pNodeIDList, IN List of destination node ID's 447 | ** BYTE numberNodes, IN Number of Nodes 448 | ** BYTE *pData, IN Data buffer pointer 449 | ** BYTE dataLength, IN Data buffer length 450 | ** BYTE txOptions, IN Transmit option flags 451 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 452 | ** BYTE txStatus)); IN Transmit status 453 | **--------------------------------------------------------------------------*/ 454 | #define ZW_SendDataMulti(nodelist,data,length,options,func) ZW_SendDataMulti_Bridge(0xff,nodelist,data,length,options,func) 455 | #define ZW_SEND_DATA_MULTI(nodelist,data,length,options,func) ZW_SendDataMulti_Bridge(0xff,nodelist,data,length,options,func) 456 | #define ZW_SEND_DATA_MULTI_BRIDGE(srcId,nodelist,data,length,options,func) ZW_SendDataMulti_Bridge(srcId,nodelist,data,length,options,func) 457 | 458 | #endif /* !ZW_CONTROLLER_BRIDGE */ 459 | 460 | #endif /* ZW_CONTROLLER || ZW_SLAVE_ROUTING */ 461 | 462 | 463 | /*============================ ZW_SEND_CONST ============================= 464 | ** Function description 465 | ** If production test is enabled during start up. 466 | ** Calling this function will transmit a constant signal until a new 467 | ** RF function is called 468 | ** 469 | **--------------------------------------------------------------------------*/ 470 | #define ZW_SEND_CONST() ZW_SendConst(TRUE, 1, ZW_RF_TEST_SIGNAL_CARRIER) 471 | 472 | 473 | #ifdef ZW_SLAVE 474 | /*============================ ZW_LOCK_RESPONSE_ROUTE ======================== 475 | ** Function description 476 | ** This function locks and unlocks all return routes 477 | ** IN nodeID != 0x00 lock route to node 478 | ** nodeDI == 0x00 unlock entry 479 | ** Side effects: 480 | ** 481 | **--------------------------------------------------------------------------*/ 482 | #define ZW_LOCK_RESPONSE_ROUTE(node) ZW_LockRoute(node) 483 | 484 | #else 485 | 486 | /*============================ ZW_LOCK_RESPONSE_ROUTE ======================== 487 | ** Function description 488 | ** This function locks and unlocks all Last Working Routes for purging 489 | ** IN bLockRoute == TRUE lock all Last Working Routes - no purging allowed 490 | ** bLockRoute == FALSE unlock purging of Last Working Routes 491 | ** 492 | ** Side effects: 493 | ** 494 | **--------------------------------------------------------------------------*/ 495 | #define ZW_LOCK_RESPONSE_ROUTE(bLockRoute) ZW_LockRoute(bLockRoute) 496 | #define ZW_LOCK_ROUTE(bLockRoute) ZW_LockRoute(bLockRoute) 497 | 498 | #endif /* ZW_SLAVE */ 499 | 500 | 501 | /****************************************************************************/ 502 | /* EXPORTED DATA */ 503 | /****************************************************************************/ 504 | 505 | /****************************************************************************/ 506 | /* EXPORTED FUNCTIONS */ 507 | /****************************************************************************/ 508 | 509 | #ifdef ZW_SLAVE 510 | /* TO#2133 fix - Keil compiler >7.50(8.xx) seems to have been changed somehow */ 511 | /* in the preprocessor part as if the 2 ZW_LockRoute definitions was ifdefed */ 512 | /* by ifdef ZW_SLAVE ... endif and ifdef ZW_CONTROLLER ... endif instead of */ 513 | /* ifdef ZW_SLAVE ... else ... endif, the Keil >7.50 reports Warning C235 */ 514 | /* on slave/slave routing/slave enhanced targets. */ 515 | /*============================ ZW_LockRoute ============================== 516 | ** Function description 517 | ** This function locks and unlocks any temporary route to a specific nodeID 518 | ** Side effects: 519 | ** 520 | **--------------------------------------------------------------------------*/ 521 | void 522 | ZW_LockRoute( 523 | BYTE bNodeID); /* IN if nonezero lock bNodeID entry, */ 524 | /* zero unlock entry */ 525 | 526 | #else /* ZW_SLAVE */ 527 | 528 | /*============================= ZW_LockRoute ============================ 529 | ** Function description 530 | ** IF bLockRoute TRUE then any attempt to purge a LastWorkingRoute entry 531 | ** is denied. 532 | ** 533 | ** Side effects: 534 | ** 535 | ** 536 | **--------------------------------------------------------------------------*/ 537 | void 538 | ZW_LockRoute( 539 | BOOL bLockRoute); /* IN TRUE lock LastWorkingRoute entry purging */ 540 | /* FALSE unlock LastWorkingRoute entry purging */ 541 | #endif /* ZW_SLAVE */ 542 | 543 | 544 | /**============================ ZW_SendConst ============================= 545 | ** Function description 546 | ** Start/Stop generate RF test signal in a desired channel 547 | ** Signal can be 548 | ** a carrier only 549 | ** a modulated carrier 550 | ** 551 | ** Side effects: 552 | **-------------------------------------------------------------------------------------------------*/ 553 | 554 | void 555 | ZW_SendConst( 556 | BYTE bStart, /*IN TRUE start sending RF test signal, FALSE disable RF test signal*/ 557 | BYTE bChNo, /*IN channle number to send RF test signal on*/ 558 | BYTE bSignalType ); /*IN The RF test signal type.*/ 559 | 560 | #if defined(ZW_CONTROLLER) && !defined(ZW_CONTROLLER_BRIDGE) || (defined(ZW_SLAVE) && !defined(ZW_SLAVE_ROUTING) && !defined(ZW_SLAVE_ENHANCED_232)) 561 | /*=============================== ZW_SendData =========================== 562 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 563 | ** 564 | ** 565 | ** txOptions: 566 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level 567 | ** (1/3 of normal RF range). 568 | ** TRANSMIT_OPTION_ACK request destination node for an acknowledge 569 | ** that the frame has been received; 570 | ** completedFunc (if NONE NULL) will return result. 571 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission via repeater 572 | ** nodes/return routes (at normal output power level). 573 | ** TRANSMIT_OPTION_EXPLORE Use explore frame route resolution if all else fails 574 | ** 575 | ** extern BYTE RET FALSE if transmitter queue overflow 576 | ** ZW_SendData( 577 | ** BYTE destNodeID, IN Destination node ID (0xFF == broadcast) 578 | ** BYTE *pData, IN Data buffer pointer 579 | ** BYTE dataLength, IN Data buffer length 580 | ** BYTE txOptions, IN Transmit option flags 581 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 582 | ** BYTE txStatus, IN Transmit status 583 | ** TX_STATUS_TYPE*)); IN Transmit status report 584 | **--------------------------------------------------------------------------*/ 585 | BYTE /*RET FALSE if transmitter busy */ 586 | ZW_SendData( 587 | BYTE destNodeID, /*IN Destination node ID (0xFF == broadcast) */ 588 | BYTE *pData, /*IN Data buffer pointer */ 589 | BYTE dataLength, /*IN Data buffer length */ 590 | BYTE txOptions, /*IN Transmit option flags */ 591 | VOID_CALLBACKFUNC(completedFunc)(BYTE, TX_STATUS_TYPE*)); /*IN Transmit completed call back function */ 592 | 593 | #endif /* #if defined(ZW_CONTROLLER) && !defined(ZW_CONTROLLER_BRIDGE) || (defined(ZW_SLAVE) && !defined(ZW_SLAVE_ROUTING) && !defined(ZW_SLAVE_ENHANCED_232)) */ 594 | 595 | #ifdef ZW_CONTROLLER_BRIDGE 596 | 597 | /*============================ ZW_SendData_Bridge ======================== 598 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 599 | ** 600 | ** 601 | ** txOptions: 602 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level 603 | ** (1/3 of normal RF range). 604 | ** TRANSMIT_OPTION_ACK request destination node for an acknowledge 605 | ** that the frame has been received; 606 | ** completedFunc (if NONE NULL) will return result. 607 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission via repeater 608 | ** nodes (at normal output power level). 609 | ** 610 | ** extern BYTE RET FALSE if transmitter queue overflow 611 | ** ZW_SendData_Bridge( 612 | ** BYTE bSrcNodeID, IN Source NodeID - if 0xFF then controller ID is set as source 613 | ** BYTE nodeID, IN Destination node ID (0xFF == broadcast) 614 | ** BYTE *pData, IN Data buffer pointer 615 | ** BYTE dataLength, IN Data buffer length 616 | ** BYTE txOptions, IN Transmit option flags 617 | ** VOID_CALLBACKFUNC(completedFunc)( IN Transmit completed call back function 618 | ** BYTE txStatus, IN Transmit status 619 | ** TX_STATUS_TYPE*)); IN Transmit status report 620 | **--------------------------------------------------------------------------*/ 621 | extern BYTE /*RET FALSE if transmitter busy */ 622 | ZW_SendData_Bridge( 623 | BYTE bSrcNodeID, /*IN Source NodeID - if 0xFF then controller ID is set as source */ 624 | BYTE nodeID, /*IN Destination node ID (0xFF == broadcast) */ 625 | BYTE *pData, /*IN Data buffer pointer */ 626 | BYTE dataLength, /*IN Data buffer length */ 627 | BYTE txOptions, /*IN Transmit option flags */ 628 | VOID_CALLBACKFUNC(completedFunc)(BYTE, TX_STATUS_TYPE*)); /*IN Transmit completed call back function */ 629 | 630 | #endif /* !ZW_CONTROLLER_BRIDGE */ 631 | 632 | 633 | /*============================ ZW_SendDataAbort ======================== 634 | ** Abort the ongoing transmit started with ZW_SendData() 635 | ** 636 | ** Side effects: 637 | ** 638 | **--------------------------------------------------------------------------*/ 639 | void /*RET FALSE if transmitter busy */ 640 | ZW_SendDataAbort(void); 641 | 642 | 643 | #ifndef ZW_CONTROLLER_BRIDGE 644 | /*=============================== ZW_SendDataMulti ====================== 645 | ** Transmit data buffer to a list of Z-Wave Nodes (multicast frame). 646 | ** 647 | ** 648 | ** txOptions: 649 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 650 | ** normal RF range). 651 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 652 | ** singlecast frame to each of the destination nodes 653 | ** and request acknowledge from each destination node. 654 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames via 655 | ** repeater nodes/return routes (at normal output power level). 656 | ** 657 | **--------------------------------------------------------------------------*/ 658 | extern BYTE /*RET FALSE if transmitter busy */ 659 | ZW_SendDataMulti( 660 | BYTE *pNodeIDList, /*IN List of destination node ID's */ 661 | BYTE *pData, /*IN Data buffer pointer */ 662 | BYTE dataLength, /*IN Data buffer length */ 663 | BYTE txOptions, /*IN Transmit option flags */ 664 | VOID_CALLBACKFUNC(completedFunc)(BYTE)); /*IN Transmit completed call back function */ 665 | 666 | #else 667 | 668 | /*=============================== ZW_SendDataMulti_Bridge ================ 669 | ** Transmit data buffer to a list of Z-Wave Nodes (multicast frame). 670 | ** 671 | ** 672 | ** txOptions: 673 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level (1/3 of 674 | ** normal RF range). 675 | ** TRANSMIT_OPTION_ACK the multicast frame will be followed by a 676 | ** singlecast frame to each of the destination nodes 677 | ** and request acknowledge from each destination node. 678 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission on singlecast frames 679 | ** via repeater nodes (at normal output power level). 680 | ** 681 | **--------------------------------------------------------------------------*/ 682 | extern BYTE /*RET FALSE if transmitter busy */ 683 | ZW_SendDataMulti_Bridge( 684 | BYTE bSrcNodeID, /*IN Source nodeID - if 0xFF then controller is set as source */ 685 | BYTE *pNodeIDList, /*IN List of destination node ID's */ 686 | BYTE *pData, /*IN Data buffer pointer */ 687 | BYTE dataLength, /*IN Data buffer length */ 688 | BYTE txOptions, /*IN Transmit option flags */ 689 | VOID_CALLBACKFUNC(completedFunc)(BYTE)); /*IN Transmit completed call back function */ 690 | #endif /* !ZW_CONTROLLER_BRIDGE */ 691 | 692 | #if defined(ZW_SLAVE_ENHANCED_232) || defined(ZW_SLAVE_ROUTING) 693 | /** 694 | * Send multicast security s2 encrypted frame. 695 | * Only the MultiCast/Groupcast frame itself will be transmitted. There will be no single cast follow ups. 696 | * 697 | * \param pData plaintext to which is going to be sent. 698 | * \param dataLength length of data to be sent. 699 | * \param pTxOptionMultiEx Transmit options structure containing the transmission source, transmit options and 700 | * the groupID which is the connection handle for the mulicast group to use, 701 | * 702 | */ 703 | enum ZW_SENDDATA_EX_RETURN_CODES /*RET Return code */ 704 | ZW_SendDataMultiEx( 705 | BYTE *pData, /* IN Data buffer pointer */ 706 | BYTE dataLength, /* IN Data buffer length */ 707 | TRANSMIT_MULTI_OPTIONS_TYPE *pTxOptionsMultiEx, 708 | VOID_CALLBACKFUNC(completedFunc)(BYTE)); /* IN Transmit completed call back function */ 709 | 710 | 711 | /*=============================== ZW_SendDataEx =========================== 712 | ** Transmit data buffer to a single ZW-node or all ZW-nodes (broadcast). 713 | ** 714 | ** This supersedes the old ZW_SendData and adds support for secure 715 | ** transmissions. 716 | ** 717 | ** pData Pointer to the payload data to be transmitted 718 | ** 719 | ** dataLength Payload data length 720 | ** 721 | ** pTxOptionsEx Points to Transmit options structure containing: 722 | ** 723 | ** destNode 724 | ** destination node id - 0xFF means broadcast to all nodes 725 | ** 726 | ** bSrcNode 727 | ** Reserved for future use. 728 | ** 729 | ** txOptions: 730 | ** TRANSMIT_OPTION_LOW_POWER transmit at low output power level 731 | ** (1/3 of normal RF range). 732 | ** TRANSMIT_OPTION_ACK the destination nodes 733 | ** and request acknowledge from each 734 | ** destination node. 735 | ** TRANSMIT_OPTION_AUTO_ROUTE request retransmission via return route. 736 | ** TRANSMIT_OPTION_EXPLORE Use explore frame route resolution if all else fails 737 | ** 738 | ** 739 | ** securityKeys: 740 | ** 741 | ** 742 | ** txOptions2 743 | ** 744 | ** 745 | **--------------------------------------------------------------------------*/ 746 | enum ZW_SENDDATA_EX_RETURN_CODES /*RET Return code */ 747 | ZW_SendDataEx( 748 | BYTE *pData, /* IN Data buffer pointer */ 749 | BYTE dataLength, /* IN Data buffer length */ 750 | TRANSMIT_OPTIONS_TYPE *pTxOptionsEx, 751 | VOID_CALLBACKFUNC(completedFunc)(BYTE, TX_STATUS_TYPE*)); 752 | #endif /* #if defined(ZW_SLAVE_ENHANCED_232) || defined(ZW_SLAVE_ROUTING) */ 753 | 754 | 755 | #ifdef ZW_PROMISCUOUS_MODE 756 | /*=============================== ZW_GetNodeIDMaskList ====================== 757 | ** Get the recieved multicast frame's destinations nodes mask list 758 | ** Side effects: 759 | ** The API should only be called before returning from ApplicationCommandHandler 760 | **------------------------------------------------------------------------------------------------------*/ 761 | BYTE /*RET: nodeID mask offset*/ 762 | ZW_GetNodeIDMaskList( 763 | BYTE **pNodeIDMaskList, /* OUT destinations nodes mask list*/ 764 | BYTE *pMaskListLen); /* OUTthe destinations nodes mask list length*/ 765 | 766 | #endif 767 | 768 | /*======================= ZW_SetListenBeforeTalkThreshold ================= 769 | ** Set the threshold that should be added to the standard -75dBm used 770 | ** in JP listen before talk. 771 | ** 772 | ** Side effects: 773 | ** 774 | **--------------------------------------------------------------------------*/ 775 | void /*RET: Nothing */ 776 | ZW_SetListenBeforeTalkThreshold( 777 | BYTE bChannel, /*IN: RF channel to set the threshold for */ 778 | BYTE bThreshold); /*IN: Threshold to be added to RSSI limit */ 779 | 780 | /** 781 | * Return Version on supplied Command Class if supported by protocol. 782 | * If supplied Command Class not supported by protocol then UNKNOWN_VERSION is returned. 783 | * 784 | * \param commandClass command class to query for version. 785 | * 786 | */ 787 | BYTE /*RET Version of supplied command class */ 788 | ZW_Transport_CommandClassVersionGet( 789 | BYTE commandClass); /* IN Command class to query for version */ 790 | 791 | 792 | #endif /* _ZW_TRANSPORT_API_H_ */ 793 | 794 | -------------------------------------------------------------------------------- /Application Notes/APL12955-Z-Wave-Multi-Channel-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL12955-Z-Wave-Multi-Channel-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/APL12957-Z-Wave-Battery-Support-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL12957-Z-Wave-Battery-Support-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/APL13031-Z-Wave-Networking-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL13031-Z-Wave-Networking-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/APL13084-Z-Wave-Control-Application-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL13084-Z-Wave-Control-Application-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/APL13128-Z-Wave-Time-Date-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL13128-Z-Wave-Time-Date-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/APL13475-Z-Wave-Development-Basics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/APL13475-Z-Wave-Development-Basics.pdf -------------------------------------------------------------------------------- /Application Notes/INS14259-Z-Wave Plus V2 Application Framework SDK7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/INS14259-Z-Wave Plus V2 Application Framework SDK7.pdf -------------------------------------------------------------------------------- /Application Notes/an1085-gecko-bootloader-connect.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/an1085-gecko-bootloader-connect.pdf -------------------------------------------------------------------------------- /Application Notes/an1135-using-third-generation-nonvolatile-memory.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/an1135-using-third-generation-nonvolatile-memory.pdf -------------------------------------------------------------------------------- /Application Notes/ug103-07-non-volatile-data-storage-fundamentals.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Application Notes/ug103-07-non-volatile-data-storage-fundamentals.pdf -------------------------------------------------------------------------------- /Legacy Specifications/500 Series Application Programmers Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/500 Series Application Programmers Guide.pdf -------------------------------------------------------------------------------- /Legacy Specifications/500 Series Serial API Specs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/500 Series Serial API Specs.pdf -------------------------------------------------------------------------------- /Legacy Specifications/Z-Wave Device Class Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/Z-Wave Device Class Specification.pdf -------------------------------------------------------------------------------- /Legacy Specifications/Z-Wave Specification AWG V1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/Z-Wave Specification AWG V1.0.pdf -------------------------------------------------------------------------------- /Legacy Specifications/Z-Wave Specification AWG V2.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/Z-Wave Specification AWG V2.0.pdf -------------------------------------------------------------------------------- /Legacy Specifications/Z-Wave Specification AWG V3.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/Z-Wave Specification AWG V3.0.pdf -------------------------------------------------------------------------------- /Legacy Specifications/ZWA_Z-Wave Plus Device Type Specification 33.0.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Legacy Specifications/ZWA_Z-Wave Plus Device Type Specification 33.0.0.pdf -------------------------------------------------------------------------------- /NIST.SP.800-38a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/NIST.SP.800-38a.pdf -------------------------------------------------------------------------------- /NIST.SP.800-38c.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/NIST.SP.800-38c.pdf -------------------------------------------------------------------------------- /NIST.SP.800-90Ar1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/NIST.SP.800-90Ar1.pdf -------------------------------------------------------------------------------- /Registries/Association Command Class, list of mandatory commands for the Lifeline Association Group.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Association Command Class, list of mandatory commands for the Lifeline Association Group.xlsx -------------------------------------------------------------------------------- /Registries/Indicator Command Class, list of assigned indicators and Property IDs.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Indicator Command Class, list of assigned indicators and Property IDs.xlsx -------------------------------------------------------------------------------- /Registries/Meter Table Monitor Command Class, list of assigned types, scales and datasets.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Meter Table Monitor Command Class, list of assigned types, scales and datasets.xlsx -------------------------------------------------------------------------------- /Registries/Multilevel Sensor Command Class, list of assigned Multilevel Sensor types and scales.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Multilevel Sensor Command Class, list of assigned Multilevel Sensor types and scales.xlsx -------------------------------------------------------------------------------- /Registries/Notification Command Class, list of assigned Notifications.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Notification Command Class, list of assigned Notifications.xlsx -------------------------------------------------------------------------------- /Registries/SDS14622 Anti-Theft Command Class, list of assigned Locking Entity IDs.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/SDS14622 Anti-Theft Command Class, list of assigned Locking Entity IDs.xlsx -------------------------------------------------------------------------------- /Registries/Simple AV Command Class, list of assigned AV Control codes.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Simple AV Command Class, list of assigned AV Control codes.xlsx -------------------------------------------------------------------------------- /Registries/Z-Wave Manufacturer ID List.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Z-Wave Manufacturer ID List.xlsx -------------------------------------------------------------------------------- /Registries/Z-Wave Plus Assigned Icon Types.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Registries/Z-Wave Plus Assigned Icon Types.xlsx -------------------------------------------------------------------------------- /SDS10865-Z-Wave-Application-Security-Layer-S0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/SDS10865-Z-Wave-Application-Security-Layer-S0.pdf -------------------------------------------------------------------------------- /SmartStart Specifications/Node Provisioning Information Type Registry.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/SmartStart Specifications/Node Provisioning Information Type Registry.pdf -------------------------------------------------------------------------------- /SmartStart Specifications/Node Provisioning QR Code Format.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/SmartStart Specifications/Node Provisioning QR Code Format.pdf -------------------------------------------------------------------------------- /T-REC-G.9959-201501.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/T-REC-G.9959-201501.pdf -------------------------------------------------------------------------------- /Z-Wave Command Classes Specifications/List of defined Z-Wave Command Classes.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Command Classes Specifications/List of defined Z-Wave Command Classes.xlsx -------------------------------------------------------------------------------- /Z-Wave Command Classes Specifications/Z-Wave Command Class Control Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Command Classes Specifications/Z-Wave Command Class Control Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Device and Command Class Definition Files/Z-Wave XML File.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Device and Command Class Definition Files/Z-Wave XML File.pdf -------------------------------------------------------------------------------- /Z-Wave Plus v2 Specifications/Z-Wave Plus v2 Device Type Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Plus v2 Specifications/Z-Wave Plus v2 Device Type Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Specification AWG V5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Specification AWG V5.0.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Host API Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Host API Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Long Range MAC Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Long Range MAC Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Long Range Network Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Long Range Network Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Long Range PHY Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Long Range PHY Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Long Range PHY and MAC Layer Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Long Range PHY and MAC Layer Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave MAC Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave MAC Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave Network Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave Network Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave PHY Layer Test Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave PHY Layer Test Specification.pdf -------------------------------------------------------------------------------- /Z-Wave Stack Specifications/Z-Wave and Z-Wave Long Range Network Layer Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/Z-Wave Stack Specifications/Z-Wave and Z-Wave Long Range Network Layer Specification.pdf -------------------------------------------------------------------------------- /ccm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zwave-js/specs/ec1b19c13531086a5c2ff94ee9be9edde2dc0883/ccm.pdf --------------------------------------------------------------------------------