The agrirouter is a universal data exchange platform for farmers and agricultural contractors that makes it possible to connect machinery and agricultural software, regardless of vendor or manufacturer. Agrirouter does not save data; it transfers data. As a universal data exchange platform, agrirouter fills a gap on the way to Farming 4.0. Its underlying concept unites cross-vendor and discrimination-free data transfer. You retain full control over your data. Even data exchange with service providers (e.g. agricultural contractors) and other partners is uncomplicated: Data are very rapidly transferred via the online connection, and if you wish, is intelligently connected to other datasets.
This project contains the internal Google Protocol Buffer (protobuf) definitions for the communication with the agrirouter. All the definitions are part of the communcation structure of the agrirouter. For more informations see the technical integration guide here.
Here are some external resources for the development:
-
EFDI Protobuf Definition (working draft) currently only available for AEF members - will be published when the working draft of the guideline documents is finished.
Important
If you receive a 404 HTTP status, this means that you are currently not allowed to view this repository because you do not have access. If you are an AEF member and do not have access, please ask the AEF office to grant you access to the repository.
Generating the Java classes for the given *.proto
is quite simple. The project contain a Maven pom.xml
which references a simple plugin to generate the classes. Just call</br>
mvn clean package -Pgenerate-protobuf-api
and the generated source files will be placed underneath src/main/generated
. Additional references - like native Google APIs - are resolved by the plugin itself.
If you want to add a dependency feel free to fetch the latest snapshot or release from Github Packages. Please find the documentation right here.
We are providing NuGet packages to be included in you project. You will find them within the Github Packages section of the organisation. To include these packages you find some documentation from Github regarding the topic "How to integrate Github Packages in NuGet".
The following instructions are based on the Google Protobuf installation guide and are optimized for Unix based systems. For Windows it is recommended to install Cygwin and do the same steps as if you were on a Unix based system.
You can download protoc and protobuf packages from Google Protobuf Releases. Make sure you download the same versions of protoc and protobuf otherwise the installation won’t work.
E.g. protoc-3.5.0-linux-x86_64.zip and protobuf-cpp-3.5.0.zip
-
Unzip package <br>
unzip protoc-3.* -d protoc3
-
Move protoc to /usr/bin/ <br>
sudo mv protoc3/bin/protoc /usr/bin/
-
Move included packages to /usr/include/ <br>
sudo mv protoc3/include/* /usr/include/
-
Optional: make protoc executable for everyone <br>
sudo chmod +x /usr/bin/protoc
-
Optional: make includes readable for everyone <br>
sudo chmod +r /usr/include/google/*
-
Unzip package <br>
unzip protobuf-cpp-3.* -d protobuf3
-
Go to folder profobuf3 and make file configure executable <br>
chmod +x configure
-
Execute following commands <br>
./configure
<br>make
<br>make check
<br>sudo make install
<br>sudo ldconfig
<br> Note: If "make check" fails, you can still install, but it is likely that some features of this library will not work correctly on your system. Proceed at your own risk.
If you want to compile some proto files use protoc [OPTIONS] PROTO_FILES
<br>
The [OPTIONS]
part indicates the destination of compiled file. You can use relative and absolute paths. <br>
In the PROTO_FILES
part you can define which protobuf files will be compiled.
E.g. the command protoc --cpp_out=. ./*.proto
compiles every every proto file in this folder and places the compiled ones within this folder.
If you want to use cross compiling you have to use --host
option when executing ./configure
. <br>
E.g. ./configure --host=powerpc-linux CC=powerpc-linux-gnu-gcc CXX=powerpc-linux-gnu-g++ --with-protoc=/usr/bin/protoc
<br>
Also see Cross-compiling hints.