This project was made during my internship at Continental Engineering Services, its objectives are:
- Recreate the behaviour of a node in a CAN network
- Serve as an interface for dynamic sending and receiving of CAN messages
- Have scripting options to rerun “commands”
It can be decomposed into two parts:
- Simple command line program
- Interactive program
The first part only allows for executing one command at a time.
The second uses the properties of the caf library, so that multiple commands can be executed.
Both parts allow for the parsing of simulation files, some examples are available in the test folder.
Received network packets, are logged to a .PCAP file and saved to the logs folder, in which for the first part will always be the output.pcap, as for the second part the files will have the name of the time they were created, due to the possibility of trying to receive messages more than one time in a single program run.
$ ./caravel --help
All the available commands will be displayed.
Examples:
$ ./caravel send --id 123 --message AA
$ ./caravel receive
$ ./caravel --file PATH_TO_FILE
$ ./caravel interactive
To enter the interactive mode you must use the last command shown above (possible inputs for this mode are present in the simulation file).
In order to run a simulation in the interactive mode you may input simulate FILE_PATH
.
Part 1 - Use Ctrl-C.
Part 2 - Insert exit
to the command line.
Credits to Continental Engineering Services for proposing and assisting in the project's development.