Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Show message frequency instead of count #95

Open
martinl opened this issue Jul 30, 2018 · 4 comments
Open

Show message frequency instead of count #95

martinl opened this issue Jul 30, 2018 · 4 comments

Comments

@martinl
Copy link
Contributor

martinl commented Jul 30, 2018

I think the message rate display in Hz (for example, next to Bytes field) would somewhat simplify CAN reverse-engineering and porting related activities

@dzid26
Copy link

dzid26 commented Sep 6, 2018

What if it is not sent periodically ?

@ngbrown
Copy link

ngbrown commented Sep 7, 2018

Then the rate is 0 or not set. Rate is set through a "well known" attribute in the dbc file

@dzid26
Copy link

dzid26 commented Sep 7, 2018

Which attribute specifies that? Do you have an example?

@ngbrown
Copy link

ngbrown commented Sep 7, 2018

From the Vector CANdb++ help file on Cycle Type and Transmission Type:

The cycle time and transmission type of the messages are determined from the user-defined attributes GenMsgSendType and GenSigSendType, GenMsgCycleTime and GenSigCycleTime of the Vector Tool Chain and cannot be edited.

So a minimal .dbc file would look something like this:

VERSION ""


NS_ : 
	NS_DESC_
	CM_
	BA_DEF_
	BA_
	VAL_
	CAT_DEF_
	CAT_
	FILTER
	BA_DEF_DEF_
	EV_DATA_
	ENVVAR_DATA_
	SGTYPE_
	SGTYPE_VAL_
	BA_DEF_SGTYPE_
	BA_SGTYPE_
	SIG_TYPE_REF_
	VAL_TABLE_
	SIG_GROUP_
	SIG_VALTYPE_
	SIGTYPE_VALTYPE_
	BO_TX_BU_
	BA_DEF_REL_
	BA_REL_
	BA_DEF_DEF_REL_
	BU_SG_REL_
	BU_EV_REL_
	BU_BO_REL_
	SG_MUL_VAL_

BS_:

BU_: PCM EON XXX
VAL_TABLE_ GEAR_SHIFTER_enum 32 "D" 8 "R" 4 "P" ;


BO_ 419 GEARBOX: 4 PCM
 SG_ CHECKSUM : 27|4@0+ (1,0) [0|15] "" XXX
 SG_ COUNTER : 29|2@0+ (1,0) [0|3] "" XXX
 SG_ GEAR : 15|8@0+ (1,0) [0|255] "" XXX
 SG_ GEAR_SHIFTER : 7|6@0+ (1,0) [0|63] "" XXX



CM_ BU_ EON "CHFFR_METRIC 330 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
BA_DEF_  "BusType" STRING ;
BA_DEF_ SG_  "GenSigStartValue" INT 0 2147483647;
BA_DEF_ BO_  "GenMsgSendType" ENUM  "cyclic","NotUsed","IfActive","NotUsed","NotUsed","NotUsed","NotUsed","NotUsed","noMsgSendType";
BA_DEF_ BO_  "GenMsgCycleTime" INT 0 3600000;
BA_DEF_DEF_  "BusType" "CAN";
BA_DEF_DEF_  "GenSigStartValue" 0;
BA_DEF_DEF_  "GenMsgSendType" "noMsgSendType";
BA_DEF_DEF_  "GenMsgCycleTime" 0;
BA_ "GenMsgCycleTime" BO_ 419 100;
BA_ "GenMsgSendType" BO_ 419 0;
VAL_ 419 GEAR_SHIFTER 32 "D" 8 "R" 4 "P" ;

This isn't exactly what the files in opendbc look like because those actually incorrectly use the CM_ field and violates some ordering requirements of loading into the Vector CANdb++ editor.

And cycle time is in the units of ms between messages, not Hz.

@pd0wm pd0wm changed the title Add CAN message change rate field in Hz Show message frequency instead of count Feb 16, 2022
@pd0wm pd0wm transferred this issue from commaai/cabana-issues Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants