Skip to content

c0c0n3/sensing-layer-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sensing-layer-sim

Sneakily pretends to be sensing layer.

Hacking

Install Python (>= 3.8), Poetry (>=1.1) and the usual Docker stack (Engine >= 20.10, Compose >= 2.1). If you've got Nix, you get a dev shell with the right Python and Poetry versions simply by running

$ nix shell github:c0c0n3/sensing-layer-sim?dir=nix

Otherwise, install the usual way you do on your platform. Then clone this repo, cd into its root dir and install the Python dependencies

$ git clone https://github.com/c0c0n3/sensing-layer-sim.git
$ cd sensing-layer-sim
$ poetry install

Finally drop into a virtual env shell to hack away

$ poetry shell
$ charm .
# ^ Pycharm or whatever floats your boat

Live simulator

This test bed simulates a live environment similar to that of the KITT4SME cluster. In the slsim directory, you'll find two Docker compose files with:

  • Orion LD connected to MongoDB
  • Quantum Leap with a CrateDB (or Timescale) backend

To start the show, run (Ctrl+C to stop)

$ poetry shell
$ python slsim <crate|timescale>

This will bring up the Docker compose environment (assuming you've got a Docker engine running already), subscribe Quantum Leap to Orion and then will start sending Wearable and Worker entities to Orion. On receiving those entities, Orion forwards them to Quantum Leap. Notice that all those entities do not belong to a tenant.

(only if using CrateDB)

Browsing to the CrateDB Web UI you should be able to query both the entities tables to see data coming in from the simulator through Orion and then Quantum Leap.

About

Sneakily pretends to be sensing layer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published