-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommands.py
More file actions
41 lines (36 loc) · 1.43 KB
/
commands.py
File metadata and controls
41 lines (36 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from .protocol import DefaultCommandPayload, command, Message, PayloadItem
"""
Commands
"""
@command(0x0)
class CMD_LOG_Payload(DefaultCommandPayload):
command_payload = Message([
PayloadItem(name = 'messageID', dimension = 1, datatype = 'B'),
PayloadItem(name = 'trigger', dimension = 1, datatype = 'B'),
PayloadItem(name = 'parameter', dimension = 1, datatype = 'H'),
PayloadItem(name = 'divider', dimension = 1, datatype = 'H'),
])
@command(0x3)
class CMD_CONF_Payload(DefaultCommandPayload):
command_payload = Message([
PayloadItem(name = 'configAction', dimension = 1, datatype = 'I'),
])
@command(0x4)
class CMD_EKF_Payload(DefaultCommandPayload):
command_payload = Message([
PayloadItem(name = 'subcommand', dimension = 1, datatype = 'H'),
PayloadItem(name = 'numberOfParams', dimension = 1, datatype = 'H'),
])
@command(0x5)
class XcomCommandPayload(DefaultCommandPayload):
command_payload = Message([
PayloadItem(name = 'mode', dimension = 1, datatype = 'H'),
PayloadItem(name = 'channelNumber', dimension = 1, datatype = 'H'),
])
@command(0x7)
class CMD_EXTAID_Payload(DefaultCommandPayload):
command_payload = Message([
PayloadItem(name = 'time', dimension = 1, datatype = 'd'),
PayloadItem(name = 'timeMode', dimension = 1, datatype = 'H'),
PayloadItem(name = 'cmdParamID', dimension = 1, datatype = 'H'),
])