UNPKG

zigbee-herdsman

Version:

An open source ZigBee gateway solution with node.js.

723 lines 113 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IEEE802154CcaMode = exports.EmberTransmitPriority = exports.EmberLeaveNetworkOption = exports.EmberGpSinkTableEntryStatus = exports.EmberGpSinkType = exports.EmberGpProxyTableEntryStatus = exports.EmberGpKeyType = exports.EmberGpSecurityLevel = exports.EmberGpApplicationId = exports.EmberZllKeyIndex = exports.EzspZllNetworkOperation = exports.EmberZllState = exports.EmberJoinDecision = exports.EmberDeviceUpdate = exports.EmberKeyStructBitmask = exports.EmberKeyStatus = exports.SecManFlag = exports.SecManDerivedKeyType = exports.SecManKeyType = exports.EmberCurrentSecurityBitmask = exports.EmberInterpanMessageType = exports.EmberMacPassthroughType = exports.EmberSourceRouteDiscoveryMode = exports.EmberApsOption = exports.EmberIncomingMessageType = exports.EmberOutgoingMessageType = exports.EmberBindingType = exports.EmberDutyCycleState = exports.EmberMultiPhyNwkConfig = exports.EmberNodeType = exports.EmberJoinMethod = exports.EzspNetworkScanType = exports.EmberNetworkStatus = exports.EmberNetworkInitBitmask = exports.EmberEntropySource = exports.EmberLibraryStatus = exports.EmberLibraryId = exports.EmberCounterType = exports.EmberEventUnits = exports.EmberInitialSecurityBitmask = exports.EmberExtendedSecurityBitmask = exports.EmberKeepAliveMode = exports.EmberTXPowerMode = exports.EmberVersionType = exports.EmberGPStatus = exports.EmberStackError = exports.EzspStatus = exports.SLStatus = void 0; /** Status Codes contains error and status code definitions used by Simplicity SDK software components and stacks. */ var SLStatus; (function (SLStatus) { // ----------------------------------------------------------------------------- // Generic Errors /** No error. */ SLStatus[SLStatus["OK"] = 0] = "OK"; /** Generic error. */ SLStatus[SLStatus["FAIL"] = 1] = "FAIL"; // ----------------------------------------------------------------------------- // State Errors /** Generic invalid state error. */ SLStatus[SLStatus["INVALID_STATE"] = 2] = "INVALID_STATE"; /** Module is not ready for requested operation. */ SLStatus[SLStatus["NOT_READY"] = 3] = "NOT_READY"; /** Module is busy and cannot carry out requested operation. */ SLStatus[SLStatus["BUSY"] = 4] = "BUSY"; /** Operation is in progress and not yet complete (pass or fail). */ SLStatus[SLStatus["IN_PROGRESS"] = 5] = "IN_PROGRESS"; /** Operation aborted. */ SLStatus[SLStatus["ABORT"] = 6] = "ABORT"; /** Operation timed out. */ SLStatus[SLStatus["TIMEOUT"] = 7] = "TIMEOUT"; /** Operation not allowed per permissions. */ SLStatus[SLStatus["PERMISSION"] = 8] = "PERMISSION"; /** Non-blocking operation would block. */ SLStatus[SLStatus["WOULD_BLOCK"] = 9] = "WOULD_BLOCK"; /** Operation/module is Idle, cannot carry requested operation. */ SLStatus[SLStatus["IDLE"] = 10] = "IDLE"; /** Operation cannot be done while construct is waiting. */ SLStatus[SLStatus["IS_WAITING"] = 11] = "IS_WAITING"; /** No task/construct waiting/pending for that action/event. */ SLStatus[SLStatus["NONE_WAITING"] = 12] = "NONE_WAITING"; /** Operation cannot be done while construct is suspended. */ SLStatus[SLStatus["SUSPENDED"] = 13] = "SUSPENDED"; /** Feature not available due to software configuration. */ SLStatus[SLStatus["NOT_AVAILABLE"] = 14] = "NOT_AVAILABLE"; /** Feature not supported. */ SLStatus[SLStatus["NOT_SUPPORTED"] = 15] = "NOT_SUPPORTED"; /** Initialization failed. */ SLStatus[SLStatus["INITIALIZATION"] = 16] = "INITIALIZATION"; /** Module has not been initialized. */ SLStatus[SLStatus["NOT_INITIALIZED"] = 17] = "NOT_INITIALIZED"; /** Module has already been initialized. */ SLStatus[SLStatus["ALREADY_INITIALIZED"] = 18] = "ALREADY_INITIALIZED"; /** Object/construct has been deleted. */ SLStatus[SLStatus["DELETED"] = 19] = "DELETED"; /** Illegal call from ISR. */ SLStatus[SLStatus["ISR"] = 20] = "ISR"; /** Illegal call because network is up. */ SLStatus[SLStatus["NETWORK_UP"] = 21] = "NETWORK_UP"; /** Illegal call because network is down. */ SLStatus[SLStatus["NETWORK_DOWN"] = 22] = "NETWORK_DOWN"; /** Failure due to not being joined in a network. */ SLStatus[SLStatus["NOT_JOINED"] = 23] = "NOT_JOINED"; /** Invalid operation as there are no beacons. */ SLStatus[SLStatus["NO_BEACONS"] = 24] = "NO_BEACONS"; // ----------------------------------------------------------------------------- // Allocation/ownership Errors /** Generic allocation error. */ SLStatus[SLStatus["ALLOCATION_FAILED"] = 25] = "ALLOCATION_FAILED"; /** No more resource available to perform the operation. */ SLStatus[SLStatus["NO_MORE_RESOURCE"] = 26] = "NO_MORE_RESOURCE"; /** Item/list/queue is empty. */ SLStatus[SLStatus["EMPTY"] = 27] = "EMPTY"; /** Item/list/queue is full. */ SLStatus[SLStatus["FULL"] = 28] = "FULL"; /** Item would overflow. */ SLStatus[SLStatus["WOULD_OVERFLOW"] = 29] = "WOULD_OVERFLOW"; /** Item/list/queue has been overflowed. */ SLStatus[SLStatus["HAS_OVERFLOWED"] = 30] = "HAS_OVERFLOWED"; /** Generic ownership error. */ SLStatus[SLStatus["OWNERSHIP"] = 31] = "OWNERSHIP"; /** Already/still owning resource. */ SLStatus[SLStatus["IS_OWNER"] = 32] = "IS_OWNER"; // ----------------------------------------------------------------------------- // Invalid Parameters Errors /** Generic invalid argument or consequence of invalid argument. */ SLStatus[SLStatus["INVALID_PARAMETER"] = 33] = "INVALID_PARAMETER"; /** Invalid null pointer received as argument. */ SLStatus[SLStatus["NULL_POINTER"] = 34] = "NULL_POINTER"; /** Invalid configuration provided. */ SLStatus[SLStatus["INVALID_CONFIGURATION"] = 35] = "INVALID_CONFIGURATION"; /** Invalid mode. */ SLStatus[SLStatus["INVALID_MODE"] = 36] = "INVALID_MODE"; /** Invalid handle. */ SLStatus[SLStatus["INVALID_HANDLE"] = 37] = "INVALID_HANDLE"; /** Invalid type for operation. */ SLStatus[SLStatus["INVALID_TYPE"] = 38] = "INVALID_TYPE"; /** Invalid index. */ SLStatus[SLStatus["INVALID_INDEX"] = 39] = "INVALID_INDEX"; /** Invalid range. */ SLStatus[SLStatus["INVALID_RANGE"] = 40] = "INVALID_RANGE"; /** Invalid key. */ SLStatus[SLStatus["INVALID_KEY"] = 41] = "INVALID_KEY"; /** Invalid credentials. */ SLStatus[SLStatus["INVALID_CREDENTIALS"] = 42] = "INVALID_CREDENTIALS"; /** Invalid count. */ SLStatus[SLStatus["INVALID_COUNT"] = 43] = "INVALID_COUNT"; /** Invalid signature / verification failed. */ SLStatus[SLStatus["INVALID_SIGNATURE"] = 44] = "INVALID_SIGNATURE"; /** Item could not be found. */ SLStatus[SLStatus["NOT_FOUND"] = 45] = "NOT_FOUND"; /** Item already exists. */ SLStatus[SLStatus["ALREADY_EXISTS"] = 46] = "ALREADY_EXISTS"; // ----------------------------------------------------------------------------- // IO/Communication Errors /** Generic I/O failure. */ SLStatus[SLStatus["IO"] = 47] = "IO"; /** I/O failure due to timeout. */ SLStatus[SLStatus["IO_TIMEOUT"] = 48] = "IO_TIMEOUT"; /** Generic transmission error. */ SLStatus[SLStatus["TRANSMIT"] = 49] = "TRANSMIT"; /** Transmit underflowed. */ SLStatus[SLStatus["TRANSMIT_UNDERFLOW"] = 50] = "TRANSMIT_UNDERFLOW"; /** Transmit is incomplete. */ SLStatus[SLStatus["TRANSMIT_INCOMPLETE"] = 51] = "TRANSMIT_INCOMPLETE"; /** Transmit is busy. */ SLStatus[SLStatus["TRANSMIT_BUSY"] = 52] = "TRANSMIT_BUSY"; /** Generic reception error. */ SLStatus[SLStatus["RECEIVE"] = 53] = "RECEIVE"; /** Failed to read on/via given object. */ SLStatus[SLStatus["OBJECT_READ"] = 54] = "OBJECT_READ"; /** Failed to write on/via given object. */ SLStatus[SLStatus["OBJECT_WRITE"] = 55] = "OBJECT_WRITE"; /** Message is too long. */ SLStatus[SLStatus["MESSAGE_TOO_LONG"] = 56] = "MESSAGE_TOO_LONG"; // ----------------------------------------------------------------------------- // EEPROM/Flash Errors /** EEPROM MFG version mismatch. */ SLStatus[SLStatus["EEPROM_MFG_VERSION_MISMATCH"] = 57] = "EEPROM_MFG_VERSION_MISMATCH"; /** EEPROM Stack version mismatch. */ SLStatus[SLStatus["EEPROM_STACK_VERSION_MISMATCH"] = 58] = "EEPROM_STACK_VERSION_MISMATCH"; /** Flash write is inhibited. */ SLStatus[SLStatus["FLASH_WRITE_INHIBITED"] = 59] = "FLASH_WRITE_INHIBITED"; /** Flash verification failed. */ SLStatus[SLStatus["FLASH_VERIFY_FAILED"] = 60] = "FLASH_VERIFY_FAILED"; /** Flash programming failed. */ SLStatus[SLStatus["FLASH_PROGRAM_FAILED"] = 61] = "FLASH_PROGRAM_FAILED"; /** Flash erase failed. */ SLStatus[SLStatus["FLASH_ERASE_FAILED"] = 62] = "FLASH_ERASE_FAILED"; // ----------------------------------------------------------------------------- // MAC Errors /** MAC no data. */ SLStatus[SLStatus["MAC_NO_DATA"] = 63] = "MAC_NO_DATA"; /** MAC no ACK received. */ SLStatus[SLStatus["MAC_NO_ACK_RECEIVED"] = 64] = "MAC_NO_ACK_RECEIVED"; /** MAC indirect timeout. */ SLStatus[SLStatus["MAC_INDIRECT_TIMEOUT"] = 65] = "MAC_INDIRECT_TIMEOUT"; /** MAC unknown header type. */ SLStatus[SLStatus["MAC_UNKNOWN_HEADER_TYPE"] = 66] = "MAC_UNKNOWN_HEADER_TYPE"; /** MAC ACK unknown header type. */ SLStatus[SLStatus["MAC_ACK_HEADER_TYPE"] = 67] = "MAC_ACK_HEADER_TYPE"; /** MAC command transmit failure. */ SLStatus[SLStatus["MAC_COMMAND_TRANSMIT_FAILURE"] = 68] = "MAC_COMMAND_TRANSMIT_FAILURE"; // ----------------------------------------------------------------------------- // CLI_STORAGE Errors /** Error in open NVM */ SLStatus[SLStatus["CLI_STORAGE_NVM_OPEN_ERROR"] = 69] = "CLI_STORAGE_NVM_OPEN_ERROR"; // ----------------------------------------------------------------------------- // Security status codes /** Image checksum is not valid. */ SLStatus[SLStatus["SECURITY_IMAGE_CHECKSUM_ERROR"] = 70] = "SECURITY_IMAGE_CHECKSUM_ERROR"; /** Decryption failed */ SLStatus[SLStatus["SECURITY_DECRYPT_ERROR"] = 71] = "SECURITY_DECRYPT_ERROR"; // ----------------------------------------------------------------------------- // Command status codes /** Command was not recognized */ SLStatus[SLStatus["COMMAND_IS_INVALID"] = 72] = "COMMAND_IS_INVALID"; /** Command or parameter maximum length exceeded */ SLStatus[SLStatus["COMMAND_TOO_LONG"] = 73] = "COMMAND_TOO_LONG"; /** Data received does not form a complete command */ SLStatus[SLStatus["COMMAND_INCOMPLETE"] = 74] = "COMMAND_INCOMPLETE"; // ----------------------------------------------------------------------------- // Misc Errors /** Bus error, e.g. invalid DMA address */ SLStatus[SLStatus["BUS_ERROR"] = 75] = "BUS_ERROR"; // ----------------------------------------------------------------------------- // Unified MAC Errors /** CCA failure. */ SLStatus[SLStatus["CCA_FAILURE"] = 76] = "CCA_FAILURE"; // ----------------------------------------------------------------------------- // Scan errors /** MAC scanning. */ SLStatus[SLStatus["MAC_SCANNING"] = 77] = "MAC_SCANNING"; /** MAC incorrect scan type. */ SLStatus[SLStatus["MAC_INCORRECT_SCAN_TYPE"] = 78] = "MAC_INCORRECT_SCAN_TYPE"; /** Invalid channel mask. */ SLStatus[SLStatus["INVALID_CHANNEL_MASK"] = 79] = "INVALID_CHANNEL_MASK"; /** Bad scan duration. */ SLStatus[SLStatus["BAD_SCAN_DURATION"] = 80] = "BAD_SCAN_DURATION"; // ----------------------------------------------------------------------------- // MAC transmit related status /** The MAC transmit queue is full */ SLStatus[SLStatus["MAC_TRANSMIT_QUEUE_FULL"] = 83] = "MAC_TRANSMIT_QUEUE_FULL"; /** * The transmit attempt failed because the radio scheduler could not find a slot to transmit this packet in or * a higher priority event interrupted it */ SLStatus[SLStatus["TRANSMIT_SCHEDULER_FAIL"] = 84] = "TRANSMIT_SCHEDULER_FAIL"; /** An unsupported channel setting was specified */ SLStatus[SLStatus["TRANSMIT_INVALID_CHANNEL"] = 85] = "TRANSMIT_INVALID_CHANNEL"; /** An unsupported power setting was specified */ SLStatus[SLStatus["TRANSMIT_INVALID_POWER"] = 86] = "TRANSMIT_INVALID_POWER"; /** The expected ACK was received after the last transmission */ SLStatus[SLStatus["TRANSMIT_ACK_RECEIVED"] = 87] = "TRANSMIT_ACK_RECEIVED"; /** * The transmit attempt was blocked from going over the air. * Typically this is due to the Radio Hold Off (RHO) or Coexistence plugins as they can prevent transmits based on external signals. */ SLStatus[SLStatus["TRANSMIT_BLOCKED"] = 88] = "TRANSMIT_BLOCKED"; // ----------------------------------------------------------------------------- // NVM3 specific errors /** The initialization was aborted as the NVM3 instance is not aligned properly in memory */ SLStatus[SLStatus["NVM3_ALIGNMENT_INVALID"] = 89] = "NVM3_ALIGNMENT_INVALID"; /** The initialization was aborted as the size of the NVM3 instance is too small */ SLStatus[SLStatus["NVM3_SIZE_TOO_SMALL"] = 90] = "NVM3_SIZE_TOO_SMALL"; /** The initialization was aborted as the NVM3 page size is not supported */ SLStatus[SLStatus["NVM3_PAGE_SIZE_NOT_SUPPORTED"] = 91] = "NVM3_PAGE_SIZE_NOT_SUPPORTED"; /** The application that there was an error initializing some of the tokens */ SLStatus[SLStatus["NVM3_TOKEN_INIT_FAILED"] = 92] = "NVM3_TOKEN_INIT_FAILED"; /** The initialization was aborted as the NVM3 instance was already opened with other parameters */ SLStatus[SLStatus["NVM3_OPENED_WITH_OTHER_PARAMETERS"] = 93] = "NVM3_OPENED_WITH_OTHER_PARAMETERS"; // ----------------------------------------------------------------------------- // MVP Driver and MVP Math status codes /** Critical fault */ SLStatus[SLStatus["COMPUTE_DRIVER_FAULT"] = 5377] = "COMPUTE_DRIVER_FAULT"; /** ALU operation output NaN */ SLStatus[SLStatus["COMPUTE_DRIVER_ALU_NAN"] = 5378] = "COMPUTE_DRIVER_ALU_NAN"; /** ALU numeric overflow */ SLStatus[SLStatus["COMPUTE_DRIVER_ALU_OVERFLOW"] = 5379] = "COMPUTE_DRIVER_ALU_OVERFLOW"; /** ALU numeric underflow */ SLStatus[SLStatus["COMPUTE_DRIVER_ALU_UNDERFLOW"] = 5380] = "COMPUTE_DRIVER_ALU_UNDERFLOW"; /** Overflow during array store */ SLStatus[SLStatus["COMPUTE_DRIVER_STORE_CONVERSION_OVERFLOW"] = 5381] = "COMPUTE_DRIVER_STORE_CONVERSION_OVERFLOW"; /** Underflow during array store conversion */ SLStatus[SLStatus["COMPUTE_DRIVER_STORE_CONVERSION_UNDERFLOW"] = 5382] = "COMPUTE_DRIVER_STORE_CONVERSION_UNDERFLOW"; /** Infinity encountered during array store conversion */ SLStatus[SLStatus["COMPUTE_DRIVER_STORE_CONVERSION_INFINITY"] = 5383] = "COMPUTE_DRIVER_STORE_CONVERSION_INFINITY"; /** NaN encountered during array store conversion */ SLStatus[SLStatus["COMPUTE_DRIVER_STORE_CONVERSION_NAN"] = 5384] = "COMPUTE_DRIVER_STORE_CONVERSION_NAN"; /** MATH NaN encountered */ SLStatus[SLStatus["COMPUTE_MATH_NAN"] = 5394] = "COMPUTE_MATH_NAN"; /** MATH Infinity encountered */ SLStatus[SLStatus["COMPUTE_MATH_INFINITY"] = 5395] = "COMPUTE_MATH_INFINITY"; /** MATH numeric overflow */ SLStatus[SLStatus["COMPUTE_MATH_OVERFLOW"] = 5396] = "COMPUTE_MATH_OVERFLOW"; /** MATH numeric underflow */ SLStatus[SLStatus["COMPUTE_MATH_UNDERFLOW"] = 5397] = "COMPUTE_MATH_UNDERFLOW"; // ----------------------------------------------------------------------------- // Zigbee status codes /** Packet is dropped by packet-handoff callbacks */ SLStatus[SLStatus["ZIGBEE_PACKET_HANDOFF_DROPPED"] = 3073] = "ZIGBEE_PACKET_HANDOFF_DROPPED"; /** The APS layer attempted to send or deliver a message and failed */ SLStatus[SLStatus["ZIGBEE_DELIVERY_FAILED"] = 3074] = "ZIGBEE_DELIVERY_FAILED"; /** The maximum number of in-flight messages ::EMBER_APS_UNICAST_MESSAGE_COUNT has been reached */ SLStatus[SLStatus["ZIGBEE_MAX_MESSAGE_LIMIT_REACHED"] = 3075] = "ZIGBEE_MAX_MESSAGE_LIMIT_REACHED"; /** The application is trying to delete or overwrite a binding that is in use */ SLStatus[SLStatus["ZIGBEE_BINDING_IS_ACTIVE"] = 3076] = "ZIGBEE_BINDING_IS_ACTIVE"; /** The application is trying to overwrite an address table entry that is in use */ SLStatus[SLStatus["ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE"] = 3077] = "ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE"; /** After moving, a mobile node's attempt to re-establish contact with the network failed */ SLStatus[SLStatus["ZIGBEE_MOVE_FAILED"] = 3078] = "ZIGBEE_MOVE_FAILED"; /** The local node ID has changed. The application can get the new node ID by calling ::sl_zigbee_get_node_id() */ SLStatus[SLStatus["ZIGBEE_NODE_ID_CHANGED"] = 3079] = "ZIGBEE_NODE_ID_CHANGED"; /** The chosen security level is not supported by the stack */ SLStatus[SLStatus["ZIGBEE_INVALID_SECURITY_LEVEL"] = 3080] = "ZIGBEE_INVALID_SECURITY_LEVEL"; /** An error occurred when trying to encrypt at the APS Level */ SLStatus[SLStatus["ZIGBEE_IEEE_ADDRESS_DISCOVERY_IN_PROGRESS"] = 3081] = "ZIGBEE_IEEE_ADDRESS_DISCOVERY_IN_PROGRESS"; /** An error occurred when trying to encrypt at the APS Level */ SLStatus[SLStatus["ZIGBEE_APS_ENCRYPTION_ERROR"] = 3082] = "ZIGBEE_APS_ENCRYPTION_ERROR"; /** There was an attempt to form or join a network with security without calling ::sl_zigbee_set_initial_security_state() first */ SLStatus[SLStatus["ZIGBEE_SECURITY_STATE_NOT_SET"] = 3083] = "ZIGBEE_SECURITY_STATE_NOT_SET"; /** * There was an attempt to broadcast a key switch too quickly after broadcasting the next network key. * The Trust Center must wait at least a period equal to the broadcast timeout so that all routers have a chance * to receive the broadcast of the new network key */ SLStatus[SLStatus["ZIGBEE_TOO_SOON_FOR_SWITCH_KEY"] = 3084] = "ZIGBEE_TOO_SOON_FOR_SWITCH_KEY"; /** The received signature corresponding to the message that was passed to the CBKE Library failed verification and is not valid */ SLStatus[SLStatus["ZIGBEE_SIGNATURE_VERIFY_FAILURE"] = 3085] = "ZIGBEE_SIGNATURE_VERIFY_FAILURE"; /** The message could not be sent because the link key corresponding to the destination is not authorized for use in APS data messages */ SLStatus[SLStatus["ZIGBEE_KEY_NOT_AUTHORIZED"] = 3086] = "ZIGBEE_KEY_NOT_AUTHORIZED"; /** The application tried to use a binding that has been remotely modified and the change has not yet been reported to the application */ SLStatus[SLStatus["ZIGBEE_BINDING_HAS_CHANGED"] = 3087] = "ZIGBEE_BINDING_HAS_CHANGED"; /** The EUI of the Trust center has changed due to a successful rejoin after TC Swapout */ SLStatus[SLStatus["ZIGBEE_TRUST_CENTER_SWAP_EUI_HAS_CHANGED"] = 3088] = "ZIGBEE_TRUST_CENTER_SWAP_EUI_HAS_CHANGED"; /** A Trust Center Swapout Rejoin has occurred without the EUI of the TC changing */ SLStatus[SLStatus["ZIGBEE_TRUST_CENTER_SWAP_EUI_HAS_NOT_CHANGED"] = 3089] = "ZIGBEE_TRUST_CENTER_SWAP_EUI_HAS_NOT_CHANGED"; /** An attempt to generate random bytes failed because of insufficient random data from the radio */ SLStatus[SLStatus["ZIGBEE_INSUFFICIENT_RANDOM_DATA"] = 3090] = "ZIGBEE_INSUFFICIENT_RANDOM_DATA"; /** A Zigbee route error command frame was received indicating that a source routed message from this node failed en route */ SLStatus[SLStatus["ZIGBEE_SOURCE_ROUTE_FAILURE"] = 3091] = "ZIGBEE_SOURCE_ROUTE_FAILURE"; /** A Zigbee route error command frame was received indicating that a message sent to this node along a many-to-one route failed en route */ SLStatus[SLStatus["ZIGBEE_MANY_TO_ONE_ROUTE_FAILURE"] = 3092] = "ZIGBEE_MANY_TO_ONE_ROUTE_FAILURE"; /** A critical and fatal error indicating that the version of the stack trying to run does not match with the chip it's running on */ SLStatus[SLStatus["ZIGBEE_STACK_AND_HARDWARE_MISMATCH"] = 3093] = "ZIGBEE_STACK_AND_HARDWARE_MISMATCH"; /** The local PAN ID has changed. The application can get the new PAN ID by calling ::emberGetPanId() */ SLStatus[SLStatus["ZIGBEE_PAN_ID_CHANGED"] = 3094] = "ZIGBEE_PAN_ID_CHANGED"; /** The channel has changed. */ SLStatus[SLStatus["ZIGBEE_CHANNEL_CHANGED"] = 3095] = "ZIGBEE_CHANNEL_CHANGED"; /** The network has been opened for joining. */ SLStatus[SLStatus["ZIGBEE_NETWORK_OPENED"] = 3096] = "ZIGBEE_NETWORK_OPENED"; /** The network has been closed for joining. */ SLStatus[SLStatus["ZIGBEE_NETWORK_CLOSED"] = 3097] = "ZIGBEE_NETWORK_CLOSED"; /** * An attempt was made to join a Secured Network using a pre-configured key, but the Trust Center sent back a * Network Key in-the-clear when an encrypted Network Key was required. (::EMBER_REQUIRE_ENCRYPTED_KEY) */ SLStatus[SLStatus["ZIGBEE_RECEIVED_KEY_IN_THE_CLEAR"] = 3098] = "ZIGBEE_RECEIVED_KEY_IN_THE_CLEAR"; /** An attempt was made to join a Secured Network, but the device did not receive a Network Key. */ SLStatus[SLStatus["ZIGBEE_NO_NETWORK_KEY_RECEIVED"] = 3099] = "ZIGBEE_NO_NETWORK_KEY_RECEIVED"; /** After a device joined a Secured Network, a Link Key was requested (::EMBER_GET_LINK_KEY_WHEN_JOINING) but no response was ever received. */ SLStatus[SLStatus["ZIGBEE_NO_LINK_KEY_RECEIVED"] = 3100] = "ZIGBEE_NO_LINK_KEY_RECEIVED"; /** * An attempt was made to join a Secured Network without a pre-configured key, but the Trust Center sent encrypted data using a * pre-configured key. */ SLStatus[SLStatus["ZIGBEE_PRECONFIGURED_KEY_REQUIRED"] = 3101] = "ZIGBEE_PRECONFIGURED_KEY_REQUIRED"; /** A Zigbee EZSP error has occured. Track the origin and corresponding EzspStatus for more info. */ SLStatus[SLStatus["ZIGBEE_EZSP_ERROR"] = 3102] = "ZIGBEE_EZSP_ERROR"; /** Node ID discovery failed. */ SLStatus[SLStatus["ZIGBEE_ID_DISCOVERY_FAILED"] = 3103] = "ZIGBEE_ID_DISCOVERY_FAILED"; /** Message was sent but no APS ACK received. */ SLStatus[SLStatus["ZIGBEE_NO_APS_ACK"] = 3104] = "ZIGBEE_NO_APS_ACK"; /** APS message was canceled. */ SLStatus[SLStatus["ZIGBEE_APS_MESSAGE_CANCELED"] = 3105] = "ZIGBEE_APS_MESSAGE_CANCELED"; /** Node ID discovery not enabled. */ SLStatus[SLStatus["ZIGBEE_ID_DISCOVERY_NOT_ENABLED"] = 3106] = "ZIGBEE_ID_DISCOVERY_NOT_ENABLED"; /** Message was not sent, Node ID discovery is underway. */ SLStatus[SLStatus["ZIGBEE_ID_DISCOVERY_UNDERWAY"] = 3107] = "ZIGBEE_ID_DISCOVERY_UNDERWAY"; /** The message was not sent because a route discovery is currently underway. There is no route to the target until the route discovery completes. */ SLStatus[SLStatus["ZIGBEE_SEND_UNICAST_ROUTE_DISCOVERY_UNDERWAY"] = 3108] = "ZIGBEE_SEND_UNICAST_ROUTE_DISCOVERY_UNDERWAY"; /** Radius is 0 or message has been dropped because route request failed or failed to submit message to tx queue. */ SLStatus[SLStatus["ZIGBEE_SEND_UNICAST_FAILURE"] = 3109] = "ZIGBEE_SEND_UNICAST_FAILURE"; /** No active route to the destination. */ SLStatus[SLStatus["ZIGBEE_SEND_UNICAST_NO_ROUTE"] = 3110] = "ZIGBEE_SEND_UNICAST_NO_ROUTE"; /** Broadcast message timeout while waiting for sleepy children to poll. */ SLStatus[SLStatus["ZIGBEE_BROADCAST_TO_SLEEPY_CHILDREN_TIMEOUT"] = 3111] = "ZIGBEE_BROADCAST_TO_SLEEPY_CHILDREN_TIMEOUT"; /** Expected a neighbor to relay the message, but none did. */ SLStatus[SLStatus["ZIGBEE_BROADCAST_RELAY_FAILED"] = 3112] = "ZIGBEE_BROADCAST_RELAY_FAILED"; })(SLStatus || (exports.SLStatus = SLStatus = {})); /** Status values used by EZSP. */ var EzspStatus; (function (EzspStatus) { /** Success. */ EzspStatus[EzspStatus["SUCCESS"] = 0] = "SUCCESS"; /** Fatal error. */ EzspStatus[EzspStatus["SPI_ERR_FATAL"] = 16] = "SPI_ERR_FATAL"; /** The Response frame of the current transaction indicates the NCP has reset. */ EzspStatus[EzspStatus["SPI_ERR_NCP_RESET"] = 17] = "SPI_ERR_NCP_RESET"; /** The NCP is reporting that the Command frame of the current transaction is oversized (the length byte is too large). */ EzspStatus[EzspStatus["SPI_ERR_OVERSIZED_EZSP_FRAME"] = 18] = "SPI_ERR_OVERSIZED_EZSP_FRAME"; /** The Response frame of the current transaction indicates the previous transaction was aborted (nSSEL deasserted too soon). */ EzspStatus[EzspStatus["SPI_ERR_ABORTED_TRANSACTION"] = 19] = "SPI_ERR_ABORTED_TRANSACTION"; /** The Response frame of the current transaction indicates the frame terminator is missing from the Command frame. */ EzspStatus[EzspStatus["SPI_ERR_MISSING_FRAME_TERMINATOR"] = 20] = "SPI_ERR_MISSING_FRAME_TERMINATOR"; /** The NCP has not provided a Response within the time limit defined by WAIT_SECTION_TIMEOUT. */ EzspStatus[EzspStatus["SPI_ERR_WAIT_SECTION_TIMEOUT"] = 21] = "SPI_ERR_WAIT_SECTION_TIMEOUT"; /** The Response frame from the NCP is missing the frame terminator. */ EzspStatus[EzspStatus["SPI_ERR_NO_FRAME_TERMINATOR"] = 22] = "SPI_ERR_NO_FRAME_TERMINATOR"; /** The Host attempted to send an oversized Command (the length byte is too large) and the AVR's spi-protocol.c blocked the transmission. */ EzspStatus[EzspStatus["SPI_ERR_EZSP_COMMAND_OVERSIZED"] = 23] = "SPI_ERR_EZSP_COMMAND_OVERSIZED"; /** The NCP attempted to send an oversized Response (the length byte is too large) and the AVR's spi-protocol.c blocked the reception. */ EzspStatus[EzspStatus["SPI_ERR_EZSP_RESPONSE_OVERSIZED"] = 24] = "SPI_ERR_EZSP_RESPONSE_OVERSIZED"; /** The Host has sent the Command and is still waiting for the NCP to send a Response. */ EzspStatus[EzspStatus["SPI_WAITING_FOR_RESPONSE"] = 25] = "SPI_WAITING_FOR_RESPONSE"; /** The NCP has not asserted nHOST_INT within the time limit defined by WAKE_HANDSHAKE_TIMEOUT. */ EzspStatus[EzspStatus["SPI_ERR_HANDSHAKE_TIMEOUT"] = 26] = "SPI_ERR_HANDSHAKE_TIMEOUT"; /** The NCP has not asserted nHOST_INT after an NCP reset within the time limit defined by STARTUP_TIMEOUT. */ EzspStatus[EzspStatus["SPI_ERR_STARTUP_TIMEOUT"] = 27] = "SPI_ERR_STARTUP_TIMEOUT"; /** The Host attempted to verify the SPI Protocol activity and version number, and the verification failed. */ EzspStatus[EzspStatus["SPI_ERR_STARTUP_FAIL"] = 28] = "SPI_ERR_STARTUP_FAIL"; /** The Host has sent a command with a SPI Byte that is unsupported by the current mode the NCP is operating in. */ EzspStatus[EzspStatus["SPI_ERR_UNSUPPORTED_SPI_COMMAND"] = 29] = "SPI_ERR_UNSUPPORTED_SPI_COMMAND"; /** Operation not yet complete. */ EzspStatus[EzspStatus["ASH_IN_PROGRESS"] = 32] = "ASH_IN_PROGRESS"; /** Fatal error detected by host. */ EzspStatus[EzspStatus["HOST_FATAL_ERROR"] = 33] = "HOST_FATAL_ERROR"; /** Fatal error detected by NCP. */ EzspStatus[EzspStatus["ASH_NCP_FATAL_ERROR"] = 34] = "ASH_NCP_FATAL_ERROR"; /** Tried to send DATA frame too long. */ EzspStatus[EzspStatus["DATA_FRAME_TOO_LONG"] = 35] = "DATA_FRAME_TOO_LONG"; /** Tried to send DATA frame too short. */ EzspStatus[EzspStatus["DATA_FRAME_TOO_SHORT"] = 36] = "DATA_FRAME_TOO_SHORT"; /** No space for tx'ed DATA frame. */ EzspStatus[EzspStatus["NO_TX_SPACE"] = 37] = "NO_TX_SPACE"; /** No space for rec'd DATA frame. */ EzspStatus[EzspStatus["NO_RX_SPACE"] = 38] = "NO_RX_SPACE"; /** No receive data available. */ EzspStatus[EzspStatus["NO_RX_DATA"] = 39] = "NO_RX_DATA"; /** Not in Connected state. */ EzspStatus[EzspStatus["NOT_CONNECTED"] = 40] = "NOT_CONNECTED"; /** The NCP received a command before the EZSP version had been set. */ EzspStatus[EzspStatus["ERROR_VERSION_NOT_SET"] = 48] = "ERROR_VERSION_NOT_SET"; /** The NCP received a command containing an unsupported frame ID. */ EzspStatus[EzspStatus["ERROR_INVALID_FRAME_ID"] = 49] = "ERROR_INVALID_FRAME_ID"; /** The direction flag in the frame control field was incorrect. */ EzspStatus[EzspStatus["ERROR_WRONG_DIRECTION"] = 50] = "ERROR_WRONG_DIRECTION"; /** * The truncated flag in the frame control field was set, indicating there was not enough memory available to * complete the response or that the response would have exceeded the maximum EZSP frame length. */ EzspStatus[EzspStatus["ERROR_TRUNCATED"] = 51] = "ERROR_TRUNCATED"; /** * The overflow flag in the frame control field was set, indicating one or more callbacks occurred since the previous * response and there was not enough memory available to report them to the Host. */ EzspStatus[EzspStatus["ERROR_OVERFLOW"] = 52] = "ERROR_OVERFLOW"; /** Insufficient memory was available. */ EzspStatus[EzspStatus["ERROR_OUT_OF_MEMORY"] = 53] = "ERROR_OUT_OF_MEMORY"; /** The value was out of bounds. */ EzspStatus[EzspStatus["ERROR_INVALID_VALUE"] = 54] = "ERROR_INVALID_VALUE"; /** The configuration id was not recognized. */ EzspStatus[EzspStatus["ERROR_INVALID_ID"] = 55] = "ERROR_INVALID_ID"; /** Configuration values can no longer be modified. */ EzspStatus[EzspStatus["ERROR_INVALID_CALL"] = 56] = "ERROR_INVALID_CALL"; /** The NCP failed to respond to a command. */ EzspStatus[EzspStatus["ERROR_NO_RESPONSE"] = 57] = "ERROR_NO_RESPONSE"; /** The length of the command exceeded the maximum EZSP frame length. */ EzspStatus[EzspStatus["ERROR_COMMAND_TOO_LONG"] = 64] = "ERROR_COMMAND_TOO_LONG"; /** The UART receive queue was full causing a callback response to be dropped. */ EzspStatus[EzspStatus["ERROR_QUEUE_FULL"] = 65] = "ERROR_QUEUE_FULL"; /** The command has been filtered out by NCP. */ EzspStatus[EzspStatus["ERROR_COMMAND_FILTERED"] = 66] = "ERROR_COMMAND_FILTERED"; /** EZSP Security Key is already set */ EzspStatus[EzspStatus["ERROR_SECURITY_KEY_ALREADY_SET"] = 67] = "ERROR_SECURITY_KEY_ALREADY_SET"; /** EZSP Security Type is invalid */ EzspStatus[EzspStatus["ERROR_SECURITY_TYPE_INVALID"] = 68] = "ERROR_SECURITY_TYPE_INVALID"; /** EZSP Security Parameters are invalid */ EzspStatus[EzspStatus["ERROR_SECURITY_PARAMETERS_INVALID"] = 69] = "ERROR_SECURITY_PARAMETERS_INVALID"; /** EZSP Security Parameters are already set */ EzspStatus[EzspStatus["ERROR_SECURITY_PARAMETERS_ALREADY_SET"] = 70] = "ERROR_SECURITY_PARAMETERS_ALREADY_SET"; /** EZSP Security Key is not set */ EzspStatus[EzspStatus["ERROR_SECURITY_KEY_NOT_SET"] = 71] = "ERROR_SECURITY_KEY_NOT_SET"; /** EZSP Security Parameters are not set */ EzspStatus[EzspStatus["ERROR_SECURITY_PARAMETERS_NOT_SET"] = 72] = "ERROR_SECURITY_PARAMETERS_NOT_SET"; /** Received frame with unsupported control byte */ EzspStatus[EzspStatus["ERROR_UNSUPPORTED_CONTROL"] = 73] = "ERROR_UNSUPPORTED_CONTROL"; /** Received frame is unsecure, when security is established */ EzspStatus[EzspStatus["ERROR_UNSECURE_FRAME"] = 74] = "ERROR_UNSECURE_FRAME"; /** Incompatible ASH version */ EzspStatus[EzspStatus["ASH_ERROR_VERSION"] = 80] = "ASH_ERROR_VERSION"; /** Exceeded max ACK timeouts */ EzspStatus[EzspStatus["ASH_ERROR_TIMEOUTS"] = 81] = "ASH_ERROR_TIMEOUTS"; /** Timed out waiting for RSTACK */ EzspStatus[EzspStatus["ASH_ERROR_RESET_FAIL"] = 82] = "ASH_ERROR_RESET_FAIL"; /** Unexpected ncp reset */ EzspStatus[EzspStatus["ASH_ERROR_NCP_RESET"] = 83] = "ASH_ERROR_NCP_RESET"; /** Serial port initialization failed */ EzspStatus[EzspStatus["ERROR_SERIAL_INIT"] = 84] = "ERROR_SERIAL_INIT"; /** Invalid ncp processor type */ EzspStatus[EzspStatus["ASH_ERROR_NCP_TYPE"] = 85] = "ASH_ERROR_NCP_TYPE"; /** Invalid ncp reset method */ EzspStatus[EzspStatus["ASH_ERROR_RESET_METHOD"] = 86] = "ASH_ERROR_RESET_METHOD"; /** XON/XOFF not supported by host driver */ EzspStatus[EzspStatus["ASH_ERROR_XON_XOFF"] = 87] = "ASH_ERROR_XON_XOFF"; /** ASH protocol started */ EzspStatus[EzspStatus["ASH_STARTED"] = 112] = "ASH_STARTED"; /** ASH protocol connected */ EzspStatus[EzspStatus["ASH_CONNECTED"] = 113] = "ASH_CONNECTED"; /** ASH protocol disconnected */ EzspStatus[EzspStatus["ASH_DISCONNECTED"] = 114] = "ASH_DISCONNECTED"; /** Timer expired waiting for ack */ EzspStatus[EzspStatus["ASH_ACK_TIMEOUT"] = 115] = "ASH_ACK_TIMEOUT"; /** Frame in progress cancelled */ EzspStatus[EzspStatus["ASH_CANCELLED"] = 116] = "ASH_CANCELLED"; /** Received frame out of sequence */ EzspStatus[EzspStatus["ASH_OUT_OF_SEQUENCE"] = 117] = "ASH_OUT_OF_SEQUENCE"; /** Received frame with CRC error */ EzspStatus[EzspStatus["ASH_BAD_CRC"] = 118] = "ASH_BAD_CRC"; /** Received frame with comm error */ EzspStatus[EzspStatus["ASH_COMM_ERROR"] = 119] = "ASH_COMM_ERROR"; /** Received frame with bad ackNum */ EzspStatus[EzspStatus["ASH_BAD_ACKNUM"] = 120] = "ASH_BAD_ACKNUM"; /** Received frame shorter than minimum */ EzspStatus[EzspStatus["ASH_TOO_SHORT"] = 121] = "ASH_TOO_SHORT"; /** Received frame longer than maximum */ EzspStatus[EzspStatus["ASH_TOO_LONG"] = 122] = "ASH_TOO_LONG"; /** Received frame with illegal control byte */ EzspStatus[EzspStatus["ASH_BAD_CONTROL"] = 123] = "ASH_BAD_CONTROL"; /** Received frame with illegal length for its type */ EzspStatus[EzspStatus["ASH_BAD_LENGTH"] = 124] = "ASH_BAD_LENGTH"; /** Received ASH Ack */ EzspStatus[EzspStatus["ASH_ACK_RECEIVED"] = 125] = "ASH_ACK_RECEIVED"; /** Sent ASH Ack */ EzspStatus[EzspStatus["ASH_ACK_SENT"] = 126] = "ASH_ACK_SENT"; /** Received ASH Nak */ EzspStatus[EzspStatus["ASH_NAK_RECEIVED"] = 127] = "ASH_NAK_RECEIVED"; /** Sent ASH Nak */ EzspStatus[EzspStatus["ASH_NAK_SENT"] = 128] = "ASH_NAK_SENT"; /** Received ASH RST */ EzspStatus[EzspStatus["ASH_RST_RECEIVED"] = 129] = "ASH_RST_RECEIVED"; /** Sent ASH RST */ EzspStatus[EzspStatus["ASH_RST_SENT"] = 130] = "ASH_RST_SENT"; /** ASH Status */ EzspStatus[EzspStatus["ASH_STATUS"] = 131] = "ASH_STATUS"; /** ASH TX */ EzspStatus[EzspStatus["ASH_TX"] = 132] = "ASH_TX"; /** ASH RX */ EzspStatus[EzspStatus["ASH_RX"] = 133] = "ASH_RX"; /** Failed to connect to CPC daemon or failed to open CPC endpoint */ EzspStatus[EzspStatus["CPC_ERROR_INIT"] = 134] = "CPC_ERROR_INIT"; /** No reset or error */ EzspStatus[EzspStatus["NO_ERROR"] = 255] = "NO_ERROR"; })(EzspStatus || (exports.EzspStatus = EzspStatus = {})); var EmberStackError; (function (EmberStackError) { // Error codes that a router uses to notify the message initiator about a broken route. EmberStackError[EmberStackError["ROUTE_ERROR_NO_ROUTE_AVAILABLE"] = 0] = "ROUTE_ERROR_NO_ROUTE_AVAILABLE"; EmberStackError[EmberStackError["ROUTE_ERROR_TREE_LINK_FAILURE"] = 1] = "ROUTE_ERROR_TREE_LINK_FAILURE"; EmberStackError[EmberStackError["ROUTE_ERROR_NON_TREE_LINK_FAILURE"] = 2] = "ROUTE_ERROR_NON_TREE_LINK_FAILURE"; EmberStackError[EmberStackError["ROUTE_ERROR_LOW_BATTERY_LEVEL"] = 3] = "ROUTE_ERROR_LOW_BATTERY_LEVEL"; EmberStackError[EmberStackError["ROUTE_ERROR_NO_ROUTING_CAPACITY"] = 4] = "ROUTE_ERROR_NO_ROUTING_CAPACITY"; EmberStackError[EmberStackError["ROUTE_ERROR_NO_INDIRECT_CAPACITY"] = 5] = "ROUTE_ERROR_NO_INDIRECT_CAPACITY"; EmberStackError[EmberStackError["ROUTE_ERROR_INDIRECT_TRANSACTION_EXPIRY"] = 6] = "ROUTE_ERROR_INDIRECT_TRANSACTION_EXPIRY"; EmberStackError[EmberStackError["ROUTE_ERROR_TARGET_DEVICE_UNAVAILABLE"] = 7] = "ROUTE_ERROR_TARGET_DEVICE_UNAVAILABLE"; EmberStackError[EmberStackError["ROUTE_ERROR_TARGET_ADDRESS_UNALLOCATED"] = 8] = "ROUTE_ERROR_TARGET_ADDRESS_UNALLOCATED"; EmberStackError[EmberStackError["ROUTE_ERROR_PARENT_LINK_FAILURE"] = 9] = "ROUTE_ERROR_PARENT_LINK_FAILURE"; EmberStackError[EmberStackError["ROUTE_ERROR_VALIDATE_ROUTE"] = 10] = "ROUTE_ERROR_VALIDATE_ROUTE"; EmberStackError[EmberStackError["ROUTE_ERROR_SOURCE_ROUTE_FAILURE"] = 11] = "ROUTE_ERROR_SOURCE_ROUTE_FAILURE"; EmberStackError[EmberStackError["ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE"] = 12] = "ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE"; EmberStackError[EmberStackError["ROUTE_ERROR_ADDRESS_CONFLICT"] = 13] = "ROUTE_ERROR_ADDRESS_CONFLICT"; EmberStackError[EmberStackError["ROUTE_ERROR_VERIFY_ADDRESSES"] = 14] = "ROUTE_ERROR_VERIFY_ADDRESSES"; EmberStackError[EmberStackError["ROUTE_ERROR_PAN_IDENTIFIER_UPDATE"] = 15] = "ROUTE_ERROR_PAN_IDENTIFIER_UPDATE"; EmberStackError[EmberStackError["NETWORK_STATUS_NETWORK_ADDRESS_UPDATE"] = 16] = "NETWORK_STATUS_NETWORK_ADDRESS_UPDATE"; EmberStackError[EmberStackError["NETWORK_STATUS_BAD_FRAME_COUNTER"] = 17] = "NETWORK_STATUS_BAD_FRAME_COUNTER"; EmberStackError[EmberStackError["NETWORK_STATUS_BAD_KEY_SEQUENCE_NUMBER"] = 18] = "NETWORK_STATUS_BAD_KEY_SEQUENCE_NUMBER"; EmberStackError[EmberStackError["NETWORK_STATUS_UNKNOWN_COMMAND"] = 19] = "NETWORK_STATUS_UNKNOWN_COMMAND"; })(EmberStackError || (exports.EmberStackError = EmberStackError = {})); var EmberGPStatus; (function (EmberGPStatus) { /** Success Status */ EmberGPStatus[EmberGPStatus["OK"] = 0] = "OK"; /** Match Frame */ EmberGPStatus[EmberGPStatus["MATCH"] = 1] = "MATCH"; /** Drop Frame */ EmberGPStatus[EmberGPStatus["DROP_FRAME"] = 2] = "DROP_FRAME"; /** Frame Unprocessed */ EmberGPStatus[EmberGPStatus["UNPROCESSED"] = 3] = "UNPROCESSED"; /** Frame Pass Unprocessed */ EmberGPStatus[EmberGPStatus["PASS_UNPROCESSED"] = 4] = "PASS_UNPROCESSED"; /** Frame TX Then Drop */ EmberGPStatus[EmberGPStatus["TX_THEN_DROP"] = 5] = "TX_THEN_DROP"; /** No Security */ EmberGPStatus[EmberGPStatus["NO_SECURITY"] = 6] = "NO_SECURITY"; /** Security Failure */ EmberGPStatus[EmberGPStatus["AUTH_FAILURE"] = 7] = "AUTH_FAILURE"; })(EmberGPStatus || (exports.EmberGPStatus = EmberGPStatus = {})); /** Type of Ember software version */ var EmberVersionType; (function (EmberVersionType) { EmberVersionType[EmberVersionType["PRE_RELEASE"] = 0] = "PRE_RELEASE"; // Alpha, should be used rarely EmberVersionType[EmberVersionType["ALPHA_1"] = 17] = "ALPHA_1"; EmberVersionType[EmberVersionType["ALPHA_2"] = 18] = "ALPHA_2"; EmberVersionType[EmberVersionType["ALPHA_3"] = 19] = "ALPHA_3"; // Leave space in case we decide to add other types in the future. EmberVersionType[EmberVersionType["BETA_1"] = 33] = "BETA_1"; EmberVersionType[EmberVersionType["BETA_2"] = 34] = "BETA_2"; EmberVersionType[EmberVersionType["BETA_3"] = 35] = "BETA_3"; // Anything other than 0xAA is considered pre-release // Silicon Labs may define other types in the future (e.g. beta, alpha) // Silicon Labs chose an arbitrary number (0xAA) to allow for expansion, but // to prevent ambiguity in case 0x00 or 0xFF is accidentally retrieved // as the version type. EmberVersionType[EmberVersionType["GA"] = 170] = "GA"; })(EmberVersionType || (exports.EmberVersionType = EmberVersionType = {})); /** * For emberSetTxPowerMode and mfglibSetPower. * uint16_t */ var EmberTXPowerMode; (function (EmberTXPowerMode) { /** * The application should call ::emberSetTxPowerMode() with the * txPowerMode parameter set to this value to disable all power mode options, * resulting in normal power mode and bi-directional RF transmitter output. */ EmberTXPowerMode[EmberTXPowerMode["DEFAULT"] = 0] = "DEFAULT"; /** * The application should call ::emberSetTxPowerMode() with the * txPowerMode parameter set to this value to enable boost power mode. */ EmberTXPowerMode[EmberTXPowerMode["BOOST"] = 1] = "BOOST"; /** * The application should call ::emberSetTxPowerMode() with the * txPowerMode parameter set to this value to enable the alternate transmitter * output. */ EmberTXPowerMode[EmberTXPowerMode["ALTERNATE"] = 2] = "ALTERNATE"; /** * The application should call ::emberSetTxPowerMode() with the * txPowerMode parameter set to this value to enable both boost mode and the * alternate transmitter output. */ EmberTXPowerMode[EmberTXPowerMode["BOOST_AND_ALTERNATE"] = 3] = "BOOST_AND_ALTERNATE"; // The application does not ever need to call emberSetTxPowerMode() with the // txPowerMode parameter set to this value. This value is used internally by // the stack to indicate that the default token configuration has not been // overridden by a prior call to emberSetTxPowerMode(). EmberTXPowerMode[EmberTXPowerMode["USE_TOKEN"] = 32768] = "USE_TOKEN"; })(EmberTXPowerMode || (exports.EmberTXPowerMode = EmberTXPowerMode = {})); /** uint8_t */ var EmberKeepAliveMode; (function (EmberKeepAliveMode) { EmberKeepAliveMode[EmberKeepAliveMode["KEEP_ALIVE_SUPPORT_UNKNOWN"] = 0] = "KEEP_ALIVE_SUPPORT_UNKNOWN"; EmberKeepAliveMode[EmberKeepAliveMode["MAC_DATA_POLL_KEEP_ALIVE"] = 1] = "MAC_DATA_POLL_KEEP_ALIVE"; EmberKeepAliveMode[EmberKeepAliveMode["END_DEVICE_TIMEOUT_KEEP_ALIVE"] = 2] = "END_DEVICE_TIMEOUT_KEEP_ALIVE"; EmberKeepAliveMode[EmberKeepAliveMode["KEEP_ALIVE_SUPPORT_ALL"] = 3] = "KEEP_ALIVE_SUPPORT_ALL"; })(EmberKeepAliveMode || (exports.EmberKeepAliveMode = EmberKeepAliveMode = {})); /** This is the Extended Security Bitmask that controls the use of various extended security features. */ var EmberExtendedSecurityBitmask; (function (EmberExtendedSecurityBitmask) { /** * If this bit is set, the 'key token data' field is set in the Initial Security Bitmask to 0 (No Preconfig Key token). * Otherwise, the field is left as is. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["PRECONFIG_KEY_NOT_VALID"] = 1] = "PRECONFIG_KEY_NOT_VALID"; // bits 2-3 are unused. /** * This denotes that the network key update can only happen if the network key update request is unicast and encrypted * i.e. broadcast network key update requests will not be processed if bit 1 is set */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["SECURE_NETWORK_KEY_ROTATION"] = 2] = "SECURE_NETWORK_KEY_ROTATION"; /** This denotes whether a joiner node (router or end-device) uses a Global Link Key or a Unique Link Key. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["JOINER_GLOBAL_LINK_KEY"] = 16] = "JOINER_GLOBAL_LINK_KEY"; /** * This denotes whether the device's outgoing frame counter is allowed to be reset during forming or joining. * If the flag is set, the outgoing frame counter is not allowed to be reset. * If the flag is not set, the frame counter is allowed to be reset. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["EXT_NO_FRAME_COUNTER_RESET"] = 32] = "EXT_NO_FRAME_COUNTER_RESET"; /** This denotes whether a device should discard or accept network leave without rejoin commands. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["NWK_LEAVE_WITHOUT_REJOIN_NOT_ALLOWED"] = 64] = "NWK_LEAVE_WITHOUT_REJOIN_NOT_ALLOWED"; // Bit 7 reserved for future use (stored in TOKEN). /** This denotes whether a router node should discard or accept network Leave Commands. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["NWK_LEAVE_REQUEST_NOT_ALLOWED"] = 256] = "NWK_LEAVE_REQUEST_NOT_ALLOWED"; /** * This denotes whether a node is running the latest stack specification or is emulating R18 specs behavior. * If this flag is enabled, a router node should only send encrypted Update Device messages while the TC * should only accept encrypted Updated Device messages. */ EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["R18_STACK_BEHAVIOR"] = 512] = "R18_STACK_BEHAVIOR"; // Bit 10 is reserved for future use (stored in TOKEN). // Bit 11 is reserved for future use(stored in RAM). // Bit 12 - This denotes whether an end device should discard or accept ZDO Leave // from a network node other than its parent. EmberExtendedSecurityBitmask[EmberExtendedSecurityBitmask["ZDO_LEAVE_FROM_NON_PARENT_NOT_ALLOWED"] = 4096] = "ZDO_LEAVE_FROM_NON_PARENT_NOT_ALLOWED"; // Bits 13-15 are unused. })(EmberExtendedSecurityBitmask || (exports.EmberExtendedSecurityBitmask = EmberExtendedSecurityBitmask = {})); /** This is the Initial Security Bitmask that controls the use of various security features. */ var EmberInitialSecurityBitmask; (function (EmberInitialSecurityBitmask) { /** Enables Distributed Trust Center Mode for the device forming the network. (Previously known as ::EMBER_NO_TRUST_CENTER_MODE) */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["DISTRIBUTED_TRUST_CENTER_MODE"] = 2] = "DISTRIBUTED_TRUST_CENTER_MODE"; /** Enables a Global Link Key for the Trust Center. All nodes will share the same Trust Center Link Key. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["TRUST_CENTER_GLOBAL_LINK_KEY"] = 4] = "TRUST_CENTER_GLOBAL_LINK_KEY"; /** Enables devices that perform MAC Association with a pre-configured Network Key to join the network. It is only set on the Trust Center. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["PRECONFIGURED_NETWORK_KEY_MODE"] = 8] = "PRECONFIGURED_NETWORK_KEY_MODE"; // Hidden field used internally. EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["HAVE_TRUST_CENTER_UNKNOWN_KEY_TOKEN"] = 16] = "HAVE_TRUST_CENTER_UNKNOWN_KEY_TOKEN"; // Hidden field used internally. EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["HAVE_TRUST_CENTER_LINK_KEY_TOKEN"] = 32] = "HAVE_TRUST_CENTER_LINK_KEY_TOKEN"; /** * This denotes that the ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 has a value in it containing the trust center EUI64. * The device will only join a network and accept commands from a trust center with that EUI64. * Normally this bit is NOT set and the EUI64 of the trust center is learned during the join process. * When commissioning a device to join onto an existing network that is using a trust center and without sending any messages, * this bit must be set and the field ::EmberInitialSecurityState::preconfiguredTrustCenterEui64 must be populated with the appropriate EUI64. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["HAVE_TRUST_CENTER_EUI64"] = 64] = "HAVE_TRUST_CENTER_EUI64"; /** * This denotes that the ::EmberInitialSecurityState::preconfiguredKey is not the actual Link Key but a Root Key known only to the Trust Center. * It is hashed with the IEEE Address of the destination device to create the actual Link Key used in encryption. * This is bit is only used by the Trust Center. The joining device need not set this. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["TRUST_CENTER_USES_HASHED_LINK_KEY"] = 132] = "TRUST_CENTER_USES_HASHED_LINK_KEY"; /** * This denotes that the ::EmberInitialSecurityState::preconfiguredKey element has valid data that should be used to configure * the initial security state. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["HAVE_PRECONFIGURED_KEY"] = 256] = "HAVE_PRECONFIGURED_KEY"; /** * This denotes that the ::EmberInitialSecurityState::networkKey element has valid data that should be used to configure * the initial security state. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["HAVE_NETWORK_KEY"] = 512] = "HAVE_NETWORK_KEY"; /** * This denotes to a joining node that it should attempt to acquire a Trust Center Link Key during joining. * This is necessary if the device does not have a pre-configured key, or wants to obtain a new one * (since it may be using a well-known key during joining). */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["GET_LINK_KEY_WHEN_JOINING"] = 1024] = "GET_LINK_KEY_WHEN_JOINING"; /** * This denotes that a joining device should only accept an encrypted network key from the Trust Center (using its pre-configured key). * A key sent in-the-clear by the Trust Center will be rejected and the join will fail. * This option is only valid when using a pre-configured key. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["REQUIRE_ENCRYPTED_KEY"] = 2048] = "REQUIRE_ENCRYPTED_KEY"; /** * This denotes whether the device should NOT reset its outgoing frame counters (both NWK and APS) when * ::emberSetInitialSecurityState() is called. * Normally it is advised to reset the frame counter before joining a new network. * However, when a device is joining to the same network again (but not using ::emberRejoinNetwork()), * it should keep the NWK and APS frame counters stored in its tokens. * * NOTE: The application is allowed to dynamically change the behavior via EMBER_EXT_NO_FRAME_COUNTER_RESET field. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["NO_FRAME_COUNTER_RESET"] = 4096] = "NO_FRAME_COUNTER_RESET"; /** * This denotes that the device should obtain its pre-configured key from an installation code stored in the manufacturing token. * The token contains a value that will be hashed to obtain the actual pre-configured key. * If that token is not valid, the call to ::emberSetInitialSecurityState() will fail. */ EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["GET_PRECONFIGURED_KEY_FROM_INSTALL_CODE"] = 8192] = "GET_PRECONFIGURED_KEY_FROM_INSTALL_CODE"; // Internal data EmberInitialSecurityBitmask[EmberInitialSecurityBitmask["EM_SAVED_IN_TOKEN"] = 16384] = "EM_SAVED_IN_TOKEN"; /* All other bits are reserved and must be zero. */ })(EmberInitialSecurityBitmask || (exports.EmberInitialSe