iqrfpy.enums.commands
Commands module.
This module contains embed peripherals and standards command enums.
1"""Commands module. 2 3This module contains embed peripherals and standards command enums. 4""" 5 6from ..utils.enums import IntEnumMember 7from .peripherals import EmbedPeripherals 8 9__all__ = [ 10 'Command', 11 'ExplorationRequestCommands', 12 'ExplorationRequestPeripheralCommand', 13 'CoordinatorRequestCommands', 14 'NodeRequestCommands', 15 'OSRequestCommands', 16 'EEPROMRequestCommands', 17 'EEEPROMRequestCommands', 18 'RAMRequestCommands', 19 'LEDRequestCommands', 20 'IORequestCommands', 21 'ThermometerRequestCommands', 22 'UartRequestCommands', 23 'FrcRequestCommands', 24 'DALIRequestCommands', 25 'BinaryOutputRequestCommands', 26 'SensorRequestCommands', 27 'LightRequestCommands', 28 'ExplorationResponseCommands', 29 'ExplorationResponsePeripheralCommand', 30 'CoordinatorResponseCommands', 31 'NodeResponseCommands', 32 'OSResponseCommands', 33 'EEPROMResponseCommands', 34 'EEEPROMResponseCommands', 35 'RAMResponseCommands', 36 'LEDResponseCommands', 37 'IOResponseCommands', 38 'ThermometerResponseCommands', 39 'UartResponseCommands', 40 'FrcResponseCommands', 41 'DALIResponseCommands', 42 'BinaryOutputResponseCommands', 43 'SensorResponseCommands', 44 'LightResponseCommands' 45] 46 47 48class Command(IntEnumMember): 49 """DPA commands base enum.""" 50 51 52class ExplorationRequestCommands(Command): 53 """Exploration request commands enum.""" 54 55 PERIPHERALS_ENUMERATION_INFORMATION = 63 56 57 58class ExplorationRequestPeripheralCommand(Command): 59 """More peripherals information peripheral commands enum.""" 60 61 PER_COORDINATOR = EmbedPeripherals.COORDINATOR 62 PER_NODE = EmbedPeripherals.NODE 63 PER_OS = EmbedPeripherals.OS 64 PER_EEPROM = EmbedPeripherals.EEPROM 65 PER_EEEPROM = EmbedPeripherals.EEEPROM 66 PER_RAM = EmbedPeripherals.RAM 67 PER_LEDR = EmbedPeripherals.LEDR 68 PER_LEDG = EmbedPeripherals.LEDG 69 PER_IO = EmbedPeripherals.IO 70 PER_THERMOMETER = EmbedPeripherals.THERMOMETER 71 PER_UART = EmbedPeripherals.UART 72 PER_FRC = EmbedPeripherals.FRC 73 74 75class CoordinatorRequestCommands(Command): 76 """Coordinator request commands enum.""" 77 78 ADDR_INFO = 0 79 DISCOVERED_DEVICES = 1 80 BONDED_DEVICES = 2 81 CLEAR_ALL_BONDS = 3 82 BOND_NODE = 4 83 REMOVE_BOND = 5 84 DISCOVERY = 7 85 SET_DPA_PARAMS = 8 86 SET_HOPS = 9 87 BACKUP = 11 88 RESTORE = 12 89 AUTHORIZE_BOND = 13 90 SMART_CONNECT = 18 91 SET_MID = 19 92 93 94class NodeRequestCommands(Command): 95 """Node request commands enum.""" 96 97 READ = 0 98 REMOVE_BOND = 1 99 BACKUP = 6 100 RESTORE = 7 101 VALIDATE_BONDS = 8 102 103 104class OSRequestCommands(Command): 105 """OS request commands enum.""" 106 107 READ = 0 108 RESET = 1 109 READ_CFG = 2 110 RFPGM = 3 111 SLEEP = 4 112 BATCH = 5 113 SET_SECURITY = 6 114 INDICATE = 7 115 RESTART = 8 116 WRITE_CFG_BYTE = 9 117 LOAD_CODE = 10 118 SELECTIVE_BATCH = 11 119 TEST_RF_SIGNAL = 12 120 FACTORY_SETTINGS = 13 121 WRITE_CFG = 15 122 123 124class RAMRequestCommands(Command): 125 """RAM request commands enum.""" 126 127 READ = 0 128 WRITE = 1 129 READ_ANY = 15 130 131 132class EEPROMRequestCommands(Command): 133 """EEPROM request commands enum.""" 134 135 READ = 0 136 WRITE = 1 137 138 139class EEEPROMRequestCommands(Command): 140 """EEEPROM request commands enum.""" 141 142 READ = 2 143 WRITE = 3 144 145 146class LEDRequestCommands(Command): 147 """LEDR/G request commands enum.""" 148 149 SET_OFF = 0 150 SET_ON = 1 151 PULSE = 3 152 FLASHING = 4 153 154 155class IORequestCommands(Command): 156 """IO request commands enum.""" 157 158 DIRECTION = 0 159 SET = 1 160 GET = 2 161 162 163class ThermometerRequestCommands(Command): 164 """Thermometer request commands enum.""" 165 166 READ = 0 167 168 169class UartRequestCommands(Command): 170 """Uart request commands enum.""" 171 172 OPEN = 0 173 CLOSE = 1 174 WRITE_READ = 2 175 CLEAR_WRITE_READ = 3 176 177 178class FrcRequestCommands(Command): 179 """FRC request commands enum.""" 180 181 SEND = 0 182 EXTRA_RESULT = 1 183 SEND_SELECTIVE = 2 184 SET_PARAMS = 3 185 186 187class DALIRequestCommands(Command): 188 """DALI request commands enum.""" 189 190 SEND_REQUEST_COMMANDS = 0 191 SEND_REQUEST_COMMANDS_ASYNC = 1 192 FRC = -1 193 194 195class BinaryOutputRequestCommands(Command): 196 """BinaryOutput request commands enum.""" 197 198 SET_OUTPUT = 0 199 ENUMERATE_OUTPUTS = 62 200 201 202class SensorRequestCommands(Command): 203 """Sensor request commands enum.""" 204 205 READ_SENSORS = 0 206 READ_SENSORS_WITH_TYPES = 1 207 ENUMERATE = 62 208 FRC = -1 209 210 211class LightRequestCommands(Command): 212 """Light request commands enum.""" 213 214 SET_POWER = 0 215 INCREMENT_POWER = 1 216 DECREMENT_POWER = 2 217 ENUMERATE = 62 218 219 220class ExplorationResponseCommands(Command): 221 """Exploration response commands enum.""" 222 223 PERIPHERALS_ENUMERATION_INFORMATION = 191 224 MORE_PERIPHERALS_INFORMATION = 255 225 226 227class ExplorationResponsePeripheralCommand(Command): 228 """More peripherals information peripheral commands enum.""" 229 230 PER_COORDINATOR = EmbedPeripherals.COORDINATOR + 0x80 231 PER_NODE = EmbedPeripherals.NODE + 0x80 232 PER_OS = EmbedPeripherals.OS + 0x80 233 PER_EEPROM = EmbedPeripherals.EEPROM + 0x80 234 PER_EEEPROM = EmbedPeripherals.EEEPROM + 0x80 235 PER_RAM = EmbedPeripherals.RAM + 0x80 236 PER_LEDR = EmbedPeripherals.LEDR + 0x80 237 PER_LEDG = EmbedPeripherals.LEDG + 0x80 238 PER_IO = EmbedPeripherals.IO + 0x80 239 PER_THERMOMETER = EmbedPeripherals.THERMOMETER + 0x80 240 PER_UART = EmbedPeripherals.UART + 0x80 241 PER_FRC = EmbedPeripherals.FRC + 0x80 242 243 244class CoordinatorResponseCommands(Command): 245 """Coordinator response commands enum.""" 246 247 ADDR_INFO = 128 248 DISCOVERED_DEVICES = 129 249 BONDED_DEVICES = 130 250 CLEAR_ALL_BONDS = 131 251 BOND_NODE = 132 252 REMOVE_BOND = 133 253 DISCOVERY = 135 254 SET_DPA_PARAMS = 136 255 SET_HOPS = 137 256 BACKUP = 139 257 RESTORE = 140 258 AUTHORIZE_BOND = 141 259 SMART_CONNECT = 146 260 SET_MID = 147 261 262 263class NodeResponseCommands(Command): 264 """Node response commands enum.""" 265 266 READ = 128 267 REMOVE_BOND = 129 268 BACKUP = 134 269 RESTORE = 135 270 VALIDATE_BONDS = 136 271 272 273class OSResponseCommands(Command): 274 """OS response commands enum.""" 275 276 READ = 128 277 RESET = 129 278 READ_CFG = 130 279 RFPGM = 131 280 SLEEP = 132 281 BATCH = 133 282 SET_SECURITY = 134 283 INDICATE = 135 284 RESTART = 136 285 WRITE_CFG_BYTE = 137 286 LOAD_CODE = 138 287 SELECTIVE_BATCH = 139 288 TEST_RF_SIGNAL = 140 289 FACTORY_SETTINGS = 141 290 WRITE_CFG = 143 291 292 293class RAMResponseCommands(Command): 294 """RAM response commands enum.""" 295 296 READ = 128 297 WRITE = 129 298 READ_ANY = 143 299 300 301class EEPROMResponseCommands(Command): 302 """EEPROM response commands enum.""" 303 304 READ = 128 305 WRITE = 129 306 307 308class EEEPROMResponseCommands(Command): 309 """EEEPROM response commands enum.""" 310 311 READ = 130 312 WRITE = 131 313 314 315class LEDResponseCommands(Command): 316 """LEDR/G response commands enum.""" 317 318 SET_OFF = 128 319 SET_ON = 129 320 PULSE = 131 321 FLASHING = 132 322 323 324class IOResponseCommands(Command): 325 """IO response commands enum.""" 326 327 DIRECTION = 128 328 SET = 129 329 GET = 130 330 331 332class ThermometerResponseCommands(Command): 333 """Thermometer response commands enum.""" 334 335 READ = 128 336 337 338class UartResponseCommands(Command): 339 """Uart response commands enum.""" 340 341 OPEN = 128 342 CLOSE = 129 343 WRITE_READ = 130 344 CLEAR_WRITE_READ = 131 345 346 347class FrcResponseCommands(Command): 348 """FRC response commands enum.""" 349 350 SEND = 128 351 EXTRA_RESULT = 129 352 SEND_SELECTIVE = 130 353 SET_PARAMS = 131 354 355 356class DALIResponseCommands(Command): 357 """DALI response commands enum.""" 358 359 SEND_REQUEST_COMMANDS = 128 360 SEND_REQUEST_COMMANDS_ASYNC = 129 361 FRC = -1 362 363 364class BinaryOutputResponseCommands(Command): 365 """BinaryOutput response commands enum.""" 366 367 SET_OUTPUT = 128 368 ENUMERATE_OUTPUTS = 190 369 370 371class SensorResponseCommands(Command): 372 """Sensor response commands enum.""" 373 374 READ_SENSORS = 128 375 READ_SENSORS_WITH_TYPES = 129 376 ENUMERATE = 190 377 FRC = -1 378 379 380class LightResponseCommands(Command): 381 """Light response commands enum.""" 382 383 SET_POWER = 128 384 INCREMENT_POWER = 129 385 DECREMENT_POWER = 130 386 ENUMERATE = 190
DPA commands base enum.
53class ExplorationRequestCommands(Command): 54 """Exploration request commands enum.""" 55 56 PERIPHERALS_ENUMERATION_INFORMATION = 63
Exploration request commands enum.
59class ExplorationRequestPeripheralCommand(Command): 60 """More peripherals information peripheral commands enum.""" 61 62 PER_COORDINATOR = EmbedPeripherals.COORDINATOR 63 PER_NODE = EmbedPeripherals.NODE 64 PER_OS = EmbedPeripherals.OS 65 PER_EEPROM = EmbedPeripherals.EEPROM 66 PER_EEEPROM = EmbedPeripherals.EEEPROM 67 PER_RAM = EmbedPeripherals.RAM 68 PER_LEDR = EmbedPeripherals.LEDR 69 PER_LEDG = EmbedPeripherals.LEDG 70 PER_IO = EmbedPeripherals.IO 71 PER_THERMOMETER = EmbedPeripherals.THERMOMETER 72 PER_UART = EmbedPeripherals.UART 73 PER_FRC = EmbedPeripherals.FRC
More peripherals information peripheral commands enum.
76class CoordinatorRequestCommands(Command): 77 """Coordinator request commands enum.""" 78 79 ADDR_INFO = 0 80 DISCOVERED_DEVICES = 1 81 BONDED_DEVICES = 2 82 CLEAR_ALL_BONDS = 3 83 BOND_NODE = 4 84 REMOVE_BOND = 5 85 DISCOVERY = 7 86 SET_DPA_PARAMS = 8 87 SET_HOPS = 9 88 BACKUP = 11 89 RESTORE = 12 90 AUTHORIZE_BOND = 13 91 SMART_CONNECT = 18 92 SET_MID = 19
Coordinator request commands enum.
95class NodeRequestCommands(Command): 96 """Node request commands enum.""" 97 98 READ = 0 99 REMOVE_BOND = 1 100 BACKUP = 6 101 RESTORE = 7 102 VALIDATE_BONDS = 8
Node request commands enum.
105class OSRequestCommands(Command): 106 """OS request commands enum.""" 107 108 READ = 0 109 RESET = 1 110 READ_CFG = 2 111 RFPGM = 3 112 SLEEP = 4 113 BATCH = 5 114 SET_SECURITY = 6 115 INDICATE = 7 116 RESTART = 8 117 WRITE_CFG_BYTE = 9 118 LOAD_CODE = 10 119 SELECTIVE_BATCH = 11 120 TEST_RF_SIGNAL = 12 121 FACTORY_SETTINGS = 13 122 WRITE_CFG = 15
OS request commands enum.
133class EEPROMRequestCommands(Command): 134 """EEPROM request commands enum.""" 135 136 READ = 0 137 WRITE = 1
EEPROM request commands enum.
140class EEEPROMRequestCommands(Command): 141 """EEEPROM request commands enum.""" 142 143 READ = 2 144 WRITE = 3
EEEPROM request commands enum.
125class RAMRequestCommands(Command): 126 """RAM request commands enum.""" 127 128 READ = 0 129 WRITE = 1 130 READ_ANY = 15
RAM request commands enum.
147class LEDRequestCommands(Command): 148 """LEDR/G request commands enum.""" 149 150 SET_OFF = 0 151 SET_ON = 1 152 PULSE = 3 153 FLASHING = 4
LEDR/G request commands enum.
156class IORequestCommands(Command): 157 """IO request commands enum.""" 158 159 DIRECTION = 0 160 SET = 1 161 GET = 2
IO request commands enum.
164class ThermometerRequestCommands(Command): 165 """Thermometer request commands enum.""" 166 167 READ = 0
Thermometer request commands enum.
170class UartRequestCommands(Command): 171 """Uart request commands enum.""" 172 173 OPEN = 0 174 CLOSE = 1 175 WRITE_READ = 2 176 CLEAR_WRITE_READ = 3
Uart request commands enum.
179class FrcRequestCommands(Command): 180 """FRC request commands enum.""" 181 182 SEND = 0 183 EXTRA_RESULT = 1 184 SEND_SELECTIVE = 2 185 SET_PARAMS = 3
FRC request commands enum.
188class DALIRequestCommands(Command): 189 """DALI request commands enum.""" 190 191 SEND_REQUEST_COMMANDS = 0 192 SEND_REQUEST_COMMANDS_ASYNC = 1 193 FRC = -1
DALI request commands enum.
196class BinaryOutputRequestCommands(Command): 197 """BinaryOutput request commands enum.""" 198 199 SET_OUTPUT = 0 200 ENUMERATE_OUTPUTS = 62
BinaryOutput request commands enum.
203class SensorRequestCommands(Command): 204 """Sensor request commands enum.""" 205 206 READ_SENSORS = 0 207 READ_SENSORS_WITH_TYPES = 1 208 ENUMERATE = 62 209 FRC = -1
Sensor request commands enum.
212class LightRequestCommands(Command): 213 """Light request commands enum.""" 214 215 SET_POWER = 0 216 INCREMENT_POWER = 1 217 DECREMENT_POWER = 2 218 ENUMERATE = 62
Light request commands enum.
221class ExplorationResponseCommands(Command): 222 """Exploration response commands enum.""" 223 224 PERIPHERALS_ENUMERATION_INFORMATION = 191 225 MORE_PERIPHERALS_INFORMATION = 255
Exploration response commands enum.
228class ExplorationResponsePeripheralCommand(Command): 229 """More peripherals information peripheral commands enum.""" 230 231 PER_COORDINATOR = EmbedPeripherals.COORDINATOR + 0x80 232 PER_NODE = EmbedPeripherals.NODE + 0x80 233 PER_OS = EmbedPeripherals.OS + 0x80 234 PER_EEPROM = EmbedPeripherals.EEPROM + 0x80 235 PER_EEEPROM = EmbedPeripherals.EEEPROM + 0x80 236 PER_RAM = EmbedPeripherals.RAM + 0x80 237 PER_LEDR = EmbedPeripherals.LEDR + 0x80 238 PER_LEDG = EmbedPeripherals.LEDG + 0x80 239 PER_IO = EmbedPeripherals.IO + 0x80 240 PER_THERMOMETER = EmbedPeripherals.THERMOMETER + 0x80 241 PER_UART = EmbedPeripherals.UART + 0x80 242 PER_FRC = EmbedPeripherals.FRC + 0x80
More peripherals information peripheral commands enum.
245class CoordinatorResponseCommands(Command): 246 """Coordinator response commands enum.""" 247 248 ADDR_INFO = 128 249 DISCOVERED_DEVICES = 129 250 BONDED_DEVICES = 130 251 CLEAR_ALL_BONDS = 131 252 BOND_NODE = 132 253 REMOVE_BOND = 133 254 DISCOVERY = 135 255 SET_DPA_PARAMS = 136 256 SET_HOPS = 137 257 BACKUP = 139 258 RESTORE = 140 259 AUTHORIZE_BOND = 141 260 SMART_CONNECT = 146 261 SET_MID = 147
Coordinator response commands enum.
264class NodeResponseCommands(Command): 265 """Node response commands enum.""" 266 267 READ = 128 268 REMOVE_BOND = 129 269 BACKUP = 134 270 RESTORE = 135 271 VALIDATE_BONDS = 136
Node response commands enum.
274class OSResponseCommands(Command): 275 """OS response commands enum.""" 276 277 READ = 128 278 RESET = 129 279 READ_CFG = 130 280 RFPGM = 131 281 SLEEP = 132 282 BATCH = 133 283 SET_SECURITY = 134 284 INDICATE = 135 285 RESTART = 136 286 WRITE_CFG_BYTE = 137 287 LOAD_CODE = 138 288 SELECTIVE_BATCH = 139 289 TEST_RF_SIGNAL = 140 290 FACTORY_SETTINGS = 141 291 WRITE_CFG = 143
OS response commands enum.
302class EEPROMResponseCommands(Command): 303 """EEPROM response commands enum.""" 304 305 READ = 128 306 WRITE = 129
EEPROM response commands enum.
309class EEEPROMResponseCommands(Command): 310 """EEEPROM response commands enum.""" 311 312 READ = 130 313 WRITE = 131
EEEPROM response commands enum.
294class RAMResponseCommands(Command): 295 """RAM response commands enum.""" 296 297 READ = 128 298 WRITE = 129 299 READ_ANY = 143
RAM response commands enum.
316class LEDResponseCommands(Command): 317 """LEDR/G response commands enum.""" 318 319 SET_OFF = 128 320 SET_ON = 129 321 PULSE = 131 322 FLASHING = 132
LEDR/G response commands enum.
325class IOResponseCommands(Command): 326 """IO response commands enum.""" 327 328 DIRECTION = 128 329 SET = 129 330 GET = 130
IO response commands enum.
333class ThermometerResponseCommands(Command): 334 """Thermometer response commands enum.""" 335 336 READ = 128
Thermometer response commands enum.
339class UartResponseCommands(Command): 340 """Uart response commands enum.""" 341 342 OPEN = 128 343 CLOSE = 129 344 WRITE_READ = 130 345 CLEAR_WRITE_READ = 131
Uart response commands enum.
348class FrcResponseCommands(Command): 349 """FRC response commands enum.""" 350 351 SEND = 128 352 EXTRA_RESULT = 129 353 SEND_SELECTIVE = 130 354 SET_PARAMS = 131
FRC response commands enum.
357class DALIResponseCommands(Command): 358 """DALI response commands enum.""" 359 360 SEND_REQUEST_COMMANDS = 128 361 SEND_REQUEST_COMMANDS_ASYNC = 129 362 FRC = -1
DALI response commands enum.
365class BinaryOutputResponseCommands(Command): 366 """BinaryOutput response commands enum.""" 367 368 SET_OUTPUT = 128 369 ENUMERATE_OUTPUTS = 190
BinaryOutput response commands enum.
372class SensorResponseCommands(Command): 373 """Sensor response commands enum.""" 374 375 READ_SENSORS = 128 376 READ_SENSORS_WITH_TYPES = 129 377 ENUMERATE = 190 378 FRC = -1
Sensor response commands enum.
381class LightResponseCommands(Command): 382 """Light response commands enum.""" 383 384 SET_POWER = 128 385 INCREMENT_POWER = 129 386 DECREMENT_POWER = 130 387 ENUMERATE = 190
Light response commands enum.