Generator for TTN decoder, validator and converter functions from a given .proto descriptor
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.tmp fix: packaged files Mar 24, 2017
src chore: make .tmp Mar 24, 2017
test chore: make .tmp Mar 24, 2017
.gitignore fix: packaged files Mar 24, 2017
.npmignore fix: packaged files Mar 24, 2017
.travis.yml use npm Mar 24, 2017
LICENSE initial commit Mar 24, 2017
README.md docs: add badge Mar 24, 2017
index.js chore: make .tmp Mar 24, 2017
otto.sh chore: make it work for CI Mar 24, 2017
otto_cat.sh chore: make it work for CI Mar 24, 2017
package.json fix: include chalk in dependencies Mar 26, 2017
webpack.config.js cleanup Mar 24, 2017
yarn.lock fix: include chalk in dependencies Mar 26, 2017

README.md

Generator for Data functions for The Things Network based on protobuf

Build Status

Installation

npm install -g ttn-proto-generator

or

yarn global ttn-proto-generator

API

Usage: ttn-proto-generator -p [string] -m [string] -o [string]

Options:
  -p, --proto-file        The proto definition file            [required]
  -m, --message           The message path                     [required]
  -o, --output-directory  The output directory             [Default: "."]
  -h, --help              Hilfe anzeigen                        [boolean]
  -v, --version           Version anzeigen                      [boolean]

Example

ttn-proto-generator \
    -p ./my/message.proto \
    -m com.example.MyMessage

Would generate four files from the given Protobuf definition file:

  • Converter.js
  • Decoder.js
  • Encoder.js
  • Validator.js

That match the respective data functions in the Things Network Console. Just take the output and paste it into the console.