CAN data in .asc format ?

Hi,

Can we record and replay the CAN data in .asc format rather than .bin in Drive Xavier ?

Thanks

Hi,

this really depends on the piece of software stack you are using. We highly encourage you to use the DriveWorks stack to record & replay data via the CAN bus using raw data.

By adapting our DriveWorks interface, you can be sure the data is processed correctly for now and future releases. Let’s say we would do any modifications of our raw data in terms of performance or security. Then, the advantage is your code will still run since our higher level functions abstract all the de- and serialization on the bus.

We also provide you the functionality to use DRIVE OS directly and hence develop your own CAN stack. This enables you to adapt your own format, e.g. .asc, and obliges you to make sure your software is working optimal.


Other than that you can write your data by calling dwSensorSerializer_initialize with

dwSerializerParams.parameters = “type=user”

and dwSerializerParams.onData pointing to the callback function that will have to meet this signature:

void(* dwSensorSerializerOnDataFunc_t) (const uint8_t *data, size_t size, void *userData)

The function will in turn be called to serialize each raw dwCANMessage, supplied in parameter const uint8_t data. This pointer then needs to be casted to const dwCANMessage.

The .asc CAN trace format is well-documented in Vector’s documentation of CANalyzer or CANoe and also contained in the publicly available demo versions.

The above applies to writing data only. Since the virtual CAN sensor does not support reading from an .asc file, a workaround would be to run two serializers, .bin and .asc, passing the raw data pointer from the user-type serializer down-stream to a .bin CAN serializer using dwSensorSerializer_serializeData.

Hope that helps.

  • Fabian