Page 1 of 1

C++ application to decode .sym "Variables" into the .trc file

Posted: Wed 11. Dec 2024, 16:49
by MyselfPEAK
I am using pcan explorer 6 trace files being generated .trc and I need to convert them to csv(INTO THE CODE SO THAT I CAN PROCESS IT LATER AS I SEE FIT) so the data can be imported into a table along with the "Variables".
I have the symbol file which contains the "Variables".

Could you please guide me on the following:
1. how to do this using C# or C++.


2. MOST IMPORTANTLY: How do I map or decode the symbol file information of the "Variables" from just the trace file ? I want this as I have many trace file, I dont want to generate .csv file for them
( I am aware of the post by Mr. Ms. Snieves: "C# application to convert .trc using .sym file", the solution provided there is not what I am looking for.)

is there a preferred method that will help me decode/map the variables from the symbol file into my existing trace file ?

Any help would be greatly appreciated.

Data: <I borrowed as an example from Mr./Ms. Snieves>
.trc file:
Bus=1,ID=,Type=D,DLC=8,Data=255 210 211 0 0 255 0 0 ,
Bus=1,ID=857,Type=D,DLC=8,Data=255 211 211 0 0 255 0 0 ,
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 ,
Bus=1,ID=856,Type=D,DLC=6,Data=37 24 251 119 11 128 ,
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 ,
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 ,

.sym file:
["857"]
DLC=6
Mux=u16AverageToNothing 1,8 00h
Var=u16ExampleEmpty signed 8,16

Re: C++ application to decode .sym "Variables" into the .trc file

Posted: Thu 12. Dec 2024, 10:55
by M.Heidemann
Hello,

This out of the scope of our support, PCAN-Symbol Editor is a commercial product
and we provide a plethora of export options, we do not give instructions on parsing symbol-files in code.

PCAN-Explorer 6 allows you to export symbolically coded CSV files,
will that be sufficent for your purposes?

Best Regards

Marvin

Re: C++ application to decode .sym "Variables" into the .trc file

Posted: Thu 12. Dec 2024, 11:31
by MyselfPEAK
Hello Marvin,

Thanks for your response.

I am aware of the fact that the PCAN-Symbol Editor is a commercial product.

Yes, i see that we could export the symbolically coded "Variables" to our CAN "Data"(Hex bytes) into CSV file.
But I am afraid, it is not enough for me.

I need a way to map the CAN data I have in my trace file to the "Variables" from the symbol file programmatically.
Could you please guide me through something that would help me get started into acheiving this please ?

Ex: Trace(.trc) file mapped to the Symbol(.sym) file "Variables":
Bus=1,ID=857,Type=D,DLC=8,Data=255 210 211 0 0 255 0 0 , Var1=AverageToNothing Var2=RANDOM_example another_example=SOME_example
Bus=1,ID=857,Type=D,DLC=8,Data=255 211 211 0 0 255 0 0 , Var1=non_average Var2=RANDOM_example another_example=SOME_example
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 , Var1=nothing Var2=RANDOM_example another_example=SOME_example
Bus=1,ID=856,Type=D,DLC=6,Data=37 24 251 119 11 128 , Var1=no_average Var2=inside_as_an_example another_example=for_example
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 , Var1=non_average Var2=RANDOM_example another_example=SOME_example
Bus=1,ID=857,Type=D,DLC=8,Data=255 212 211 0 0 255 0 0 , Var1=non_average Var2=RANDOM_example another_example=SOME_example


Any inputs regarding this woul be much appreciated.

Re: C++ application to decode .sym "Variables" into the .trc file

Posted: Thu 12. Dec 2024, 12:43
by M.Heidemann
Hello,

As i already mentioned, i can not provide you with further infromation regarding this,
i am sorry.

There is no documentation regarding this that we would be allowed to share,
in case you have the DBC-Import Addin as part of your License:

There are implementations of DBC-parsers available online,
in case you have the DBC import Addin you could export to dbc and parse from there.

I know it's not exactly what you have asked for but maybe that could be a solution for you.

BR

Marvin

Re: C++ application to decode .sym "Variables" into the .trc file

Posted: Thu 12. Dec 2024, 17:10
by MyselfPEAK
Hello Marvin,

Thanks for your response.

Though I couldn't get the answer I was looking for, but I highly appreciate the quick response to the query.
Thanks again!

Re: C++ application to decode .sym "Variables" into the .trc file

Posted: Fri 13. Dec 2024, 11:04
by M.Heidemann
Hey,

i have to correct myself, i am really sorry:

Please check the PCAN-Explorer 6 help -> Reference -> Sym-Files

You will find an extensive docuentation regarding the Sym-File format
and go from there.

Best Regards

Marvin