I have a spec sheet for a device which consists of commands that I need to write to the device via CAN bus in order to interact with it. I will be implementing these commands in C++ and write them from a PC into the device via USB -> CAN adapter.
For each command in the spec sheet I am given values for MESSAGE ID, THE PERIOD OF TRANSMITTER(ms), MESSAGE LENGTH(byte), BYTE POSITION, BIT POSITION(start bit), DATA LENGTH(bit).
I am familiar with the CAN bus idea and it’s different frames. Although I am not quite sure how to build and write a command message to the device.
I am thinking the above values are what’s needed in order to construct a command and send it to the device. Although I am not sure what these value names mean nor what CAN bus frame to use.
If someone with CAN bus communication experience could assist with my problem I will greatly appreciate it.
TLDR How can I construct a CAN bus command in C++, what do the above values mean, and do they need to be included in the command?