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).

flowchart LR subgraph pphyconfig["<b>CAN-P physical</b>"] pphy["P Physical"] end subgraph directconfig["<b>Direct-mode P-to-S</b>"] ps1fil["P-to-S1 Filter"] ps2fil["P-to-S2 Filter"] ps3fil["P-to-S3 Filter"] ps4fil["P-to-S4 Filter"] end subgraph sconfig["<b>CAN-S physical</b>"] s1phy["S1 Physical"] s2phy["S2 Physical"] s3phy["S3 Physical"] s4phy["S4 Physical"] end pphy --> ps1fil --> s1phy pphy --> ps2fil --> s2phy pphy --> ps3fil --> s3phy pphy --> ps4fil --> s4phy style directconfig stroke-width:4px

P-to-S direction


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): 0 Extended (29-bit): 1

Frame format phy.can.route.direct.p2s.can_s1.filter.item.frame_format

Frame format.

Type

Default

Options

integer

0

Standard: 0 FD: 1 Both: 2

Method phy.can.route.direct.p2s.can_s1.filter.item.method

Matching method.

Type

Default

Options

integer

0

Range: 0 Mask: 1

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.

Method: F1: F2: Message ID:

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.

flowchart LR msg([CAN-P message])--> idformat{ID-format match} -->|Yes | frameformat{Frame-format match} -->|Yes | idvalue{ID-value match} -->|Yes | forward([Forward]) ignore([Ignore]) idformat -->|No | ignore frameformat -->|No | ignore idvalue -->|No | ignore

CAN-P to CAN-S filter element

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.