# AUTOGENERATED - do not change
# Copyright 2016 Robert Muth <robert@muth.org>


# FIRST
ACK = 0x06
CAN = 0x18
NAK = 0x15
SOF = 0x01

FIRST_TO_STRING = {
    0x06: 'ACK',
    0x18: 'CAN',
    0x15: 'NAK',
    0x01: 'SOF',
}

# SECOND
REQUEST = 0x00
RESPONSE = 0x01

SECOND_TO_STRING = {
    0x00: 'REQUEST',
    0x01: 'RESPONSE',
}

# API
API_APPLICATION_COMMAND_HANDLER = 0x04
API_APPLICATION_SLAVE_COMMAND_HANDLER = 0xa1
API_FUNC_ID_LOCK_ROUTE_RESPONSE = 0x90
API_MEMORY_GET_BYTE = 0x21
API_PROMISCUOUS_APPLICATION_COMMAND_HANDLER = 0xd1
API_SERIAL_API_APPL_NODE_INFORMATION = 0x03
API_SERIAL_API_GET_CAPABILITIES = 0x07
API_SERIAL_API_GET_INIT_DATA = 0x02
API_SERIAL_API_SET_TIMEOUTS = 0x06
API_SERIAL_API_SLAVE_NODE_INFO = 0xa0
API_SERIAL_API_SOFT_RESET = 0x08
API_ZW_ADD_NODE_TO_NETWORK = 0x4a
API_ZW_APPLICATION_UPDATE = 0x49
API_ZW_ASSIGN_RETURN_ROUTE = 0x46
API_ZW_ASSIGN_SUC_RETURN_ROUTE = 0x51
API_ZW_CONTROLLER_CHANGE = 0x4d
API_ZW_CREATE_NEW_PRIMARY = 0x4c
API_ZW_DELETE_RETURN_ROUTE = 0x47
API_ZW_DELETE_SUC_RETURN_ROUTE = 0x55
API_ZW_ENABLE_SUC = 0x52
API_ZW_GET_CONTROLLER_CAPABILITIES = 0x05
API_ZW_GET_NODE_PROTOCOL_INFO = 0x41
API_ZW_GET_RANDOM = 0x1c
API_ZW_GET_ROUTING_INFO = 0x80
API_ZW_GET_SUC_NODE_ID = 0x56
API_ZW_GET_VERSION = 0x15
API_ZW_GET_VIRTUAL_NODES = 0xa5
API_ZW_IS_FAILED_NODE_ID = 0x62
API_ZW_IS_VIRTUAL_NODE = 0xa6
API_ZW_MEMORY_GET_ID = 0x20
API_ZW_MEMORY_PUT_BUFFER = 0x24
API_ZW_MEMORY_PUT_BYTE = 0x22
API_ZW_NEW_CONTROLLER = 0x43
API_ZW_READ_MEMORY = 0x23
API_ZW_REMOVE_FAILED_NODE_ID = 0x61
API_ZW_REMOVE_NODE_FROM_NETWORK = 0x4b
API_ZW_REPLACE_FAILED_NODE = 0x63
API_ZW_REPLICATION_COMMAND_COMPLETE = 0x44
API_ZW_REPLICATION_SEND_DATA = 0x45
API_ZW_REQUEST_NETWORK_UPDATE = 0x53
API_ZW_REQUEST_NODE_INFO = 0x60
API_ZW_REQUEST_NODE_NEIGHBOR_UPDATE = 0x48
API_ZW_REQUEST_NODE_NEIGHBOR_UPDATE_OPTIONS = 0x5a
API_ZW_R_F_POWER_LEVEL_SET = 0x17
API_ZW_SEND_DATA = 0x13
API_ZW_SEND_DATA_ABORT = 0x16
API_ZW_SEND_DATA_META = 0x18
API_ZW_SEND_DATA_MULTI = 0x14
API_ZW_SEND_NODE_INFORMATION = 0x12
API_ZW_SEND_SLAVE_DATA = 0xa3
API_ZW_SEND_SLAVE_NODE_INFO = 0xa2
API_ZW_SEND_SUC_ID = 0x57
API_ZW_SET_DEFAULT = 0x42
API_ZW_SET_LEARN_MODE = 0x50
API_ZW_SET_LEARN_NODE_STATE = 0x40
API_ZW_SET_PROMISCUOUS_MODE = 0xd0
API_ZW_SET_R_F_RECEIVE_MODE = 0x10
API_ZW_SET_SLAVE_LEARN_MODE = 0xa4
API_ZW_SET_SUC_NODE_ID = 0x54

API_TO_STRING = {
    0x04: 'API_APPLICATION_COMMAND_HANDLER',
    0xa1: 'API_APPLICATION_SLAVE_COMMAND_HANDLER',
    0x90: 'API_FUNC_ID_LOCK_ROUTE_RESPONSE',
    0x21: 'API_MEMORY_GET_BYTE',
    0xd1: 'API_PROMISCUOUS_APPLICATION_COMMAND_HANDLER',
    0x03: 'API_SERIAL_API_APPL_NODE_INFORMATION',
    0x07: 'API_SERIAL_API_GET_CAPABILITIES',
    0x02: 'API_SERIAL_API_GET_INIT_DATA',
    0x06: 'API_SERIAL_API_SET_TIMEOUTS',
    0xa0: 'API_SERIAL_API_SLAVE_NODE_INFO',
    0x08: 'API_SERIAL_API_SOFT_RESET',
    0x4a: 'API_ZW_ADD_NODE_TO_NETWORK',
    0x49: 'API_ZW_APPLICATION_UPDATE',
    0x46: 'API_ZW_ASSIGN_RETURN_ROUTE',
    0x51: 'API_ZW_ASSIGN_SUC_RETURN_ROUTE',
    0x4d: 'API_ZW_CONTROLLER_CHANGE',
    0x4c: 'API_ZW_CREATE_NEW_PRIMARY',
    0x47: 'API_ZW_DELETE_RETURN_ROUTE',
    0x55: 'API_ZW_DELETE_SUC_RETURN_ROUTE',
    0x52: 'API_ZW_ENABLE_SUC',
    0x05: 'API_ZW_GET_CONTROLLER_CAPABILITIES',
    0x41: 'API_ZW_GET_NODE_PROTOCOL_INFO',
    0x1c: 'API_ZW_GET_RANDOM',
    0x80: 'API_ZW_GET_ROUTING_INFO',
    0x56: 'API_ZW_GET_SUC_NODE_ID',
    0x15: 'API_ZW_GET_VERSION',
    0xa5: 'API_ZW_GET_VIRTUAL_NODES',
    0x62: 'API_ZW_IS_FAILED_NODE_ID',
    0xa6: 'API_ZW_IS_VIRTUAL_NODE',
    0x20: 'API_ZW_MEMORY_GET_ID',
    0x24: 'API_ZW_MEMORY_PUT_BUFFER',
    0x22: 'API_ZW_MEMORY_PUT_BYTE',
    0x43: 'API_ZW_NEW_CONTROLLER',
    0x23: 'API_ZW_READ_MEMORY',
    0x61: 'API_ZW_REMOVE_FAILED_NODE_ID',
    0x4b: 'API_ZW_REMOVE_NODE_FROM_NETWORK',
    0x63: 'API_ZW_REPLACE_FAILED_NODE',
    0x44: 'API_ZW_REPLICATION_COMMAND_COMPLETE',
    0x45: 'API_ZW_REPLICATION_SEND_DATA',
    0x53: 'API_ZW_REQUEST_NETWORK_UPDATE',
    0x60: 'API_ZW_REQUEST_NODE_INFO',
    0x48: 'API_ZW_REQUEST_NODE_NEIGHBOR_UPDATE',
    0x5a: 'API_ZW_REQUEST_NODE_NEIGHBOR_UPDATE_OPTIONS',
    0x17: 'API_ZW_R_F_POWER_LEVEL_SET',
    0x13: 'API_ZW_SEND_DATA',
    0x16: 'API_ZW_SEND_DATA_ABORT',
    0x18: 'API_ZW_SEND_DATA_META',
    0x14: 'API_ZW_SEND_DATA_MULTI',
    0x12: 'API_ZW_SEND_NODE_INFORMATION',
    0xa3: 'API_ZW_SEND_SLAVE_DATA',
    0xa2: 'API_ZW_SEND_SLAVE_NODE_INFO',
    0x57: 'API_ZW_SEND_SUC_ID',
    0x42: 'API_ZW_SET_DEFAULT',
    0x50: 'API_ZW_SET_LEARN_MODE',
    0x40: 'API_ZW_SET_LEARN_NODE_STATE',
    0xd0: 'API_ZW_SET_PROMISCUOUS_MODE',
    0x10: 'API_ZW_SET_R_F_RECEIVE_MODE',
    0xa4: 'API_ZW_SET_SLAVE_LEARN_MODE',
    0x54: 'API_ZW_SET_SUC_NODE_ID',
}

# CAP_CONTROLLER
CAP_CONTROLLER_ON_OTHER_NETWORK = 0x02
CAP_CONTROLLER_REAL_PRIMARY = 0x08
CAP_CONTROLLER_SECONDARY = 0x01
CAP_CONTROLLER_SIS = 0x04
CAP_CONTROLLER_SUC = 0x10

CAP_CONTROLLER_TO_STRING = {
    0x02: 'CAP_CONTROLLER_ON_OTHER_NETWORK',
    0x08: 'CAP_CONTROLLER_REAL_PRIMARY',
    0x01: 'CAP_CONTROLLER_SECONDARY',
    0x04: 'CAP_CONTROLLER_SIS',
    0x10: 'CAP_CONTROLLER_SUC',
}

# SERIAL_CAP
SERIAL_CAP_SECONDARY = 0x04
SERIAL_CAP_SLAVE = 0x01
SERIAL_CAP_SUC = 0x08
SERIAL_CAP_TIMER_SUPPORT = 0x02

SERIAL_CAP_TO_STRING = {
    0x04: 'SERIAL_CAP_SECONDARY',
    0x01: 'SERIAL_CAP_SLAVE',
    0x08: 'SERIAL_CAP_SUC',
    0x02: 'SERIAL_CAP_TIMER_SUPPORT',
}

# UPDATE_STATE
UPDATE_STATE_DELETE_DONE = 0x20
UPDATE_STATE_NEW_ID_ASSIGNED = 0x40
UPDATE_STATE_NODE_INFO_RECEIVED = 0x84
UPDATE_STATE_NODE_INFO_REQ_DONE = 0x82
UPDATE_STATE_NODE_INFO_REQ_FAILED = 0x81
UPDATE_STATE_ROUTING_PENDING = 0x80
UPDATE_STATE_SUC_ID = 0x10

UPDATE_STATE_TO_STRING = {
    0x20: 'UPDATE_STATE_DELETE_DONE',
    0x40: 'UPDATE_STATE_NEW_ID_ASSIGNED',
    0x84: 'UPDATE_STATE_NODE_INFO_RECEIVED',
    0x82: 'UPDATE_STATE_NODE_INFO_REQ_DONE',
    0x81: 'UPDATE_STATE_NODE_INFO_REQ_FAILED',
    0x80: 'UPDATE_STATE_ROUTING_PENDING',
    0x10: 'UPDATE_STATE_SUC_ID',
}

# TRANSMIT_OPTION
TRANSMIT_OPTION_ACK = 0x01
TRANSMIT_OPTION_AUTO_ROUTE = 0x04
TRANSMIT_OPTION_EXPLORE = 0x20
TRANSMIT_OPTION_LOW_POWER = 0x02
TRANSMIT_OPTION_NO_ROUTE = 0x10

TRANSMIT_OPTION_TO_STRING = {
    0x01: 'TRANSMIT_OPTION_ACK',
    0x04: 'TRANSMIT_OPTION_AUTO_ROUTE',
    0x20: 'TRANSMIT_OPTION_EXPLORE',
    0x02: 'TRANSMIT_OPTION_LOW_POWER',
    0x10: 'TRANSMIT_OPTION_NO_ROUTE',
}

# TRANSMIT_COMPLETE
TRANSMIT_COMPLETE_FAIL = 0x02
TRANSMIT_COMPLETE_HOP_0_FAIL = 0x05
TRANSMIT_COMPLETE_HOP_1_FAIL = 0x06
TRANSMIT_COMPLETE_HOP_2_FAIL = 0x07
TRANSMIT_COMPLETE_HOP_3_FAIL = 0x08
TRANSMIT_COMPLETE_HOP_4_FAIL = 0x09
TRANSMIT_COMPLETE_NOROUTE = 0x04
TRANSMIT_COMPLETE_NOT_IDLE = 0x03
TRANSMIT_COMPLETE_NO_ACK = 0x01
TRANSMIT_COMPLETE_OK = 0x00

TRANSMIT_COMPLETE_TO_STRING = {
    0x02: 'TRANSMIT_COMPLETE_FAIL',
    0x05: 'TRANSMIT_COMPLETE_HOP_0_FAIL',
    0x06: 'TRANSMIT_COMPLETE_HOP_1_FAIL',
    0x07: 'TRANSMIT_COMPLETE_HOP_2_FAIL',
    0x08: 'TRANSMIT_COMPLETE_HOP_3_FAIL',
    0x09: 'TRANSMIT_COMPLETE_HOP_4_FAIL',
    0x04: 'TRANSMIT_COMPLETE_NOROUTE',
    0x03: 'TRANSMIT_COMPLETE_NOT_IDLE',
    0x01: 'TRANSMIT_COMPLETE_NO_ACK',
    0x00: 'TRANSMIT_COMPLETE_OK',
}

# ADD_NODE_STATUS
ADD_NODE_STATUS_ADDING_CONTROLLER = 0x04
ADD_NODE_STATUS_ADDING_SLAVE = 0x03
ADD_NODE_STATUS_DONE = 0x06
ADD_NODE_STATUS_FAILED = 0x07
ADD_NODE_STATUS_LEARN_READY = 0x01
ADD_NODE_STATUS_NODE_FOUND = 0x02
ADD_NODE_STATUS_NOT_INCLUSION_CONTROLLER = 0x23
ADD_NODE_STATUS_PROTOCOL_DONE = 0x05

ADD_NODE_STATUS_TO_STRING = {
    0x04: 'ADD_NODE_STATUS_ADDING_CONTROLLER',
    0x03: 'ADD_NODE_STATUS_ADDING_SLAVE',
    0x06: 'ADD_NODE_STATUS_DONE',
    0x07: 'ADD_NODE_STATUS_FAILED',
    0x01: 'ADD_NODE_STATUS_LEARN_READY',
    0x02: 'ADD_NODE_STATUS_NODE_FOUND',
    0x23: 'ADD_NODE_STATUS_NOT_INCLUSION_CONTROLLER',
    0x05: 'ADD_NODE_STATUS_PROTOCOL_DONE',
}

# ADD_NODE
ADD_NODE_ANY = 0x01
ADD_NODE_CONTROLLER = 0x02
ADD_NODE_EXISTING = 0x04
ADD_NODE_SLAVE = 0x03
ADD_NODE_STOP = 0x05
ADD_NODE_STOP_FAILED = 0x06

ADD_NODE_TO_STRING = {
    0x01: 'ADD_NODE_ANY',
    0x02: 'ADD_NODE_CONTROLLER',
    0x04: 'ADD_NODE_EXISTING',
    0x03: 'ADD_NODE_SLAVE',
    0x05: 'ADD_NODE_STOP',
    0x06: 'ADD_NODE_STOP_FAILED',
}

# REMOVE_NODE_STATUS
REMOVE_NODE_STATUS_DONE = 0x06
REMOVE_NODE_STATUS_FAILED = 0x07
REMOVE_NODE_STATUS_LEARN_READY = 0x01
REMOVE_NODE_STATUS_NODE_FOUND = 0x02
REMOVE_NODE_STATUS_NOT_INCLUSION_CONTROLLER = 0x23
REMOVE_NODE_STATUS_REMOVING_CONTROLLER = 0x04
REMOVE_NODE_STATUS_REMOVING_SLAVE = 0x03

REMOVE_NODE_STATUS_TO_STRING = {
    0x06: 'REMOVE_NODE_STATUS_DONE',
    0x07: 'REMOVE_NODE_STATUS_FAILED',
    0x01: 'REMOVE_NODE_STATUS_LEARN_READY',
    0x02: 'REMOVE_NODE_STATUS_NODE_FOUND',
    0x23: 'REMOVE_NODE_STATUS_NOT_INCLUSION_CONTROLLER',
    0x04: 'REMOVE_NODE_STATUS_REMOVING_CONTROLLER',
    0x03: 'REMOVE_NODE_STATUS_REMOVING_SLAVE',
}

# REMOVE_NODE
REMOVE_NODE_ANY = 0x01
REMOVE_NODE_CONTROLLER = 0x02
REMOVE_NODE_SLAVE = 0x03
REMOVE_NODE_STOP = 0x05

REMOVE_NODE_TO_STRING = {
    0x01: 'REMOVE_NODE_ANY',
    0x02: 'REMOVE_NODE_CONTROLLER',
    0x03: 'REMOVE_NODE_SLAVE',
    0x05: 'REMOVE_NODE_STOP',
}

# LEARN_MODE
LEARN_MODE_CLASSIC = 0x01
LEARN_MODE_DISABLE = 0x00
LEARN_MODE_NWI = 0x02

LEARN_MODE_TO_STRING = {
    0x01: 'LEARN_MODE_CLASSIC',
    0x00: 'LEARN_MODE_DISABLE',
    0x02: 'LEARN_MODE_NWI',
}

# LEARN_MODE_STATUS
LEARN_MODE_STATUS_DELETED = 0x80
LEARN_MODE_STATUS_DONE = 0x06
LEARN_MODE_STATUS_FAILED = 0x07
LEARN_MODE_STATUS_STARTED = 0x01

LEARN_MODE_STATUS_TO_STRING = {
    0x80: 'LEARN_MODE_STATUS_DELETED',
    0x06: 'LEARN_MODE_STATUS_DONE',
    0x07: 'LEARN_MODE_STATUS_FAILED',
    0x01: 'LEARN_MODE_STATUS_STARTED',
}

# CONTROLLER_CHANGE
CONTROLLER_CHANGE_START = 0x02
CONTROLLER_CHANGE_STOP = 0x05
CONTROLLER_CHANGE_STOP_FAILED = 0x06

CONTROLLER_CHANGE_TO_STRING = {
    0x02: 'CONTROLLER_CHANGE_START',
    0x05: 'CONTROLLER_CHANGE_STOP',
    0x06: 'CONTROLLER_CHANGE_STOP_FAILED',
}

# REMOVE_FAILED_NODE
REMODE_FAILED_NODE_NODE_NOT_FOUND = 0x08
REMODE_FAILED_NODE_NODE_REMOVE_FAIL = 0x20
REMODE_FAILED_NODE_NODE_REMOVE_PROCESS_BUSY = 0x10
REMODE_FAILED_NODE_NOT_PRIMARY_CONTROLLER = 0x02
REMODE_FAILED_NODE_NO_CALLBACK_FUNCTION = 0x04

REMOVE_FAILED_NODE_TO_STRING = {
    0x08: 'REMODE_FAILED_NODE_NODE_NOT_FOUND',
    0x20: 'REMODE_FAILED_NODE_NODE_REMOVE_FAIL',
    0x10: 'REMODE_FAILED_NODE_NODE_REMOVE_PROCESS_BUSY',
    0x02: 'REMODE_FAILED_NODE_NOT_PRIMARY_CONTROLLER',
    0x04: 'REMODE_FAILED_NODE_NO_CALLBACK_FUNCTION',
}

# REQUEST_NEIGHBOR_UPDATE
REQUEST_NEIGHBOR_UPDATE_DONE = 0x22
REQUEST_NEIGHBOR_UPDATE_FAIL = 0x23
REQUEST_NEIGHBOR_UPDATE_STARTED = 0x21

REQUEST_NEIGHBOR_UPDATE_TO_STRING = {
    0x22: 'REQUEST_NEIGHBOR_UPDATE_DONE',
    0x23: 'REQUEST_NEIGHBOR_UPDATE_FAIL',
    0x21: 'REQUEST_NEIGHBOR_UPDATE_STARTED',
}

# Commands
NoOperation = 0x00
Basic = 0x20
ControllerReplication = 0x21
ApplicationStatus = 0x22
SwitchBinary = 0x25
SwitchMultilevel = 0x26
SwitchAll = 0x27
SwitchToggleBinary = 0x28
SwitchToggleMultilevel = 0x29
SceneActivation = 0x2b
SceneActuatorConf = 0x2c
SceneControllerConf = 0x2d
SensorBinary = 0x30
SensorMultilevel = 0x31
Meter = 0x32
ColorSwitch = 0x33
MeterPulse = 0x35
ThermostatMode = 0x40
ThermostatOperatingState = 0x42
ThermostatSetpoint = 0x43
ThermostatFanMode = 0x44
ThermostatFanState = 0x45
ClimateControlSchedule = 0x46
ThermostatSetBack = 0x47
DoorLockLogging = 0x4c
ScheduleEntryLock = 0x4e
BasicWindowCovering = 0x50
TransportService = 0x55
CRC16Encap = 0x56
AssociationGroupInformation = 0x59
DeviceResetLocally = 0x5a
CentralScene = 0x5b
ZwavePlusInfo = 0x5e
MultiChannel = 0x60
DoorLock = 0x62
UserCode = 0x63
Supervision = 0x6c
Configuration = 0x70
Alarm = 0x71
ManufacturerSpecific = 0x72
Powerlevel = 0x73
Protection = 0x75
Lock = 0x76
NodeNaming = 0x77
Firmware = 0x7a
RemoteAssociationActivate = 0x7c
Battery = 0x80
Clock = 0x81
Hail = 0x82
WakeUp = 0x84
Association = 0x85
Version = 0x86
Indicator = 0x87
Proprietary = 0x88
Language = 0x89
TimeParameters = 0x8b
MultiInstanceAssociation = 0x8e
MultiCmd = 0x8f
EnergyProduction = 0x90
ManufacturerProprietary = 0x91
ScreenMd = 0x92
ScreenAttributes = 0x93
SimpleAvControl = 0x94
Security = 0x98
AssociationCommandConfiguration = 0x9b
SensorAlarm = 0x9c
SilenceAlarm = 0x9d
Security2 = 0x9f
Mark = 0xef

CMD_TO_STRING = {
    0x00: 'NoOperation',
    0x20: 'Basic',
    0x21: 'ControllerReplication',
    0x22: 'ApplicationStatus',
    0x25: 'SwitchBinary',
    0x26: 'SwitchMultilevel',
    0x27: 'SwitchAll',
    0x28: 'SwitchToggleBinary',
    0x29: 'SwitchToggleMultilevel',
    0x2b: 'SceneActivation',
    0x2c: 'SceneActuatorConf',
    0x2d: 'SceneControllerConf',
    0x30: 'SensorBinary',
    0x31: 'SensorMultilevel',
    0x32: 'Meter',
    0x33: 'ColorSwitch',
    0x35: 'MeterPulse',
    0x40: 'ThermostatMode',
    0x42: 'ThermostatOperatingState',
    0x43: 'ThermostatSetpoint',
    0x44: 'ThermostatFanMode',
    0x45: 'ThermostatFanState',
    0x46: 'ClimateControlSchedule',
    0x47: 'ThermostatSetBack',
    0x4c: 'DoorLockLogging',
    0x4e: 'ScheduleEntryLock',
    0x50: 'BasicWindowCovering',
    0x55: 'TransportService',
    0x56: 'CRC16Encap',
    0x59: 'AssociationGroupInformation',
    0x5a: 'DeviceResetLocally',
    0x5b: 'CentralScene',
    0x5e: 'ZwavePlusInfo',
    0x60: 'MultiChannel',
    0x62: 'DoorLock',
    0x63: 'UserCode',
    0x6c: 'Supervision',
    0x70: 'Configuration',
    0x71: 'Alarm',
    0x72: 'ManufacturerSpecific',
    0x73: 'Powerlevel',
    0x75: 'Protection',
    0x76: 'Lock',
    0x77: 'NodeNaming',
    0x7a: 'Firmware',
    0x7c: 'RemoteAssociationActivate',
    0x80: 'Battery',
    0x81: 'Clock',
    0x82: 'Hail',
    0x84: 'WakeUp',
    0x85: 'Association',
    0x86: 'Version',
    0x87: 'Indicator',
    0x88: 'Proprietary',
    0x89: 'Language',
    0x8b: 'TimeParameters',
    0x8e: 'MultiInstanceAssociation',
    0x8f: 'MultiCmd',
    0x90: 'EnergyProduction',
    0x91: 'ManufacturerProprietary',
    0x92: 'ScreenMd',
    0x93: 'ScreenAttributes',
    0x94: 'SimpleAvControl',
    0x98: 'Security',
    0x9b: 'AssociationCommandConfiguration',
    0x9c: 'SensorAlarm',
    0x9d: 'SilenceAlarm',
    0x9f: 'Security2',
    0xef: 'Mark',
}

# SubCommands
NoOperation_Set = (0x00, 0x00)
Basic_Set = (0x20, 0x01)
Basic_Get = (0x20, 0x02)
Basic_Report = (0x20, 0x03)
ControllerReplication_TransferGroup = (0x21, 0x31)
ControllerReplication_TransferScene = (0x21, 0x33)
ApplicationStatus_Busy = (0x22, 0x01)
ApplicationStatus_RejectedRequest = (0x22, 0x02)
SwitchBinary_Set = (0x25, 0x01)
SwitchBinary_Get = (0x25, 0x02)
SwitchBinary_Report = (0x25, 0x03)
SwitchMultilevel_Set = (0x26, 0x01)
SwitchMultilevel_Get = (0x26, 0x02)
SwitchMultilevel_Report = (0x26, 0x03)
SwitchMultilevel_StartLevelChange = (0x26, 0x04)
SwitchMultilevel_StopLevelChange = (0x26, 0x05)
SwitchMultilevel_SupportedGet = (0x26, 0x06)
SwitchMultilevel_SupportedReport = (0x26, 0x07)
SwitchAll_Set = (0x27, 0x01)
SwitchAll_Get = (0x27, 0x02)
SwitchAll_Report = (0x27, 0x03)
SwitchAll_On = (0x27, 0x04)
SwitchAll_Off = (0x27, 0x05)
SwitchToggleBinary_Set = (0x28, 0x01)
SwitchToggleBinary_Get = (0x28, 0x02)
SwitchToggleBinary_Report = (0x28, 0x03)
SceneActivation_Set = (0x2b, 0x01)
SceneActuatorConf_Set = (0x2c, 0x01)
SceneActuatorConf_Get = (0x2c, 0x02)
SceneActuatorConf_Report = (0x2c, 0x03)
SceneControllerConf_Set = (0x2d, 0x01)
SceneControllerConf_Get = (0x2d, 0x02)
SceneControllerConf_Report = (0x2d, 0x03)
SensorBinary_Get = (0x30, 0x02)
SensorBinary_Report = (0x30, 0x03)
SensorMultilevel_SupportedGet = (0x31, 0x01)
SensorMultilevel_SupportedReport = (0x31, 0x02)
SensorMultilevel_Get = (0x31, 0x04)
SensorMultilevel_Report = (0x31, 0x05)
Meter_Get = (0x32, 0x01)
Meter_Report = (0x32, 0x02)
Meter_SupportedGet = (0x32, 0x03)
Meter_SupportedReport = (0x32, 0x04)
Meter_Reset = (0x32, 0x05)
ColorSwitch_SupportedGet = (0x33, 0x01)
ColorSwitch_SupportedReport = (0x33, 0x02)
ColorSwitch_Get = (0x33, 0x03)
ColorSwitch_Report = (0x33, 0x04)
ThermostatMode_Set = (0x40, 0x01)
ThermostatMode_Get = (0x40, 0x02)
ThermostatMode_Report = (0x40, 0x03)
ThermostatMode_SupportedGet = (0x40, 0x04)
ThermostatMode_SupportedReport = (0x40, 0x05)
ThermostatSetpoint_Set = (0x43, 0x01)
ThermostatSetpoint_Get = (0x43, 0x02)
ThermostatSetpoint_Report = (0x43, 0x03)
ThermostatSetpoint_SupportedGet = (0x43, 0x04)
ThermostatSetpoint_SupportedReport = (0x43, 0x05)
DoorLockLogging_SupportedGet = (0x4c, 0x01)
DoorLockLogging_SupportedReport = (0x4c, 0x02)
DoorLockLogging_Get = (0x4c, 0x03)
DoorLockLogging_Report = (0x4c, 0x04)
AssociationGroupInformation_NameGet = (0x59, 0x01)
AssociationGroupInformation_NameReport = (0x59, 0x02)
AssociationGroupInformation_InfoGet = (0x59, 0x03)
AssociationGroupInformation_InfoReport = (0x59, 0x04)
AssociationGroupInformation_ListGet = (0x59, 0x05)
AssociationGroupInformation_ListReport = (0x59, 0x06)
CentralScene_SupportedGet = (0x5b, 0x01)
CentralScene_SupportedReport = (0x5b, 0x02)
CentralScene_Notification = (0x5b, 0x03)
ZwavePlusInfo_Get = (0x5e, 0x01)
ZwavePlusInfo_Report = (0x5e, 0x02)
MultiChannel_EndPointGet = (0x60, 0x07)
MultiChannel_EndPointReport = (0x60, 0x08)
MultiChannel_CapabilityGet = (0x60, 0x09)
MultiChannel_CapabilityReport = (0x60, 0x0a)
MultiChannel_CmdEncap = (0x60, 0x0d)
DoorLock_Set = (0x62, 0x01)
DoorLock_Get = (0x62, 0x02)
DoorLock_Report = (0x62, 0x03)
DoorLock_ConfigurationSet = (0x62, 0x04)
DoorLock_ConfigurationGet = (0x62, 0x05)
DoorLock_ConfigurationReport = (0x62, 0x06)
UserCode_Set = (0x63, 0x01)
UserCode_Get = (0x63, 0x02)
UserCode_Report = (0x63, 0x03)
UserCode_NumberGet = (0x63, 0x04)
UserCode_NumberReport = (0x63, 0x05)
Configuration_Set = (0x70, 0x04)
Configuration_Get = (0x70, 0x05)
Configuration_Report = (0x70, 0x06)
Alarm_Get = (0x71, 0x04)
Alarm_Report = (0x71, 0x05)
Alarm_Set = (0x71, 0x06)
Alarm_SupportedGet = (0x71, 0x07)
Alarm_SupportedReport = (0x71, 0x08)
ManufacturerSpecific_Get = (0x72, 0x04)
ManufacturerSpecific_Report = (0x72, 0x05)
ManufacturerSpecific_DeviceSpecificGet = (0x72, 0x06)
ManufacturerSpecific_DeviceSpecificReport = (0x72, 0x07)
Powerlevel_Set = (0x73, 0x01)
Powerlevel_Get = (0x73, 0x02)
Powerlevel_Report = (0x73, 0x03)
Powerlevel_TestNodeSet = (0x73, 0x04)
Powerlevel_TestNodeGet = (0x73, 0x05)
Powerlevel_TestNodeGetReport = (0x73, 0x06)
Protection_Set = (0x75, 0x01)
Protection_Get = (0x75, 0x02)
Protection_Report = (0x75, 0x03)
Lock_Set = (0x76, 0x01)
Lock_Get = (0x76, 0x02)
Lock_Report = (0x76, 0x03)
NodeNaming_Set = (0x77, 0x01)
NodeNaming_Get = (0x77, 0x02)
NodeNaming_Report = (0x77, 0x03)
NodeNaming_LocationSet = (0x77, 0x04)
NodeNaming_LocationGet = (0x77, 0x05)
NodeNaming_LocationReport = (0x77, 0x06)
Firmware_MetadataGet = (0x7a, 0x01)
Firmware_MetadataReport = (0x7a, 0x02)
Battery_Get = (0x80, 0x02)
Battery_Report = (0x80, 0x03)
Clock_Set = (0x81, 0x04)
Clock_Get = (0x81, 0x05)
Clock_Report = (0x81, 0x06)
Hail_Hail = (0x82, 0x01)
WakeUp_IntervalSet = (0x84, 0x04)
WakeUp_IntervalGet = (0x84, 0x05)
WakeUp_IntervalReport = (0x84, 0x06)
WakeUp_Notification = (0x84, 0x07)
WakeUp_NoMoreInformation = (0x84, 0x08)
WakeUp_IntervalCapabilitiesGet = (0x84, 0x09)
WakeUp_IntervalCapabilitiesReport = (0x84, 0x0a)
Association_Set = (0x85, 0x01)
Association_Get = (0x85, 0x02)
Association_Report = (0x85, 0x03)
Association_Remove = (0x85, 0x04)
Association_GroupingsGet = (0x85, 0x05)
Association_GroupingsReport = (0x85, 0x06)
Version_Get = (0x86, 0x11)
Version_Report = (0x86, 0x12)
Version_CommandClassGet = (0x86, 0x13)
Version_CommandClassReport = (0x86, 0x14)
Indicator_Set = (0x87, 0x01)
Indicator_Get = (0x87, 0x02)
Indicator_Report = (0x87, 0x03)
TimeParameters_Set = (0x8b, 0x01)
TimeParameters_Get = (0x8b, 0x02)
TimeParameters_Report = (0x8b, 0x03)
Security_SupportedGet = (0x98, 0x02)
Security_SupportedReport = (0x98, 0x03)
Security_SchemeGet = (0x98, 0x04)
Security_SchemeReport = (0x98, 0x05)
Security_NetworkKeySet = (0x98, 0x06)
Security_NetworkKeyVerify = (0x98, 0x07)
Security_SchemeInherit = (0x98, 0x08)
Security_NonceGet = (0x98, 0x40)
Security_NonceReport = (0x98, 0x80)
Security_MessageEncap = (0x98, 0x81)
Security_MessageEncapNonceGet = (0x98, 0xc1)
SensorAlarm_Get = (0x9c, 0x01)
SensorAlarm_Report = (0x9c, 0x02)
SensorAlarm_SupportedGet = (0x9c, 0x03)
SensorAlarm_SupportedReport = (0x9c, 0x04)
Security2_NonceGet = (0x9f, 0x01)
Security2_NonceReport = (0x9f, 0x02)
Security2_MessageEncapsulation = (0x9f, 0x03)
Security2_KexGet = (0x9f, 0x04)
Security2_KexReport = (0x9f, 0x05)
Security2_KexSet = (0x9f, 0x06)
Security2_KexFail = (0x9f, 0x07)
Security2_PublicKeyReport = (0x9f, 0x08)
Security2_NetworkKeyGet = (0x9f, 0x09)
Security2_NetworkKeyReport = (0x9f, 0x0a)
Security2_NetworkKeyVerify = (0x9f, 0x0b)
Security2_TransferEnd = (0x9f, 0x0c)
Security2_CommandsSupportedGet = (0x9f, 0x0d)
Security2_CommandsSupportedReport = (0x9f, 0x0e)

SUBCMD_TO_STRING = {
    0x0000: 'NoOperation_Set',
    0x2001: 'Basic_Set',
    0x2002: 'Basic_Get',
    0x2003: 'Basic_Report',
    0x2131: 'ControllerReplication_TransferGroup',
    0x2133: 'ControllerReplication_TransferScene',
    0x2201: 'ApplicationStatus_Busy',
    0x2202: 'ApplicationStatus_RejectedRequest',
    0x2501: 'SwitchBinary_Set',
    0x2502: 'SwitchBinary_Get',
    0x2503: 'SwitchBinary_Report',
    0x2601: 'SwitchMultilevel_Set',
    0x2602: 'SwitchMultilevel_Get',
    0x2603: 'SwitchMultilevel_Report',
    0x2604: 'SwitchMultilevel_StartLevelChange',
    0x2605: 'SwitchMultilevel_StopLevelChange',
    0x2606: 'SwitchMultilevel_SupportedGet',
    0x2607: 'SwitchMultilevel_SupportedReport',
    0x2701: 'SwitchAll_Set',
    0x2702: 'SwitchAll_Get',
    0x2703: 'SwitchAll_Report',
    0x2704: 'SwitchAll_On',
    0x2705: 'SwitchAll_Off',
    0x2801: 'SwitchToggleBinary_Set',
    0x2802: 'SwitchToggleBinary_Get',
    0x2803: 'SwitchToggleBinary_Report',
    0x2b01: 'SceneActivation_Set',
    0x2c01: 'SceneActuatorConf_Set',
    0x2c02: 'SceneActuatorConf_Get',
    0x2c03: 'SceneActuatorConf_Report',
    0x2d01: 'SceneControllerConf_Set',
    0x2d02: 'SceneControllerConf_Get',
    0x2d03: 'SceneControllerConf_Report',
    0x3002: 'SensorBinary_Get',
    0x3003: 'SensorBinary_Report',
    0x3101: 'SensorMultilevel_SupportedGet',
    0x3102: 'SensorMultilevel_SupportedReport',
    0x3104: 'SensorMultilevel_Get',
    0x3105: 'SensorMultilevel_Report',
    0x3201: 'Meter_Get',
    0x3202: 'Meter_Report',
    0x3203: 'Meter_SupportedGet',
    0x3204: 'Meter_SupportedReport',
    0x3205: 'Meter_Reset',
    0x3301: 'ColorSwitch_SupportedGet',
    0x3302: 'ColorSwitch_SupportedReport',
    0x3303: 'ColorSwitch_Get',
    0x3304: 'ColorSwitch_Report',
    0x4001: 'ThermostatMode_Set',
    0x4002: 'ThermostatMode_Get',
    0x4003: 'ThermostatMode_Report',
    0x4004: 'ThermostatMode_SupportedGet',
    0x4005: 'ThermostatMode_SupportedReport',
    0x4301: 'ThermostatSetpoint_Set',
    0x4302: 'ThermostatSetpoint_Get',
    0x4303: 'ThermostatSetpoint_Report',
    0x4304: 'ThermostatSetpoint_SupportedGet',
    0x4305: 'ThermostatSetpoint_SupportedReport',
    0x4c01: 'DoorLockLogging_SupportedGet',
    0x4c02: 'DoorLockLogging_SupportedReport',
    0x4c03: 'DoorLockLogging_Get',
    0x4c04: 'DoorLockLogging_Report',
    0x5901: 'AssociationGroupInformation_NameGet',
    0x5902: 'AssociationGroupInformation_NameReport',
    0x5903: 'AssociationGroupInformation_InfoGet',
    0x5904: 'AssociationGroupInformation_InfoReport',
    0x5905: 'AssociationGroupInformation_ListGet',
    0x5906: 'AssociationGroupInformation_ListReport',
    0x5b01: 'CentralScene_SupportedGet',
    0x5b02: 'CentralScene_SupportedReport',
    0x5b03: 'CentralScene_Notification',
    0x5e01: 'ZwavePlusInfo_Get',
    0x5e02: 'ZwavePlusInfo_Report',
    0x6007: 'MultiChannel_EndPointGet',
    0x6008: 'MultiChannel_EndPointReport',
    0x6009: 'MultiChannel_CapabilityGet',
    0x600a: 'MultiChannel_CapabilityReport',
    0x600d: 'MultiChannel_CmdEncap',
    0x6201: 'DoorLock_Set',
    0x6202: 'DoorLock_Get',
    0x6203: 'DoorLock_Report',
    0x6204: 'DoorLock_ConfigurationSet',
    0x6205: 'DoorLock_ConfigurationGet',
    0x6206: 'DoorLock_ConfigurationReport',
    0x6301: 'UserCode_Set',
    0x6302: 'UserCode_Get',
    0x6303: 'UserCode_Report',
    0x6304: 'UserCode_NumberGet',
    0x6305: 'UserCode_NumberReport',
    0x7004: 'Configuration_Set',
    0x7005: 'Configuration_Get',
    0x7006: 'Configuration_Report',
    0x7104: 'Alarm_Get',
    0x7105: 'Alarm_Report',
    0x7106: 'Alarm_Set',
    0x7107: 'Alarm_SupportedGet',
    0x7108: 'Alarm_SupportedReport',
    0x7204: 'ManufacturerSpecific_Get',
    0x7205: 'ManufacturerSpecific_Report',
    0x7206: 'ManufacturerSpecific_DeviceSpecificGet',
    0x7207: 'ManufacturerSpecific_DeviceSpecificReport',
    0x7301: 'Powerlevel_Set',
    0x7302: 'Powerlevel_Get',
    0x7303: 'Powerlevel_Report',
    0x7304: 'Powerlevel_TestNodeSet',
    0x7305: 'Powerlevel_TestNodeGet',
    0x7306: 'Powerlevel_TestNodeGetReport',
    0x7501: 'Protection_Set',
    0x7502: 'Protection_Get',
    0x7503: 'Protection_Report',
    0x7601: 'Lock_Set',
    0x7602: 'Lock_Get',
    0x7603: 'Lock_Report',
    0x7701: 'NodeNaming_Set',
    0x7702: 'NodeNaming_Get',
    0x7703: 'NodeNaming_Report',
    0x7704: 'NodeNaming_LocationSet',
    0x7705: 'NodeNaming_LocationGet',
    0x7706: 'NodeNaming_LocationReport',
    0x7a01: 'Firmware_MetadataGet',
    0x7a02: 'Firmware_MetadataReport',
    0x8002: 'Battery_Get',
    0x8003: 'Battery_Report',
    0x8104: 'Clock_Set',
    0x8105: 'Clock_Get',
    0x8106: 'Clock_Report',
    0x8201: 'Hail_Hail',
    0x8404: 'WakeUp_IntervalSet',
    0x8405: 'WakeUp_IntervalGet',
    0x8406: 'WakeUp_IntervalReport',
    0x8407: 'WakeUp_Notification',
    0x8408: 'WakeUp_NoMoreInformation',
    0x8409: 'WakeUp_IntervalCapabilitiesGet',
    0x840a: 'WakeUp_IntervalCapabilitiesReport',
    0x8501: 'Association_Set',
    0x8502: 'Association_Get',
    0x8503: 'Association_Report',
    0x8504: 'Association_Remove',
    0x8505: 'Association_GroupingsGet',
    0x8506: 'Association_GroupingsReport',
    0x8611: 'Version_Get',
    0x8612: 'Version_Report',
    0x8613: 'Version_CommandClassGet',
    0x8614: 'Version_CommandClassReport',
    0x8701: 'Indicator_Set',
    0x8702: 'Indicator_Get',
    0x8703: 'Indicator_Report',
    0x8b01: 'TimeParameters_Set',
    0x8b02: 'TimeParameters_Get',
    0x8b03: 'TimeParameters_Report',
    0x9802: 'Security_SupportedGet',
    0x9803: 'Security_SupportedReport',
    0x9804: 'Security_SchemeGet',
    0x9805: 'Security_SchemeReport',
    0x9806: 'Security_NetworkKeySet',
    0x9807: 'Security_NetworkKeyVerify',
    0x9808: 'Security_SchemeInherit',
    0x9840: 'Security_NonceGet',
    0x9880: 'Security_NonceReport',
    0x9881: 'Security_MessageEncap',
    0x98c1: 'Security_MessageEncapNonceGet',
    0x9c01: 'SensorAlarm_Get',
    0x9c02: 'SensorAlarm_Report',
    0x9c03: 'SensorAlarm_SupportedGet',
    0x9c04: 'SensorAlarm_SupportedReport',
    0x9f01: 'Security2_NonceGet',
    0x9f02: 'Security2_NonceReport',
    0x9f03: 'Security2_MessageEncapsulation',
    0x9f04: 'Security2_KexGet',
    0x9f05: 'Security2_KexReport',
    0x9f06: 'Security2_KexSet',
    0x9f07: 'Security2_KexFail',
    0x9f08: 'Security2_PublicKeyReport',
    0x9f09: 'Security2_NetworkKeyGet',
    0x9f0a: 'Security2_NetworkKeyReport',
    0x9f0b: 'Security2_NetworkKeyVerify',
    0x9f0c: 'Security2_TransferEnd',
    0x9f0d: 'Security2_CommandsSupportedGet',
    0x9f0e: 'Security2_CommandsSupportedReport',
}

STRING_TO_SUBCMD = {
    'NoOperation_Set': 0x0000,
    'Basic_Set': 0x2001,
    'Basic_Get': 0x2002,
    'Basic_Report': 0x2003,
    'ControllerReplication_TransferGroup': 0x2131,
    'ControllerReplication_TransferScene': 0x2133,
    'ApplicationStatus_Busy': 0x2201,
    'ApplicationStatus_RejectedRequest': 0x2202,
    'SwitchBinary_Set': 0x2501,
    'SwitchBinary_Get': 0x2502,
    'SwitchBinary_Report': 0x2503,
    'SwitchMultilevel_Set': 0x2601,
    'SwitchMultilevel_Get': 0x2602,
    'SwitchMultilevel_Report': 0x2603,
    'SwitchMultilevel_StartLevelChange': 0x2604,
    'SwitchMultilevel_StopLevelChange': 0x2605,
    'SwitchMultilevel_SupportedGet': 0x2606,
    'SwitchMultilevel_SupportedReport': 0x2607,
    'SwitchAll_Set': 0x2701,
    'SwitchAll_Get': 0x2702,
    'SwitchAll_Report': 0x2703,
    'SwitchAll_On': 0x2704,
    'SwitchAll_Off': 0x2705,
    'SwitchToggleBinary_Set': 0x2801,
    'SwitchToggleBinary_Get': 0x2802,
    'SwitchToggleBinary_Report': 0x2803,
    'SceneActivation_Set': 0x2b01,
    'SceneActuatorConf_Set': 0x2c01,
    'SceneActuatorConf_Get': 0x2c02,
    'SceneActuatorConf_Report': 0x2c03,
    'SceneControllerConf_Set': 0x2d01,
    'SceneControllerConf_Get': 0x2d02,
    'SceneControllerConf_Report': 0x2d03,
    'SensorBinary_Get': 0x3002,
    'SensorBinary_Report': 0x3003,
    'SensorMultilevel_SupportedGet': 0x3101,
    'SensorMultilevel_SupportedReport': 0x3102,
    'SensorMultilevel_Get': 0x3104,
    'SensorMultilevel_Report': 0x3105,
    'Meter_Get': 0x3201,
    'Meter_Report': 0x3202,
    'Meter_SupportedGet': 0x3203,
    'Meter_SupportedReport': 0x3204,
    'Meter_Reset': 0x3205,
    'ColorSwitch_SupportedGet': 0x3301,
    'ColorSwitch_SupportedReport': 0x3302,
    'ColorSwitch_Get': 0x3303,
    'ColorSwitch_Report': 0x3304,
    'ThermostatMode_Set': 0x4001,
    'ThermostatMode_Get': 0x4002,
    'ThermostatMode_Report': 0x4003,
    'ThermostatMode_SupportedGet': 0x4004,
    'ThermostatMode_SupportedReport': 0x4005,
    'ThermostatSetpoint_Set': 0x4301,
    'ThermostatSetpoint_Get': 0x4302,
    'ThermostatSetpoint_Report': 0x4303,
    'ThermostatSetpoint_SupportedGet': 0x4304,
    'ThermostatSetpoint_SupportedReport': 0x4305,
    'DoorLockLogging_SupportedGet': 0x4c01,
    'DoorLockLogging_SupportedReport': 0x4c02,
    'DoorLockLogging_Get': 0x4c03,
    'DoorLockLogging_Report': 0x4c04,
    'AssociationGroupInformation_NameGet': 0x5901,
    'AssociationGroupInformation_NameReport': 0x5902,
    'AssociationGroupInformation_InfoGet': 0x5903,
    'AssociationGroupInformation_InfoReport': 0x5904,
    'AssociationGroupInformation_ListGet': 0x5905,
    'AssociationGroupInformation_ListReport': 0x5906,
    'CentralScene_SupportedGet': 0x5b01,
    'CentralScene_SupportedReport': 0x5b02,
    'CentralScene_Notification': 0x5b03,
    'ZwavePlusInfo_Get': 0x5e01,
    'ZwavePlusInfo_Report': 0x5e02,
    'MultiChannel_EndPointGet': 0x6007,
    'MultiChannel_EndPointReport': 0x6008,
    'MultiChannel_CapabilityGet': 0x6009,
    'MultiChannel_CapabilityReport': 0x600a,
    'MultiChannel_CmdEncap': 0x600d,
    'DoorLock_Set': 0x6201,
    'DoorLock_Get': 0x6202,
    'DoorLock_Report': 0x6203,
    'DoorLock_ConfigurationSet': 0x6204,
    'DoorLock_ConfigurationGet': 0x6205,
    'DoorLock_ConfigurationReport': 0x6206,
    'UserCode_Set': 0x6301,
    'UserCode_Get': 0x6302,
    'UserCode_Report': 0x6303,
    'UserCode_NumberGet': 0x6304,
    'UserCode_NumberReport': 0x6305,
    'Configuration_Set': 0x7004,
    'Configuration_Get': 0x7005,
    'Configuration_Report': 0x7006,
    'Alarm_Get': 0x7104,
    'Alarm_Report': 0x7105,
    'Alarm_Set': 0x7106,
    'Alarm_SupportedGet': 0x7107,
    'Alarm_SupportedReport': 0x7108,
    'ManufacturerSpecific_Get': 0x7204,
    'ManufacturerSpecific_Report': 0x7205,
    'ManufacturerSpecific_DeviceSpecificGet': 0x7206,
    'ManufacturerSpecific_DeviceSpecificReport': 0x7207,
    'Powerlevel_Set': 0x7301,
    'Powerlevel_Get': 0x7302,
    'Powerlevel_Report': 0x7303,
    'Powerlevel_TestNodeSet': 0x7304,
    'Powerlevel_TestNodeGet': 0x7305,
    'Powerlevel_TestNodeGetReport': 0x7306,
    'Protection_Set': 0x7501,
    'Protection_Get': 0x7502,
    'Protection_Report': 0x7503,
    'Lock_Set': 0x7601,
    'Lock_Get': 0x7602,
    'Lock_Report': 0x7603,
    'NodeNaming_Set': 0x7701,
    'NodeNaming_Get': 0x7702,
    'NodeNaming_Report': 0x7703,
    'NodeNaming_LocationSet': 0x7704,
    'NodeNaming_LocationGet': 0x7705,
    'NodeNaming_LocationReport': 0x7706,
    'Firmware_MetadataGet': 0x7a01,
    'Firmware_MetadataReport': 0x7a02,
    'Battery_Get': 0x8002,
    'Battery_Report': 0x8003,
    'Clock_Set': 0x8104,
    'Clock_Get': 0x8105,
    'Clock_Report': 0x8106,
    'Hail_Hail': 0x8201,
    'WakeUp_IntervalSet': 0x8404,
    'WakeUp_IntervalGet': 0x8405,
    'WakeUp_IntervalReport': 0x8406,
    'WakeUp_Notification': 0x8407,
    'WakeUp_NoMoreInformation': 0x8408,
    'WakeUp_IntervalCapabilitiesGet': 0x8409,
    'WakeUp_IntervalCapabilitiesReport': 0x840a,
    'Association_Set': 0x8501,
    'Association_Get': 0x8502,
    'Association_Report': 0x8503,
    'Association_Remove': 0x8504,
    'Association_GroupingsGet': 0x8505,
    'Association_GroupingsReport': 0x8506,
    'Version_Get': 0x8611,
    'Version_Report': 0x8612,
    'Version_CommandClassGet': 0x8613,
    'Version_CommandClassReport': 0x8614,
    'Indicator_Set': 0x8701,
    'Indicator_Get': 0x8702,
    'Indicator_Report': 0x8703,
    'TimeParameters_Set': 0x8b01,
    'TimeParameters_Get': 0x8b02,
    'TimeParameters_Report': 0x8b03,
    'Security_SupportedGet': 0x9802,
    'Security_SupportedReport': 0x9803,
    'Security_SchemeGet': 0x9804,
    'Security_SchemeReport': 0x9805,
    'Security_NetworkKeySet': 0x9806,
    'Security_NetworkKeyVerify': 0x9807,
    'Security_SchemeInherit': 0x9808,
    'Security_NonceGet': 0x9840,
    'Security_NonceReport': 0x9880,
    'Security_MessageEncap': 0x9881,
    'Security_MessageEncapNonceGet': 0x98c1,
    'SensorAlarm_Get': 0x9c01,
    'SensorAlarm_Report': 0x9c02,
    'SensorAlarm_SupportedGet': 0x9c03,
    'SensorAlarm_SupportedReport': 0x9c04,
    'Security2_NonceGet': 0x9f01,
    'Security2_NonceReport': 0x9f02,
    'Security2_MessageEncapsulation': 0x9f03,
    'Security2_KexGet': 0x9f04,
    'Security2_KexReport': 0x9f05,
    'Security2_KexSet': 0x9f06,
    'Security2_KexFail': 0x9f07,
    'Security2_PublicKeyReport': 0x9f08,
    'Security2_NetworkKeyGet': 0x9f09,
    'Security2_NetworkKeyReport': 0x9f0a,
    'Security2_NetworkKeyVerify': 0x9f0b,
    'Security2_TransferEnd': 0x9f0c,
    'Security2_CommandsSupportedGet': 0x9f0d,
    'Security2_CommandsSupportedReport': 0x9f0e,
}

GENERIC_SPECIFIC_DB = {
    0x0100: ['Remote Controller', [], [32], 0x00],
    0x0101: ['Portable Remote Controller', [], [32], 0x00],
    0x0102: ['Portable Scene Controller', [45, 114, 133], [43, 32], 0x00],
    0x0103: ['Portable Installer Tool', [33, 114, 134, 143], [33, 96, 112, 114, 132, 133, 134, 142, 32], 0x00],
    0x0201: ['Static PC Controller', [], [32], 0x00],
    0x0202: ['Static Scene Controller', [45, 114, 133], [43, 32], 0x00],
    0x0203: ['Static Installer Tool', [33, 114, 134, 143], [33, 96, 112, 114, 132, 133, 134, 142, 32], 0x00],
    0x0304: ['Satellite Receiver', [114, 134, 148, 32], [], 0x00],
    0x0311: ['Satellite Receiver V2', [114, 134, 148, 32], [], 0x94],
    0x0312: ['Doorbell', [48, 114, 133, 134, 32], [], 0x30],
    0x0401: ['Simple Display', [114, 134, 146, 147, 32], [], 0x00],
    0x0801: ['Heating Thermostat', [32], [], 0x00],
    0x0802: ['General Thermostat', [64, 67, 114, 32], [], 0x40],
    0x0803: ['Setback Schedule Thermostat', [70, 114, 134, 143, 32], [70, 129, 143], 0x46],
    0x0804: ['Setpoint Thermostat', [67, 114, 134, 143, 32], [67, 143], 0x43],
    0x0805: ['Setback Thermostat', [64, 67, 71, 114, 134, 32], [], 0x40],
    0x0806: ['General Thermostat V2', [64, 67, 114, 134, 32], [], 0x40],
    0x0901: ['Simple Window Covering', [80, 32], [], 0x50],
    0x0f01: ['Basic Repeater Slave', [32], [], 0x00],
    0x1001: ['On/Off Power Switch', [39, 32, 37], [], 0x25],
    0x1003: ['Binary Scene Switch', [39, 43, 44, 114, 32, 37], [], 0x25],
    0x1101: ['Multilevel Power Switch', [39, 32, 38], [], 0x26],
    0x1103: ['Multiposition Motor', [114, 134, 32, 38], [], 0x26],
    0x1104: ['Multilevel Scene Switch', [39, 43, 44, 114, 32, 38], [], 0x26],
    0x1105: ['Motor Control Class A', [37, 114, 134, 32, 38], [], 0x26],
    0x1106: ['Motor Control Class B', [37, 114, 134, 32, 38], [], 0x26],
    0x1107: ['Motor Control Class C', [37, 114, 134, 32, 38], [], 0x26],
    0x1200: ['Remote Switch', [], [32, 32], 0x00],
    0x1201: ['Binary Remote Switch', [], [37, 32], 0x25],
    0x1202: ['Multilevel Remote Switch', [], [38, 32], 0x26],
    0x1203: ['Binary Toggle Remote Switch', [], [40, 32], 0x28],
    0x1204: ['Multilevel Toggle Remote Switch', [], [41, 32], 0x29],
    0x1301: ['Binary Toggle Switch', [37, 40, 32], [], 0x28],
    0x1302: ['Multilevel Toggle Switch', [38, 41, 32], [], 0x29],
    0x2001: ['Routing Binary Sensor', [48], [32], 0x30],
    0x2101: ['Routing Multilevel Sensor', [49], [32], 0x31],
    0x3101: ['Simple Meter', [50, 114, 134], [32], 0x32],
    0x4001: ['Door Lock', [98, 32], [], 0x62],
    0x4002: ['Advanced Door Lock', [98, 114, 134, 32], [], 0x62],
    0x4003: ['Secure Keypad Door Lock', [98, 99, 114, 134, 152, 32], [], 0x62],
    0x5001: ['Energy Production', [144, 32, 114, 134, 136], [], 0x00],
    0xa100: ['Alarm Sensor', [], [32], 0x71],
    0xa101: ['Basic Routing Alarm Sensor', [113, 114, 133, 134], [113, 32], 0x71],
    0xa102: ['Routing Alarm Sensor', [113, 114, 128, 133, 134], [113, 32], 0x71],
    0xa103: ['Basic Zensor Alarm Sensor', [113, 114, 134], [113, 32], 0x71],
    0xa104: ['Zensor Alarm Sensor', [113, 114, 128, 134], [113, 32], 0x71],
    0xa105: ['Advanced Zensor Alarm Sensor', [113, 114, 128, 133, 134], [113, 32], 0x71],
    0xa106: ['Basic Routing Smoke Sensor', [113, 114, 133, 134], [113, 32], 0x71],
    0xa107: ['Routing Smoke Sensor', [113, 114, 128, 133, 134], [113, 32], 0x71],
    0xa108: ['Basic Zensor Smoke Sensor', [113, 114, 134], [113, 32], 0x71],
    0xa109: ['Zensor Smoke Sensor', [113, 114, 128, 134], [113, 32], 0x71],
    0xa10a: ['Advanced Zensor Smoke Sensor', [113, 114, 128, 133, 134], [113, 32], 0x71],
}

SUBCMD_TO_PARSE_TABLE = {

    # NoOperation (0x00 = 0)
    0x0000: [],  # Set (0)

    # Basic (0x20 = 32)
    0x2001: ['B{level}'],  # Set (1)
    0x2002: [],  # Get (2)
    0x2003: ['B{level}'],  # Report (3)

    # ControllerReplication (0x21 = 33)
    0x2131: ['B{seq}', 'B{group}', 'B{node}'],  # TransferGroup (49)
    # TransferScene (51)
    0x2133: ['B{seq}', 'B{scene}', 'B{node}', 'B{level}'],

    # ApplicationStatus (0x22 = 34)
    0x2201: ['B{status}', 'B{delay}'],  # Busy (1)
    0x2202: ['B{status}'],  # RejectedRequest (2)

    # SwitchBinary (0x25 = 37)
    0x2501: ['B{level}'],  # Set (1)
    0x2502: [],  # Get (2)
    0x2503: ['B{level}'],  # Report (3)

    # SwitchMultilevel (0x26 = 38)
    0x2601: ['B{level}', 'B{duration}'],  # Set (1)
    0x2602: [],  # Get (2)
    0x2603: ['B{level}'],  # Report (3)
    0x2604: ['B{mode}', 'L{command}'],  # StartLevelChange (4)
    0x2605: [],  # StopLevelChange (5)
    0x2606: [],  # SupportedGet (6)
    0x2607: ['B{type1}', 'B{type2}'],  # SupportedReport (7)

    # SwitchAll (0x27 = 39)
    0x2701: ['B{mode}'],  # Set (1)
    0x2702: [],  # Get (2)
    0x2703: ['B{mode}'],  # Report (3)
    0x2704: [],  # On (4)
    0x2705: [],  # Off (5)

    # SwitchToggleBinary (0x28 = 40)
    0x2801: [],  # Set (1)
    0x2802: [],  # Get (2)
    0x2803: ['B{level}'],  # Report (3)

    # SceneActivation (0x2b = 43)
    0x2b01: ['B{scene}', 'B{delay}'],  # Set (1)

    # SceneActuatorConf (0x2c = 44)
    0x2c01: ['B{scene}', 'B{delay}', 'B{extra}', 'B{level}'],  # Set (1)
    0x2c02: ['B{scene}'],  # Get (2)
    0x2c03: ['B{scene}', 'B{level}', 'B{delay}'],  # Report (3)

    # SceneControllerConf (0x2d = 45)
    0x2d01: ['B{delay}', 'B{group}', 'B{scene}'],  # Set (1)
    0x2d02: ['B{group}'],  # Get (2)
    0x2d03: ['B{delay}', 'B{group}', 'B{scene}'],  # Report (3)

    # SensorBinary (0x30 = 48)
    0x3002: [],  # Get (2)
    0x3003: ['B{level}'],  # Report (3)

    # SensorMultilevel (0x31 = 49)
    0x3101: ['b{sensor}'],  # SupportedGet (1)
    0x3102: ['R{bits}'],  # SupportedReport (2)
    0x3104: ['b{sensor}'],  # Get (4)
    0x3105: ['B{type}', 'X{value}'],  # Report (5)

    # Meter (0x32 = 50)
    0x3201: ['b{scale}'],  # Get (1)
    0x3202: ['M{value}'],  # Report (2)
    0x3203: [],  # SupportedGet (3)
    0x3204: ['B{type}', 'B{scale}'],  # SupportedReport (4)
    0x3205: [],  # Reset (5)

    # ColorSwitch (0x33 = 51)
    0x3301: [],  # SupportedGet (1)
    0x3302: ['R{bits}'],  # SupportedReport (2)
    0x3303: ['B{group}'],  # Get (3)
    0x3304: ['B{group}', 'B{level}'],  # Report (4)

    # ThermostatMode (0x40 = 64)
    0x4001: ['B{thermo}'],  # Set (1)
    0x4002: [],  # Get (2)
    0x4003: ['B{thermo}'],  # Report (3)
    0x4004: [],  # SupportedGet (4)
    0x4005: ['R{bits}'],  # SupportedReport (5)

    # ThermostatSetpoint (0x43 = 67)
    0x4301: ['B{thermo}', 'X{value}'],  # Set (1)
    0x4302: ['B{thermo}'],  # Get (2)
    0x4303: ['B{thermo}', 'X{value}'],  # Report (3)
    0x4304: [],  # SupportedGet (4)
    0x4305: ['R{bits}'],  # SupportedReport (5)

    # DoorLockLogging (0x4c = 76)
    0x4c01: [],  # SupportedGet (1)
    0x4c02: ['B{count}'],  # SupportedReport (2)
    0x4c03: ['B{count}'],  # Get (3)
    # Report (4)
    0x4c04: ['B{count}', 'C{date}', 'B{type}', 'B{user}', 'A{code}'],

    # AssociationGroupInformation (0x59 = 89)
    0x5901: ['B{group}'],  # NameGet (1)
    0x5902: ['B{group}', 'A{name}'],  # NameReport (2)
    0x5903: ['B{mode}', 'B{group}'],  # InfoGet (3)
    0x5904: ['B{mode}', 'G{groups}'],  # InfoReport (4)
    0x5905: ['B{mode}', 'B{group}'],  # ListGet (5)
    0x5906: ['B{group}', 'A{commands}'],  # ListReport (6)

    # CentralScene (0x5b = 91)
    0x5b01: [],  # SupportedGet (1)
    0x5b02: ['B{count}', 'L{extra}'],  # SupportedReport (2)
    0x5b03: ['B{count}', 'B{mode}', 'B{scene}'],  # Notification (3)

    # ZwavePlusInfo (0x5e = 94)
    0x5e01: [],  # Get (1)
    # Report (2)
    0x5e02: ['B{version}', 'B{role}', 'B{type}', 'W{icon}', 'W{icon2}'],

    # MultiChannel (0x60 = 96)
    0x6007: [],  # EndPointGet (7)
    0x6008: ['B{mode}', 'B{count}', 'b{count2}'],  # EndPointReport (8)
    0x6009: ['B{endpoint}'],  # CapabilityGet (9)
    # CapabilityReport (10)
    0x600a: ['B{endpoint}', 'B{generic}', 'B{specific}', 'L{classes}'],
    0x600d: ['B{src}', 'B{dst}', 'L{command}'],  # CmdEncap (13)

    # DoorLock (0x62 = 98)
    0x6201: ['B{status}'],  # Set (1)
    0x6202: [],  # Get (2)
    0x6203: ['B{status}'],  # Report (3)
    # ConfigurationSet (4)
    0x6204: ['B{timeout}', 'B{control}', 'B{min}', 'B{sec}'],
    0x6205: [],  # ConfigurationGet (5)
    # ConfigurationReport (6)
    0x6206: ['B{timeout}', 'B{control}', 'B{min}', 'B{sec}'],

    # UserCode (0x63 = 99)
    0x6301: [],  # Set (1)
    0x6302: ['B{user}'],  # Get (2)
    0x6303: ['B{user}', 'B{status}', 'L{code}'],  # Report (3)
    0x6304: [],  # NumberGet (4)
    0x6305: ['B{count}'],  # NumberReport (5)

    # Configuration (0x70 = 112)
    0x7004: ['B{parameter}', 'V{value}'],  # Set (4)
    0x7005: ['B{parameter}'],  # Get (5)
    0x7006: ['B{parameter}', 'V{value}'],  # Report (6)

    # Alarm (0x71 = 113)
    0x7104: [],  # Get (4)
    0x7105: ['B{type}', 'B{level}'],  # Report (5)
    0x7106: ['B{type}', 'B{status}'],  # Set (6)
    0x7107: [],  # SupportedGet (7)
    0x7108: [],  # SupportedReport (8)

    # ManufacturerSpecific (0x72 = 114)
    0x7204: [],  # Get (4)
    0x7205: ['W{manufacturer}', 'W{type}', 'W{product}'],  # Report (5)
    0x7206: ['B{type}'],  # DeviceSpecificGet (6)
    0x7207: ['B{type}', 'F{bytes}'],  # DeviceSpecificReport (7)

    # Powerlevel (0x73 = 115)
    0x7301: ['B{level}', 'B{timeout}'],  # Set (1)
    0x7302: [],  # Get (2)
    0x7303: ['B{level}', 'B{timeout}'],  # Report (3)
    0x7304: ['B{node}', 'B{level}', 'W{count}'],  # TestNodeSet (4)
    0x7305: [],  # TestNodeGet (5)
    # TestNodeGetReport (6)
    0x7306: ['B{node}', 'B{status}', 'B{level}', 'W{count}'],

    # Protection (0x75 = 117)
    0x7501: ['B{protection}'],  # Set (1)
    0x7502: [],  # Get (2)
    0x7503: ['B{protection}'],  # Report (3)

    # Lock (0x76 = 118)
    0x7601: ['B{state}'],  # Set (1)
    0x7602: [],  # Get (2)
    0x7603: ['B{state}'],  # Report (3)

    # NodeNaming (0x77 = 119)
    0x7701: ['N{name}'],  # Set (1)
    0x7702: [],  # Get (2)
    0x7703: ['N{name}'],  # Report (3)
    0x7704: ['N{name}'],  # LocationSet (4)
    0x7705: [],  # LocationGet (5)
    0x7706: ['N{name}'],  # LocationReport (6)

    # Firmware (0x7a = 122)
    0x7a01: [],  # MetadataGet (1)
    0x7a02: ['W{manufacturer}', 'W{id}', 'W{checksum}'],  # MetadataReport (2)

    # Battery (0x80 = 128)
    0x8002: [],  # Get (2)
    0x8003: ['B{level}'],  # Report (3)

    # Clock (0x81 = 129)
    0x8104: ['B{dayhour}', 'B{minute}'],  # Set (4)
    0x8105: [],  # Get (5)
    0x8106: ['W{dhm}'],  # Report (6)

    # Hail (0x82 = 130)
    0x8201: [],  # Hail (1)

    # WakeUp (0x84 = 132)
    0x8404: [],  # IntervalSet (4)
    0x8405: [],  # IntervalGet (5)
    0x8406: [],  # IntervalReport (6)
    0x8407: [],  # Notification (7)
    0x8408: [],  # NoMoreInformation (8)
    0x8409: [],  # IntervalCapabilitiesGet (9)
    # IntervalCapabilitiesReport (10)
    0x840a: ['3{XXX}', '3{XXX}', '3{XXX}', '3{XXX}'],

    # Association (0x85 = 133)
    0x8501: ['B{group}', 'L{nodes}'],  # Set (1)
    0x8502: ['B{group}'],  # Get (2)
    0x8503: ['B{group}', 'B{count}', 'B{seq}', 'L{nodes}'],  # Report (3)
    0x8504: ['B{group}', 'L{nodes}'],  # Remove (4)
    0x8505: [],  # GroupingsGet (5)
    0x8506: ['B{count}'],  # GroupingsReport (6)

    # Version (0x86 = 134)
    0x8611: [],  # Get (17)
    # Report (18)
    0x8612: ['B{library}', 'W{protocol}', 'W{firmware}', 'b{hardware}', 't{targets}'],
    0x8613: ['B{class}'],  # CommandClassGet (19)
    0x8614: ['B{class}', 'B{version}'],  # CommandClassReport (20)

    # Indicator (0x87 = 135)
    0x8701: ['B{status}'],  # Set (1)
    0x8702: [],  # Get (2)
    0x8703: ['B{status}'],  # Report (3)

    # TimeParameters (0x8b = 139)
    0x8b01: ['C{date}'],  # Set (1)
    0x8b02: [],  # Get (2)
    0x8b03: ['C{date}'],  # Report (3)

    # Security (0x98 = 152)
    0x9802: [],  # SupportedGet (2)
    0x9803: ['B{mode}', 'L{command}'],  # SupportedReport (3)
    0x9804: ['B{mode}'],  # SchemeGet (4)
    0x9805: ['B{mode}'],  # SchemeReport (5)
    0x9806: ['K{key}'],  # NetworkKeySet (6)
    0x9807: [],  # NetworkKeyVerify (7)
    0x9808: [],  # SchemeInherit (8)
    0x9840: [],  # NonceGet (64)
    0x9880: ['O{nonce}'],  # NonceReport (128)
    0x9881: ['L{data}'],  # MessageEncap (129)
    0x98c1: ['L{data}'],  # MessageEncapNonceGet (193)

    # SensorAlarm (0x9c = 156)
    0x9c01: ['B{alarm}'],  # Get (1)
    0x9c02: ['B{node}', 'B{alarm}'],  # Report (2)
    0x9c03: [],  # SupportedGet (3)
    0x9c04: ['T{bits}'],  # SupportedReport (4)

    # Security2 (0x9f = 159)
    0x9f01: ['B{seq}'],  # NonceGet (1)
    0x9f02: ['B{seq}', 'B{mode}', 'L{nonce}'],  # NonceReport (2)
    0x9f03: ['B{seq}', 'E{extensions}'],  # MessageEncapsulation (3)
    0x9f04: [],  # KexGet (4)
    # KexReport (5)
    0x9f05: ['B{mode}', 'B{schemes}', 'B{profiles}', 'B{keys}'],
    0x9f06: ['B{mode}', 'B{schemes}', 'B{profiles}', 'B{keys}'],  # KexSet (6)
    0x9f07: ['B{type}'],  # KexFail (7)
    0x9f08: ['B{mode}', 'L{key}'],  # PublicKeyReport (8)
    0x9f09: ['B{key}'],  # NetworkKeyGet (9)
    0x9f0a: ['B{key}', 'L{key}'],  # NetworkKeyReport (10)
    0x9f0b: [],  # NetworkKeyVerify (11)
    0x9f0c: ['B{mode}'],  # TransferEnd (12)
    0x9f0d: [],  # CommandsSupportedGet (13)
    0x9f0e: ['L{classes}'],  # CommandsSupportedReport (14)
}
