Giter Site home page Giter Site logo

driver's Introduction

Dividat Driver

Build status

Dividat drivers and hardware test suites.

Development

Prerequisites

Nix is required for installing dependencies and providing a suitable development environment.

Quick start

  • Create a suitable environment: nix-shell
  • Build the driver: make
  • Run the driver: ./bin/dividat-driver

Tests

Run the test suite with: make test.

Go modules

To install a module, use go get github.com/owner/repo.

Documentation is available at https://golang.org/ref/mod.

Releasing

Building

Currently releases can only be made from Linux.

To create a release run: make release.

A default environment (defined in default.nix) provides all necessary dependencies for building on your native system (i.e. Linux or Darwin). Running make will create a binary that should run on your system (at least in the default environemnt).

Releases are built towards a more clearly specified target system (also statically linked). The target systems are defined in the nix/build folder. Nix provides toolchains and dependencies for the target system in a sub environment. The build system (in the make crossbuild target) invokes these sub environments to build releases.

Existing release targets:

  • Linux: statically linked with musl
  • Windows

Deploying

To deploy a new release run: make deploy. This can only be done if you have correctly tagged the revision and have AWS credentials set in your environment.

Installation

Windows

This application can be run as a Windows service (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-service).

A PowerShell script is provided to download and install the latest version as a Windows service. Run it with the following command in a PowerShell.

Note: You need to run it as an administrator.

PS C:\ Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/dividat/driver/main/install.ps1'))

Please have a look at the script before running it on your system.

Compatibility

To be able to connect to the driver from within a web app delivered over HTTPS, browsers need to consider the loopback address as a trustworthy origin even when not using TLS. This is the case for most modern browsers, with the exception of Safari (https://bugs.webkit.org/show_bug.cgi?id=171934).

This application supports the Private Network Access headers to help browsers decide which web apps may connect to it. The default list of permissible origins consists of Dividat's app hosts. To restrict to a single origin or whitelist other origins, add one or more --permissible-origin parameters to the driver application.

Tools

Data recorder

Senso data

Data from Senso can be recorded using the recorder. Start it with make record > foo.dat. The created recording can be used by the replayer.

Senso Flex data

Like Senso data, but with make record-flex.

Data replayer

Recorded data can be replayed for debugging purposes.

For default settings: npm run replay

To replay an other recording: npm run replay -- rec/senso/simple.dat

To change the replay speed: npm run replay -- --speed=0.5 rec/senso/simple.dat

To run without looping: npm run replay -- --once

Senso replay

The Senso replayer will appear as a Senso network device, so both driver and replayer should be running at the same time.

Senso Flex replay

The Senso Flex replayer (npm run replay-flex) supports the same parameters as the Senso replayer. It mocks the driver with respect to the /flex WebSocket resource, so the driver can not be running at the same time.

driver's People

Contributors

knuton avatar pukkamustard avatar etaque avatar guyonvarch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.