Direct-mode CAN-S to CAN-P direction

This section describes direct-mode in the CAN-S to CAN-P direction.


Below figure illustrates the configurable elements relevant for the routing of messages from CAN-S to CAN-P in direct-mode. The physical configurations of CAN-P and CAN-S are done in their respective configuration sections.

Note

Note that the CAN-S physical filters (configured in the CAN-S sections) control which messages are forwarded from CAN-S to CAN-P.

This section describes the configuration of direct-mode in the CAN-S to CAN-P direction (Direct-mode S-to-P in below figure).

flowchart RL subgraph pphyconfig["<b>CAN-P physical</b>"] pphy["P Physical"] end subgraph directconfig["<b>Direct-mode S-to-P</b>"] s1map["S1 Map"] s2map["S2 Map"] s3map["S3 Map"] s4map["S4 Map"] end subgraph sconfig["<b>CAN-S physical + filter</b>"] s1fil["S1-to-P Filter"] s2fil["S2-to-P Filter"] s3fil["S3-to-P Filter"] s4fil["S4-to-P Filter"] s1phy["S1 Physical"] s2phy["S2 Physical"] s3phy["S3 Physical"] s4phy["S4 Physical"] end s1phy --> s1fil --> s1map --> pphy s2phy --> s2fil --> s2map --> pphy s3phy --> s3fil --> s3map --> pphy s4phy --> s4fil --> s4map --> pphy style directconfig stroke-width:4px

S-to-P direction


Configuration file fields (only CAN-S1 displayed)

This section is autogenerated from the Rule Schema file.

Mappings phy.can.route.direct.s2p.can_s1.map

Type

Min items

Max items

array

0

16

Item phy.can.route.direct.s2p.can_s1.map.item

From (S) phy.can.route.direct.s2p.can_s1.map.item.from

ID format phy.can.route.direct.s2p.can_s1.map.item.from.id_format

Message identifier format.

Type

Default

Options

integer

0

Standard (11-bit): 0 Extended (29-bit): 1

ID (HEX) phy.can.route.direct.s2p.can_s1.map.item.from.f1

Message dentifier value.

Type

Default

string

0

ID mask (HEX) phy.can.route.direct.s2p.can_s1.map.item.from.f2

Message identifier mask.

Type

Default

string

7FF


To (P) phy.can.route.direct.s2p.can_s1.map.item.to

ID format phy.can.route.direct.s2p.can_s1.map.item.to.id_format

Message identifier format.

Type

Default

Options

integer

0

Standard (11-bit): 0 Extended (29-bit): 1

ID (HEX) phy.can.route.direct.s2p.can_s1.map.item.to.f1

Message identifier value.

Type

Default

string

0


Configuration explained

In below the configuration is explained in detail.

Map

The messages accepted by the CAN-S filters are forwarded to CAN-P. To avoid potential ID duplication, it is optionally possible to ID re-map specific message IDs.

For each CAN-S, a list of 16 CAN-S to CAN-P ID mappings can be configured. When a message is received on a specific CAN-S, the ID is compared to the associated mapping list. If a match is found, the ID is changed before it is forwarded to CAN-P. If no ID match is found, the message is forwarded directly.

Note

If multiple mapping entries match the first mapping entry is used.


Examples

Example: The CANmod.router CAN-S1 to CAN-S4 are connected to four buses. For each bus, the CAN-S filters are configured to forward standard ID 1 and extended ID 2 to CAN-P. To avoid ID duplication (i.e. confusion), mapping lists are configured for each CAN-S, such that the IDs do not overlap on CAN-P.

Below demonstrates how the two IDs can be mapped to unique IDs on CAN-P.

Note

Notice how the mask is set to consider all bits (i.e. exact ID match) for both the standard (11-bit) and the extended (29-bit) IDs.

CAN-S1 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Standard

1

7FF

Standard

11

2

Extended

2

1FFFFFFF

Extended

12

CAN-S2 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Standard

1

7FF

Standard

21

2

Extended

2

1FFFFFFF

Extended

22

CAN-S3 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Standard

1

7FF

Standard

31

2

Extended

2

1FFFFFFF

Extended

32

CAN-S4 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Standard

1

7FF

Standard

41

2

Extended

2

1FFFFFFF

Extended

42

Example: The CANmod.router CAN-S1 and CAN-S2 are connected to two buses running J1939. The CAN-S filters are configured to forward message with PGN 61444 (EEC1). The priority and source address of the messages are unknown. To avoid confusion between the two PGNs on CAN-P, a ID mapping entry is created for both CAN-S1 and CAN-S2 to map the messages with PGN 61444 to specific new IDs (EEC101 and EEC102 respectively). To ensure that the mapping is triggered regardless of message priority and source address, a ID-mask is applied (matching only on 18 of the 29 bits).

CAN-S1 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Extended

EEC100

3FFFF00

Extended

EEC101

CAN-S2 to CAN-P mapping list

\

From

To

#

ID-format

ID-value

ID-mask

ID-format

ID-value

1

Extended

EEC100

3FFFF00

Extended

EEC102