Direct-mode CAN-P to CAN-S direction
This section describes direct-mode in the CAN-P to CAN-S direction.
Below figure illustrates the configurable elements relevant for the routing of messages from CAN-P to CAN-S in direct-mode. The physical configurations of CAN-P and CAN-S are done in their respective configuration sections.
This section describes the configuration of direct-mode in the CAN-P to CAN-S direction (Direct-mode P-to-S
in below figure).
Configuration file fields (only CAN-S1 displayed)
This section is autogenerated from the Rule Schema file.
Filters phy.can.route.direct.p2s.can_s1.filter
Type |
Min items |
Max items |
---|---|---|
array |
0 |
4 |
Item phy.can.route.direct.p2s.can_s1.filter.item
ID format phy.can.route.direct.p2s.can_s1.filter.item.id_format
Identifier format.
Type |
Default |
Options |
---|---|---|
integer |
0 |
Standard (11-bit): |
Frame format phy.can.route.direct.p2s.can_s1.filter.item.frame_format
Frame format.
Type |
Default |
Options |
---|---|---|
integer |
0 |
Standard: |
Method phy.can.route.direct.p2s.can_s1.filter.item.method
Matching method.
Type |
Default |
Options |
---|---|---|
integer |
0 |
Range: |
From (range) / ID (mask) (HEX) phy.can.route.direct.p2s.can_s1.filter.item.f1
Range method: Field defines the start of range. Mask method: Field defines the filter ID.
Type |
Default |
---|---|
string |
0 |
To (range) / mask (mask) (HEX) phy.can.route.direct.p2s.can_s1.filter.item.f2
Range method: Field defines the end of range. Mask method: Field defines the filter mask.
Type |
Default |
---|---|
string |
7FF |
Configuration explained
In below the configuration is explained in detail.
Filter tester
During configuration of filters, it is convenient to be able to test if a message passes a specific filter. Below tester can be used to check if a message is accepted by a filter.
Note
F1, F2, and Message ID are entered as hexadecimal values. The tester assumes that ID-format and frame-format of the filter and the message match.
The interpretation of F1 and F2 depends on the matching method.
Filter
For each CAN-S, a list of four CAN-P to CAN-S filters can be configured. When a message is received on CAN-P, it is tested against each filter element. If the message passes a filter element, it is forwarded to the associated CAN-S. If the message does not pass any filter elements, it is ignored (not forwarded). A message can be forwarded to multiple CAN-S (if it passes at least one filter element from each list).
A message on CAN-P is tested against a filter element as illustrated in below figure. Use the Filter tester to test if the ID-value matches.
For a detailed description on how to calculate ID-value matching when method
is set to mask
, see Filter ID / mask.
Examples
Example: Forward all messages on CAN-P to all CAN-S
For each CAN-S, configure below two filter elements.
# |
ID-format |
Frame-format |
Method |
ID |
Mask |
---|---|---|---|---|---|
1 |
Standard |
Both |
Mask |
0 |
0 |
2 |
Extended |
Both |
Mask |
0 |
0 |
Note
Configuring frame-format to both
ensures that both standard and FD frame-format messages are accepted.
Note
Configuring mask to 0
ensures that all message ID-values are accepted.
Example: Forward all standard format messages on CAN-P to all CAN-S
For each CAN-S, configure below two filter elements.
# |
ID-format |
Frame-format |
Method |
ID |
Mask |
---|---|---|---|---|---|
1 |
Standard |
Standard |
Mask |
0 |
0 |
2 |
Extended |
Standard |
Mask |
0 |
0 |
Note
Configuring frame-format to standard
ensures that only standard frame-format messages are accepted.
Note
Configuring mask to 0
ensures that all message ID-values are accepted.