TDT-Protocol on CAN » Historie » Version 26
Maximilian Seesslen, 20.12.2022 18:05
1 | 25 | Maximilian Seesslen | h1. Pre |
---|---|---|---|
2 | |||
3 | 26 | Maximilian Seesslen | 11-Bit-Identifier, (CAN 2.0A); 2048; 0x800 |
4 | 29-Bit-Identifier, (CAN 2.0B); 0x20000000 |
||
5 | 25 | Maximilian Seesslen | |
6 | 12 | Maximilian Seesslen | h1. Intro |
7 | 1 | Maximilian Seesslen | |
8 | 17 | Maximilian Seesslen | With the TDT-Protocol sensors can just send their values on the BUS without complex object catalogue. |
9 | An monitor-software is able to display values without knowing anything about the sensors or their configuration. |
||
10 | 24 | Maximilian Seesslen | The CANId of sensors is actually their configurable ID or an global command. |
11 | 1 | Maximilian Seesslen | |
12 | 17 | Maximilian Seesslen | Sensor values are ususally not very important so the CAN-IDs start at 0x200 (max ids 0x800); |
13 | |||
14 | 1 | Maximilian Seesslen | |_. Size |_. Decription |_. Examples | |
15 | 2 | Maximilian Seesslen | | 1 | Sub-Id; | Futher index; Sub-Sensor or more specifi kind of thing to be set | |
16 | 17 | Maximilian Seesslen | | 1 | Reserved | Maybe config-Flags; require Confirmation, is confirmation... | |
17 | | 1 | Data type | Int, Float, Time, Date, Percent, Promil, Multipacket-String | |
||
18 | | 1 | Unit | Hz, °C, Time, Date, PWM, CAN-ID, Name, Description, Room | |
||
19 | 1 | Maximilian Seesslen | | 4 | Value | 32Bit | |
20 | 2 | Maximilian Seesslen | |
21 | 1 | Maximilian Seesslen | h2. Device behaviour |
22 | 12 | Maximilian Seesslen | |
23 | All devices should shut down after 5 hours when no master-heartbeat is received. |
||
24 | |||
25 | 17 | Maximilian Seesslen | |
26 | 12 | Maximilian Seesslen | h1. IDs, ranges and commands |
27 | |||
28 | 2 | Maximilian Seesslen | h2. CAN IDs |
29 | |||
30 | 1 | Maximilian Seesslen | |_. Range |_. Decription |_. Examples | |
31 | 10 | Maximilian Seesslen | | 0x010-0x0FF | Alarms | Devices have an issue | |
32 | 2 | Maximilian Seesslen | | 0x100-0x1FF | Control commands | Set global actuator | |
33 | | 0x200-0x2FF | Sensors/actors fixed | | |
||
34 | 9 | Maximilian Seesslen | | 0x300-0x6FF | Sensors/actors dynamic | | |
35 | | 0x6FF-0x7FF | Low priority boradcast | Power on devices | |
||
36 | |||
37 | 2 | Maximilian Seesslen | h2. Global actuator |
38 | |||
39 | 1 | Maximilian Seesslen | Global means that all actuators of an type is addressed and not one concrete partipiant. |
40 | 14 | Maximilian Seesslen | An specific partipiant can be specified when sending the target CAN-Id in the value. |
41 | 2 | Maximilian Seesslen | In this way the message is still high priority other than the "Remote Transmission Request" |
42 | |||
43 | 3 | Maximilian Seesslen | |_. ID |_. global actuator |_. Decription | |
44 | | 0x100 | System command | Perform system command; e.g. reboot, poweroff | |
||
45 | 6 | Maximilian Seesslen | | 0x101 | Date/Time | Set date/time of all actuator | |
46 | 8 | Maximilian Seesslen | | 0x102 | Illumination | Set brightness of lamps | |
47 | 1 | Maximilian Seesslen | | 0x103 | Powerswitch | Power on devices | |
48 | 14 | Maximilian Seesslen | | 0x104 | Plant watering pump | Automatically watering indoor plants | |
49 | 8 | Maximilian Seesslen | |
50 | 12 | Maximilian Seesslen | h2. System commands |
51 | 1 | Maximilian Seesslen | |
52 | |_. Sub-ID |_. Type | |
||
53 | 12 | Maximilian Seesslen | | 0x0 | Shutdown | |
54 | | 0x1 | Heartbeat | |
||
55 | |||
56 | h2. Illumination commands |
||
57 | |||
58 | 13 | Maximilian Seesslen | |_. Sub-ID |_. Type | |
59 | | 0x0 | Set ambient light | |
||
60 | | 0x1 | Get ambient light | |
||
61 | | 0x2 | Set ambient light, fading | |
||
62 | | 0x3 | Get ambient light, fading | |
||
63 | | 0x4 | Set plant light | |
||
64 | 1 | Maximilian Seesslen | | 0x5 | Get plant light | |
65 | |||
66 | h2. Powerswitch commands |
||
67 | |||
68 | |_. Sub-ID |_. Type | |
||
69 | | 0x0 | Set powerline for multimedia | |
||
70 | | 0x1 | Get powerline for multimedia | |
||
71 | 17 | Maximilian Seesslen | |
72 | |||
73 | h1. Multipacket-Strings |
||
74 | |||
75 | |_. Address |_. Type | |
||
76 | | 0x0 | Package count | |
||
77 | | 0x1 | Package number | |
||
78 | | 0x2..0x3 | Data | |
||
79 | |||
80 | h1. Actuator introduction |
||
81 | |||
82 | 1 | Maximilian Seesslen | When introduction is requested by system command, each device must send description for each subid. |
83 | 18 | Maximilian Seesslen | |
84 | h1. Example |
||
85 | |||
86 | 23 | Maximilian Seesslen | h2. Turn on the lights |
87 | |||
88 | 19 | Maximilian Seesslen | |_.Data |_.Size |_.Description | |
89 | 20 | Maximilian Seesslen | |0x100 | 29 Bits | CAN-Id: Global command | |
90 | |0x0 | 1 Byte | Sub-Id: Set ambient light | |
||
91 | 21 | Maximilian Seesslen | |0x0 | 1 Byte | Reserved | |
92 | 1 | Maximilian Seesslen | |0x1 | 1 Byte | Data-Type: Integer | |
93 | 22 | Maximilian Seesslen | |0x1 | 1 Byte | PWM: PWM permilli | |
94 | |1000 | 4 Byte | Value: Full Brightness | |
||
95 | 15 | Maximilian Seesslen | |
96 | h1. Usecases |
||
97 | |||
98 | * simple actors can filter message to "Global actuator" messages, at least "system commands" |
||
99 | * There are 14 or 28 Filters on STM32Fs |
||
100 | 25 | Maximilian Seesslen | |
101 | h1. ID Assigning |
||
102 | |||
103 | Some STM32 have an internal 96-bit unique ID. |
||
104 | |||
105 | h1. V2 |
||
106 | |||
107 | |_. Size |_. Decription |_. Examples | |
||
108 | | 1 | Packet type | Standard TDT packet | |
||
109 | | 1 | Sub-Id; | Futher index; Sub-Sensor or more specifi kind of thing to be set | |
||
110 | | 1 | Data type | Int, Float, Time, Date, Percent, Promil, Multipacket-String | |
||
111 | | 1 | Unit | Hz, °C, Time, Date, PWM, CAN-ID, Name, Description, Room | |
||
112 | | 4 | Value | 32Bit | |
||
113 | |||
114 | h2. Multimessage package |
||
115 | |||
116 | |_. Size |_. Decription |_. Examples | |
||
117 | | 1 | Packet type | Multimessage package | |
||
118 | | 1 | count | Number of packages | |
||
119 | | 1 | number | 0: value=data length in bytes | |
||
120 | | 4 | Value | 32Bit | |
||
121 | |||
122 | |_. Size |_. Decription |_. Examples | |
||
123 | | 1 | Packet type | Multimessage package 2 | |
||
124 | | 1 | id | Mailbox | |
||
125 | | 1 | number | 0: value=data length in bytes | |
||
126 | | | | 1: value=number of messages | |
||
127 | | | | 2..x: data | |
||
128 | | 4 | Value | 32Bit | |