You are currently viewing 干货分享 | TSMaster 中不同总线报文消息过滤的操作方式

Sharing | How to Filter Different Bus Messages in TSMaster

TSMaster software platform supports different bus (CAN, LIN, FlexRay) message and signal filtering, including global receive filtering, data stream filtering, window filtering, string filtering, programmable filtering, for different bus signal filters are basically the same way to use. Today, we would like to share with you the various ways to operate the message filtering in TSMaster, and the overall introduction of this article is as follows:.

Keywords in this article: CAN, LIN, FlexRay, telegram message filtering

Table of Contents for this article

I. CAN message message filtering

The following filtering operations are used in CAN message information: global receive filtering, data stream filtering, window filtering, string filtering, and programmable filtering; these filtering operations are explained in detail below.

1. Global reception filtering

Global receive filtering means to complete the setting of filtering on the hardware controller, this way is limited to support the hardware of the same star and the virtual channel of the same star, other manufacturers' devices are not supported. Before operation, you need to select the hardware channel to the same star device, here take TC1016 as an example.

Figure 1
Then open Bus Hardware-CAN Hardware Configuration-Filter ID Settings as shown in Figure II. Choose to filter standard and extended frames, the default is pass filter, can not be modified to block filter. The filtering condition is to identify each binary bit of the message ID, each bit corresponds to three setup characters "0, 1, x", x means that the bit can be either 0 or 1. If you only need to filter one ID, you can also directly specify the identifier, and after completing the setup, a list of identifiers that can be passed will be displayed at the bottom, and the sitting party can verify whether the desired identifier can pass through this ID, or not. If you want to filter only one ID, you can also specify the identifier directly.
Figure 2

2. Data stream filtering (measurement filters)

TSMaster software has a measurement setting window, in which you can combine the data flow direction to realize the effect of filtering, and also supports adding a filter window in front of the window.

The basic idea is that the data flow through a window, the data contained in this window is allowed to pass, other data is not allowed to pass. As shown in the figure below, in the measurement setup window, the message information #2, measurement filters, graphic three windows for topology connection, from the message information window can see that there is a EngineData message under the EngSpeed signal, but in the graphic window is n.a., indicating that it is invalid. This is because a filter has been added to the measurement settings to block the EngineData on channel one.

Figure 3

Measurement of the window filter is in the window click on any window selected box right-click and select Insert Filter, you can also directly in the margins of the choice to add and then dragged to the back of another window. Double-click to open the inserted filter, where you can select the channel to be filtered, the filter conditions here to support any message, a single ID, ID range, node filtering, as well as error frame filtering, and finally need to pay attention to is the type of filter you can choose to pass through the type or block type.

3. Message ID Filter

This filter directly click the funnel icon in the message information window to pop up the configuration window, applicable to real-time listening to bus data or message playback when the operation, where theSupports Message ID Filteringand Channel Filtering, it is important to note whether the selection in the lower left corner is pass-through or block-through.

Figure 4

4. String filtering (recommended to load DBC database)

String filtering is the same as window filtering and supports fuzzy query. The scope of filtering includes the message identifier, the parsed message name, and the physical value (enumerated value) in the message information, and the parsing of the message needs to load the database and bind the corresponding channel in advance. Here it is recommended to load the DBC database.

Figure 5

5、Programmable filtration

Programming filter is one of the most complete filter conditions, it filters the conditions including all the member attributes of the message structure body, specifically can be viewed from the TSMaster header file, including the message frame type, send and receive direction, DLC and so on. The use of this filter need to first click on the message information window in the upper right corner of the funnel icon, select the activation of the filter, and then select the installation of the default filter library; after the installation is complete, the default library will pop up the C applet, the applet can be seen, respectively, for the CAN, LIN, FlexRay, Ethernet created a custom function to distinguish between the definition of its structure are in the TSMaster.h header file can be found. 

The key point is this:A return of 0 indicates that the eligible message is blocked, while a return of non-zero indicates that the message is windowable.

Figure 6
Figure 7

The following is the operation of pass-through filtering for channel one messages. After writing the code, you need to compile the applet, and finally, you can select the corresponding API function in the programmable filter.

Figure 8
Figure 9
Figure 10

II. LIN Message Filtering

The filtering of LIN telegram messages is done by the following filtering operations.

1. Data stream filtering

Configure the topology of the three windows of the measurement filter, LIN message information #2, and graphics in the measurement setup, and as a result, you can see that after the filter only the frame 0x15 of this message passes through to arrive at the message information window, and at the same time, the value of the SteeringLampState signal in the graphics window is n.a. invalid value. From the message information window, you can see that the original data stream has this signal data.

Figure 11

2. Message ID window filtering

Window filtering is different from the previous one in that the channel filtering settings are moved to the lower right corner of the filter setting window, and will take effect immediately after activating the enabling filter by selecting only channel 1 or other; in addition, the channel of the added identifier corresponds to the channel configured in the lower right corner, which is different from the window filtering of the CAN as mentioned earlier.

Figure 12

3. String filtering (recommended to load DBC database)

The scope of string filtering is also the message identifier, the message name after parsing the message information name, and the physical value (enumeration value) in the message information.

Figure 13

4、Programmable filtration

As shown in the figure below, messages that pass through channel one and have a first message data byte of 0x00 are filtered by programmable.

Figure 14
Figure 15

III. FlexRay Message Message Filtering

The only FlexRay message filters for telegrams are window filtering, string filtering, and programmable filtering.

1、Window filtering

FlexRay window filtering supports adding channel filters and adding corresponding messages from the database.

Figure 16

2、String filtering

String filtering is used in the same way as CAN and LIN for signal keyword search.

Figure 17

3、Programmable filtration

Programmable filtering is also accomplished by making conditional judgments on FR structure members. The following is an example of the range filtering that can be achieved for Slot id.

Figure 18
Figure 19

发表回复