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