https://github.com/chrberger/cluon-javascript
Minimum viable product (MVP) demonstrating how to communicate between JavaScript and OD4Sessions using libcluon.
https://github.com/chrberger/cluon-javascript
amd64 arm cpp cpp11 docker docker-image javascript json libcluon opendlv protobuf websocket websockets
Last synced: 3 months ago
JSON representation
Minimum viable product (MVP) demonstrating how to communicate between JavaScript and OD4Sessions using libcluon.
- Host: GitHub
- URL: https://github.com/chrberger/cluon-javascript
- Owner: chrberger
- License: mit
- Created: 2018-04-19T11:27:51.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T08:58:45.000Z (over 7 years ago)
- Last Synced: 2025-04-07T04:49:49.049Z (about 1 year ago)
- Topics: amd64, arm, cpp, cpp11, docker, docker-image, javascript, json, libcluon, opendlv, protobuf, websocket, websockets
- Language: C++
- Size: 927 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cluon-javascript
This project provides a minimum viable product (MVP) demonstrating how to communicate between JavaScript and [OD4Sessions](https://github.com/chalmers-revere/opendlv) using [libcluon](https://github.com/chrberger/libcluon) and hence, connecting JavaScript and C++ to exchange data bi-directionally.
[](https://opensource.org/licenses/MIT) [](https://hub.docker.com/r/chrberger/cluon-javascript-js-amd64/tags/) [](https://hub.docker.com/r/chrberger/cluon-javascript-cpp-amd64/tags/) [](https://hub.docker.com/r/chrberger/cluon-javascript-js-armhf/tags/) [](https://hub.docker.com/r/chrberger/cluon-javascript-cpp-armhf/tags/)
## Table of Contents
* [Features](#features)
* [Dependencies](#dependencies)
* [Usage](#usage)
* [Building](#building)
* [License](#license)
## Features
* Written in highly portable and high quality C++14
* Sending data in [Protobuf](https://developers.google.com/protocol-buffers/) from C++ to your JavaScript application
* Sending data in [Protobuf](https://developers.google.com/protocol-buffers/) from JavaScript to your C++ application
* Description of the [C++](https://github.com/chrberger/cluon-javascript/blob/master/cpp/README.md) part of this ping-pong application
* Description of the [JavaScript](https://github.com/chrberger/cluon-javascript/blob/master/js/README.md) 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:
* [libcluon](https://github.com/chrberger/libcluon) - [](https://www.gnu.org/licenses/gpl-3.0.txt)
## Usage
This microservice is provided via Docker's public registry for:
* [](https://hub.docker.com/r/chrberger/cluon-javascript-js-amd64/tags/)
* [](https://hub.docker.com/r/chrberger/cluon-javascript-cpp-amd64/tags/)
* [](https://hub.docker.com/r/chrberger/cluon-javascript-js-armhf/tags/)
* [](https://hub.docker.com/r/chrberger/cluon-javascript-cpp-armhf/tags/)
1. Running the webserver to serve the JavaScript application serving data from [OD4Session](https://github.com/chalmers-revere/opendlv) `111`:
```
docker run --rm -ti --net=host chrberger/cluon-javascript-js-amd64:latest --cid=111
```
2. 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++](https://github.com/chrberger/cluon-javascript/blob/master/cpp/README.md) part of this ping-pong application
* Description of the [JavaScript](https://github.com/chrberger/cluon-javascript/blob/master/js/README.md) part of this ping-pong application
## License
* This project is released under the terms of the MIT License.