TraveSim Adapters
0.1
Protobuf adapters for TraveSim project
|
This repository contains a library with the protobuf messages used in the communication between the teams, VSSSReferee and TraveSim/TraveSim Adapters (or FIRASim).
There is a CMakeLists.txt
file in the root of this repository to make it easier to generate de header and source files for each .proto
file.
Note: for now the CMakeLists.txt
only supports generating for C++.
To be able to use the protobuf messages, make sure to have the Google Protocol Buffers installed. Besides that, in order to use the CMakeLists.txt
file, it is required to have cmake installed as well.
This library functions may be added to your projetc as a subtree or a submodule. In this way it allows its development in parallel.
The difference between submodule and subtree, in a simplified explanation, is that using subtree you will have a copy of this library inside your project's repository, whille using submodules the files in this library will not be saved inside your project's repository, there will just be a referance to a specific commit of this library inside your project's repository and you will have to initialize the submodule as described below.
To add this library as a subtree follow the steps below.
Add the subtree by doing in the root of your repository:
To add this library as a submodule follow the steps below.
Add the submodule by doing in the root of your repository:
When cloning a repository that already has submodules, it is necessary to clone the repositories of that submodule. This can be done in two ways, by cloning together with the project repository or after you have already cloned.
Example:
To clone together, run the following command, switching to the repository link of your project:
To clone having already cloned the project repository, within it, you should do:
To use this library, add as a subdirectory it in the top-level CMakeLists.txt
of your project, like this:
Then simply link your executable with the library by doing:
Lastly, in order to include the protobuf header in your executable, it is possible to include as below:
For example, for the vssref_placement.proto
message, you would do: