Skip to content

chrberger/cluon-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Written in highly portable and high quality C++14
  • Sending data in Protobuf from C++ to your JavaScript application
  • Sending data in Protobuf from JavaScript to your C++ application
  • Description of the C++ part of this ping-pong application
  • Description of the JavaScript part of this ping-pong application

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:

  • x86_64/js
  • x86_64/cpp
  • armhf/js
  • armhf/cpp
  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

  • Description of the C++ part of this ping-pong application
  • Description of the JavaScript part of this ping-pong application

License

  • This project is released under the terms of the MIT License.

About

Minimum viable product (MVP) demonstrating how to communicate between JavaScript and OD4Sessions using libcluon.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages