Home

Awesome

cluon-javascript

This project provides a minimum viable product (MVP) demonstrating how to communicate between JavaScript and OD4Sessions using libcluon and hence, connecting JavaScript and C++ to exchange data bi-directionally.

License: MIT x86_64/js x86_64/cpp armhf/js armhf/cpp

Table of Contents

Features

Dependencies

No dependencies! You just need a C++14-compliant compiler to compile this project as it ships its dependencies as part of the source distribution:

Usage

This microservice is provided via Docker's public registry for:

  1. Running the webserver to serve the JavaScript application serving data from OD4Session 111:
docker run --rm -ti --net=host chrberger/cluon-javascript-js-amd64:latest --cid=111
  1. Running the C++ demo program to send data in time-triggered mode:
docker run --rm -ti --net=host chrberger/cluon-javascript-cpp-amd64:latest ping-pong --cid=111

Now, simply point your web-browser to http://localhost:8082 and open the JavaScript console to see the output.

Building

License