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).
The resulting channel configuration becomes:
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 |