Skip to content
Snippets Groups Projects
Commit b6d5d14b authored by Hoop77's avatar Hoop77
Browse files

added README

parent caf0c8b9
Branches
No related merge requests found
# Building
1. Download the boost framework http://www.boost.org/users/download/
2. Set environment variable `BOOST_ROOT` to the boost root directory
3. In the Protocol directory create a build directory:
`mkdir cmake-build-debug`
4. Run cmake:
`cmake --build "cmake-build-debug" --target Protocol -- -j 2`
# Documentation
Run leader:
```cpp
// Create a leader vehicle instance.
LeaderVehicle leader(1); // 1 = vehicle id
// Starts the vehicle thread so this method returns instantly.
// All operations like createPlatoon(), leavePlatoon() are asynchronous operations.
// This means they either return instantly with return value "true" or are ignored with return value "false".
leader.run();
// Automatically tries to create a platoon with a vehicle specified in the method Vehicle::scanAvailableVehicles().
leader.createPlatoon();
// Do stuff ...
// No need to call leader.stop(), since destructor does all the disconnection and cleanup work automatically.
```
Run follower:
Just replace the class `LeaderVehicle` with `FollowerVehicle`.
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment