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 receiving routing core (receiving vehicleCAPTAIN)
- IP of the sender demo (127.0.0.1 with network bridge enabled)
-
./docker_demo_build_and_run docker exec cpp_receiver-demo ./cppReceiver local <ip> <port>
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-Receiver 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_receiver-dev ./cppReceiver <ip> <port>
This configuration can be used if the IDE allows direct docker access.
- git clone CPP-Receiver 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_receiver-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_receiver-dev ./cppReceiver <ip> <port>
In summary, a script creates a Docker with a working configuration, that can be connected to via SSH.
- the cpp_receiver-demo docker has to run
docker start cpp_receiver-demo
- if the code has changed, the docker has to be built again
docker rm cpp_receiver-demo
./docker_demo_build_and_run.sh
- if the docker is built and running
docker exec cpp_receiver-demo ./cppReceiver <ip> <port>
- if the ip address is already in use:
docker stop cpp_receiver-demo
docker start cpp_receiver-demo