Channel example - Single ID

This example demonstrates how to configure a single channel to accept a single message ID. This also serves as a demonstration of the most simple use of the filter message ID mask (msgIDMask).

Note

This example can easily be extended to a single message ID for each of the 8 channels.

We want to accept only a standard ID message with ID \(2000_{10} = \text{7D0}_{16} = 11111010000_2\)[1].

To do so, we enable Channel 1 (channelEnb to true) and enable filtering (filteringEnb to true).

  • The filter msgID is set to the value of the message ID to accept (HEX value \(\text{7D0}_{16}\))

  • The filter msgIDMask is set to all binary ones to only accept a full message ID match (HEX value \(\text{7FF}_{16}\)[2])

To test if messages with ID \(\text{7D0}_{16}\) passes the filter, we apply the filter mask to both the filter message ID (1 in below) and the message ID (2 in below)[3]. As the results are equal, the message ID is accepted (i.e. all messages with the specific ID are accepted by Channel 1).

\[\begin{split}\begin{array}{cc} \begin{array}{cc} \begin{array}{l} \text{Filter ID}\\ \text{Filter mask}\\ \text{Masked filter} \end{array} & \begin{array}{r} 11111010000_2\\ \&\color{green}{11111111111_2} \\\hline 11111010000_2 \end{array} \end{array} (1) & \begin{array}{cc} \begin{array}{l} \text{Message ID}\\ \text{Filter mask}\\ \text{Masked ID} \end{array} & \begin{array}{r} 11111010000_2\\ \&\color{green}{11111111111_2} \\\hline 11111010000_2 \end{array} \end{array} (2) \end{array}\end{split}\]

The resulting channel configuration becomes:

Compact overview of channel configurations

CHN[4]

channelEnb

extendedID

DSP[5]

filteringEnb

msgID

msgIDMask

1

true

false

1

true

7D0

7FF

2

false

false

1

false

00000000

1FFFFFFF

3

false

false

1

false

00000000

1FFFFFFF

4

false

false

1

false

00000000

1FFFFFFF

5

false

false

1

false

00000000

1FFFFFFF

6

false

false

1

false

00000000

1FFFFFFF

7

false

false

1

false

00000000

1FFFFFFF

8

false

false

1

false

00000000

1FFFFFFF