Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To generate the classes you'll need to read and write BeaconMetrics messages you need to install the protocol buffer compiler, protoc. See here for detailed installation instructions: https://github.com/google/protobuf, e.g.

Code Block
languagebash
titleInstall protoc
wget https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-osx-x86_64.zip ~/Downloads
mkdir -p ~/Downloads/protoc 
cd $_ 
unzip ~/Downloads/protoc-3.4.0-osx-x86_64.zip cp bin/protoc /usr/local/bin 
rm -fR ~/Downloads/protoc-3.4.0-osx-x86_64.zip ~/Downloads/protoc

...

To create a Java class from the proto file run the following command. A Java class will be created, e.g. Beaconmetrics.java.

Code Block
languagebashtitleCreate java class
protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/beaconmetrics.proto

...