Project

General

Profile

Actions

Support Request #11154

closed

How to read chunks of type CAN using ADTF File Library

Added by hidden almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Customer:
DAIMLER
Department:
RDI/TBP
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Platform:
Other Linux 64bit, Windows 10 64bit
Topic:
FileLibrary::Common
FAQ Links:

Description

Supportanfrage

We are following CANWriter example to understand the CAN structure and similarly we are trying to read CAN block into the CAN structure using readNextChunk API where stream ID is assigned to CAN stream ID and also tried to read CAN structure data using readChunk API.

Am I using the correct API to extract information or please suggest which APIs should I use to read CAN block into CAN structure.

Lösung

You cannot use asn IndexedFileReader to access the sample data, as chunks contain only serialized versions of the samples. You need to use and adtf_file::Reader as is shown in the "File Access" example (https://support.digitalwerk.net/adtf_libraries/adtf-file-library/v0/html/a02199.html). This will give you the deserialized sample data. It is important, that you load the adtf_devtb_2_deserializerd.adtffileplugin if you want to access ADTF2 Dat files with CAN streams. The File Access Examples does this when specifying the plugin on the command line.

Then you can access the sample data as is done in the "access_file_data" function in the example.


Files

code snippet.png (35.8 KB) code snippet.png hidden, 2020-05-06 11:00
Actions

Also available in: Atom PDF