Transmit
This page documents the transmit configuration.
The CANmod.router can be configured to automatically schedule and transmit a list of static messages. Each transmit message can be configured as either single-shot or periodic.
Configuration file fields
This section is autogenerated from the Rule Schema file.
Transmit messages phy.can_s1.transmit
List of scheduled transmit messages.
Type |
Min items |
Max items |
---|---|---|
array |
0 |
16 |
Item phy.can_s1.transmit.item
Name phy.can_s1.transmit.item.name
Message name (optional).
Type |
Max length |
---|---|
string |
16 |
State phy.can_s1.transmit.item.state
Message state.
Type |
Default |
Options |
---|---|---|
integer |
1 |
Disable: |
ID Format phy.can_s1.transmit.item.id_format
Message identifier format.
Type |
Default |
Options |
---|---|---|
integer |
0 |
Standard (11-bit): |
Frame format phy.can_s1.transmit.item.frame_format
Message frame format.
Type |
Default |
Options |
---|---|---|
integer |
0 |
Standard: |
Bit-Rate Switch phy.can_s1.transmit.item.brs
Message data bit-rate-switch (FD only).
Type |
Default |
---|---|
integer |
0 |
Period (10 ms steps) phy.can_s1.transmit.item.period
Message schedule period in milliseconds. 0: single shot, >0: periodic.
Type |
Minimum |
Maximum |
Multiple of |
---|---|---|---|
integer |
0 |
4294967290 |
10 |
Delay (10 ms steps) phy.can_s1.transmit.item.delay
Message schedule offset in milliseconds. If multiple messages are transmitted by the device, it is recommended to offset each separately to reduce peak load on bus. If period > 0, delay < period. If single-shot, delay can be up to max value.
Type |
Minimum |
Maximum |
Multiple of |
---|---|---|---|
integer |
0 |
4294967290 |
10 |
Message ID (hex) phy.can_s1.transmit.item.id
Message identifier. Example: 1FF.
Type |
---|
string |
Messages Data (hex) phy.can_s1.transmit.item.data
Message data bytes. For RTR frames, the number of bytes do determine the DLC. Example: 01020304 or 0102030405060708.
Type |
Max length |
---|---|
string |
128 |
Configuration explained
This section contains additional information and examples.
Period and delay
Transmit messages can be configured as either single-shot or periodic.
The period value determines if a message is single-shot (0) or periodic (>0). The interpretation of the delay value depends on whether the message is single-shot or periodic (see more below).
Note
When possible, it is recommended to spread multiple transmit messages in time by using the delay value. Configuring multiple messages to transmit at the same time can result in messages not being transmitted.
Single-shot
A transmit message is single-shot when the period is set to 0. In this case, the delay is the time between boot-up[1] and the single-shot transmission. Delaying a single-shot message can be useful if e.g. the receiving node has a long boot-up time. The maximum value allows for a delay of up to several hours.
Periodic
A transmit message is periodic when the period value is more than zero. In this case, the delay is the time from the start of each period to the transmission (the offset within the period). Consequently, the delay value must be less than the period value.
Example: Four periodic transmit messages are configured with delay values set to zero.
# |
Period [ms] |
Delay [ms] |
---|---|---|
A |
10 |
0 |
B |
20 |
0 |
C |
30 |
0 |
D |
40 |
0 |
Below figure illustrates the transmission scheduling (arrow-heads symbolize transmissions).
Note
Note how the transmissions periodically coincide in time. Avoid this by using delay values.
Example: Four periodic transmit messages are configured with the same period value and different delay values.
# |
Period [ms] |
Delay [ms] |
---|---|---|
A |
40 |
0 |
B |
40 |
10 |
C |
40 |
20 |
D |
40 |
30 |
Below figure illustrates the transmission scheduling (arrow-heads symbolize transmissions).
Note
Note how the transmissions do not coincidence.