0.1.0 • Published 3 years ago

rhiot-conf-user v0.1.0

Weekly downloads
3
License
GPL-3.0
Repository
-
Last release
3 years ago

rhiot-conf-user for Rhomb.IoT

This is a javascript library to parse configuration files (conf-user.h) from firmware Rhomb.IoT. It also can do diffs from two conf-users.h to detect changes not present in one of them.

What is Rhomb.IoT?

An IoT C++ firmware for embedded devices developed by Rhomb.io System. It is a full framework compatible with multiple microcontrollers, architectures, communication modules, sensors... etc. The user has a custom configuration file called conf-user.h with a lot of macros to control the configuration of the IoT app and their components.

rhiot-conf-user can parse this C++ header file, extract all the macros and create a JSON object that can be used in other applications, like rhiot-desktop or rhiot-wizard, or generate diffs between two files.

Install

You should have Nodejs (with npm or yarn) installed in your computer.

To proceed, open a terminal and type this commands

# optinally install yarn (we prefer yarn but npm can also be used)
npm install --global yarn

# then install rhiot-conf-user with yarn
yarn add rhiot-conf-user

The library is built with javaScript ES6. Generate a lib dir with JavaScript ES5:

yarn compile

# or
npm run compile

Demo application

Please see example file

Limitations

This library has been developed to work within other applications. It only parses strings to extract macro definitions and create JSON objects. Does not contain methods to read conf-user.h files directly from disk.