Coder Social home page Coder Social logo

mikaello / emit-punch-cards-communication Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 1.2 MB

TypeScript utils for communication with EMIT punch cards

License: GNU General Public License v3.0

TypeScript 99.93% HTML 0.05% JavaScript 0.02%
webusb serial-api orienteering emit-orienteering webusb-api

emit-punch-cards-communication's Introduction

emit-punch-cards-communication

Utils for communication with EMIT punch card devices. These utils are implemented wih TypeScript and based on streams. To communicate with the 250 and MTR4 device, the Serial API (see also Serial API on Github or MDN) is used, while for the eScan device WebUSB API was needed.

NB: The Serial API currently only works in Chrome and Edge, while WebUSB API does also work on Chrome for Android.

Install

This library is published to NPM as ES modules (no CommonJS/IIFE):

yarn add @mikaello/emit-punch-card-communication

Usage

See example project to see how this library could be used, especially helper.ts.

Status

  • ❌ eScan2 device
  • ✅ eScan device
  • ❌ ECU1
  • ✅ 250 device
  • ✅ MTR4 device
  • ❌ ePost

emit-punch-cards-communication's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

emit-punch-cards-communication's Issues

eScan: Implement parsing of time frames (not only status messages)

In eScan transformer, the function parseDumpTag(frameData: Uint8Array): DumpTagFrame is now empty, so frames containing time information are discarded.

Time frames consist of a header and a protocol dependent time payload. There are eight different tag protocols (number 0-7).

eScan: Handle large time frames

Today a ringbuffer is used to store temporary data read from the eScan device, this has the downside that you need to now the max input size you can get, or we need smarter reading of large input frames (which could be several megabytes).

For the 250 and MTR4 this was OK, because those had predefined (and quite small) max sizes, the eScan time frames can be huge.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency @types/node to v20.12.12

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/docs.yml
  • actions/checkout v4
  • peaceiris/actions-gh-pages v4
.github/workflows/npm-lint-and-test.yml
  • actions/checkout v4
  • bahmutov/npm-install v1
  • actions/checkout v4
  • actions/setup-node v4
  • bahmutov/npm-install v1
npm
example/package.json
  • @rollup/plugin-node-resolve 15.2.3
  • @types/node 20.12.11
  • @types/w3c-web-usb 1.0.10
  • gulp 4.0.2
  • gulp-typescript 6.0.0-alpha.1
  • rollup 3.29.4
  • rollup-plugin-typescript2 0.36.0
  • serve 14.2.3
  • servor 4.0.2
  • ts-node 10.9.2
  • tslib 2.6.2
  • typescript 5.4.5
package.json
  • @types/jest 29.5.12
  • jest 29.7.0
  • prettier 3.2.4
  • ts-jest 29.1.2
  • typescript 5.4.5
  • web-streams-polyfill 3.3.3
regex
.github/workflows/docs.yml
  • typedoc 0.25.13

  • Check this box to trigger a request for Renovate to run again on this repository

Use SerialAPI polyfill for eScan

eScan is only available trough the WebUSB interface on OSX (maybe on other OS-s too), and 240/MTR4 is pocky available trough Serial API, this means quite a lot of custom code for each API even if the logic is much the same. It may be possible to use https://github.com/google/web-serial-polyfill directly to simulate Serial API, or a fork of this to implement the same workflow and more code sharing between eScan and the 250/MTR4 implementation.

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.