dbcppp icon indicating copy to clipboard operation
dbcppp copied to clipboard

Store net object in text file.

Open imecar-github opened this issue 1 year ago • 3 comments

Hi. Thanks for amazing library.

I am using this library in my beaglebone black device. It is armhf architecture. And It has 1Ghz processor. Whenever I have to load huge dbc file it takes too long (~30sec). But I do not have to change dbc file everytime. Because of this, Can I store net object itself in text file?

Edit: Or If there is a serialization function (which I can not find, my bad if there is) we can save json file or something and read fast.

imecar-github avatar Apr 29 '24 09:04 imecar-github

You can make use of the C-code-generator. Could that fit your problem?

xR3b0rn avatar Apr 29 '24 18:04 xR3b0rn

Thanks for reply. Actually no. That is not fix my problem. I am working on a JSON serializer but I have not enough information. My aim is, first dbc is parsed, it converts dbc to json file. After that it runs on a JSON file. It saves much time I think. Are there any serializer for that ?

imecar-github avatar Apr 30 '24 06:04 imecar-github

There are conversion functionalities in this library implemented, sadly JSON is not one of them. However, you should be able to implement such conversion functionlity yourself. As a good starting point you can look into Network2DBC.c file. This file implements the logic of converting the internal representation of the DBC network into a DBC file.

PRs are welcome!

xR3b0rn avatar May 01 '24 06:05 xR3b0rn