Please read the README first.
Use the QUICKSTART guide for local testing.
- Receiver Port (from vehicleCAPTAIN routing core): 5555
- Sender Port (from vehicleCAPTAIN routing core): 5556
- Local Exchange Port (between sender and receiver examples): 5557
BE AWARE: the vehicleCAPTAIN routing core receives/sends messages via its connected V2X interfaces. There is no direct feedback loop.
The IP is either:
- IP of the sending routing core (sending vehicleCAPTAIN)
- IP of the receiver demo (127.0.0.1, with network bridge enabled)
./docker_demo_build_and_run
docker exec cpp_sender-demo ./cppSender <ip> <port> <msg_id> <frequency (1/10Hz)>
The dev docker can be used for development. Below are two examples on how to integrate it with CLion. Other IDEs may be configured similarly.
This configuration can be used when the IDE supports SSH remote deployment.
- git clone CPP-Sender repo
- in root folder execute docker script:
./docker_dev_build_and_run.sh
-
the docker has to be running, otherwise the connection is going to be refused
-
make the following configurations either for sender or receiver
- File -> Settings -> Build, Execution, Deployment -> Toolchains
- Click "+" and "New Remote Host"
- Configure new remote (SSH Configurations):
- Host: localhost
- Port: 2222
- Username: user
- Password: password
- File -> Settings -> Build, Execution, Deployment -> CMake
- Click "+" and name it "Debug-Remote" for example
- Select the previously created toolchain
- Reload the CMake Project (open CMake file in CLion and click Reload CMake project)
docker exec -it cpp_sender-dev ./cppSender <ip> <port> <msg_id> <frequency (1/10Hz)>
This configuration can be used if the IDE allows direct docker access.
- git clone CPP-Sender repo
- in root folder execute docker script:
./docker_dev_build_and_run.sh
- File -> Settings -> Build, Execution, Deployment -> Toolchains
- Click "+" and "Docker"
- Setting should look like this:
- Server: Docker
- Image: clion/lw_remote-cpp_sender-env:0.1
- Click 'Apply' and 'OK'.
- File -> Settings -> Build, Execution, Deployment -> CMake
- Click "+" and name it "Debug-Docker" for example
- Select the previously created toolchain
- Reload the CMake Project (open CMake file in CLion and click Reload CMake project)
docker exec -it cpp_sender-dev ./cppSender <ip> <port>
In summary, a script creates a Docker with a working configuration, that can be connected to via SSH.
- the cpp_sender-demo docker has to run
docker start cpp_sender-demo
- if the code has changed, the docker has to be built again
docker rm cpp_sender-demo
./docker_demo_build_and_run.sh
- if the docker is built and running
docker exec cpp_sender-demo ./cppSender <ip> <port> <msg_id> <frequency (1/10Hz)>
- if the ip address is already in use:
docker stop cpp_receiver-demo
docker start cpp_receiver-demo