squadracorsepolito / jsondbc

JSON to dbc converter
MIT License
3 stars 1 forks source link

add Frequency field to a message #10

Closed simoneruffini closed 3 months ago

simoneruffini commented 1 year ago

The frequency field will tell the user at how many HZ the message will be sent on the CAN bus. Frequency equal to 0 means one-shot message.

The value will be saved either as an additional attribute in the dbc or inside the comments of a message. In the latter case this will open up the necessity of parsing the comments of dbc messages to understand if a particular attribute must be imported when converting from dbc to json. We could use the special characters ::: to mark the start of a particular data that must be imported in the json. For eample if this is a dbc comment on a message:

"this is a comment on message 1 :::Freq100"

When parsed will find the tag :::Freq that can then be added to the json

FerroO2000 commented 1 year ago

I think would be cleaner having an int attribute (MSG_FREQUENCY)

simoneruffini commented 1 year ago

change frequency to period_ms