0.2.419 • Published 6 years ago

ds-cctalk v0.2.419

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

(deprecated) moved ds-cctalk

CCTalk Node.js Implamentation Classes

Importent

Please don't use this the active Maintained version is https://github.com/direktspeed/node-cctalk

npm i node-cctalk
const cc = require('ds-cctalk')

// Use
cc.device() // Register / Create a Device
cc.bus() // Open a new Connection gets used by device if not defined befor
cc.command() // gets used by bus and device for the sendCommand and sendCommandRaw prototypes
// running this file as main
if(!module.parent) {

  var usbBus =  new CCBus('/dev/ttyUSB0');

  var cd = new require(usbBus, { dest: 2, timeout: 1000 });

  cd.on('error', function(e) {
    debug('emp800::')(e);
  });

  cd.on('ready', function() {
    try {
      debug('emp800::')('ready');
      cd.enableAcceptance();
      cd.setAcceptanceMask(0xFFFF);
      // Example sendCommand for usage see CCTalk Spec for more information
      // cd.sendCommand({ src: 1, dest: 2, command: 231, data: new Uint8Array(0) });
      cd.on('error', function(e) { debug('emp800::')('error', e); });
      cd.on('accepted', function(c) {
        debug('emp800::')('Accepted', c);
        cd.getCoinName(c).then(function(name) { debug('emp800::')(name); });
      });
      cd.on('inhibited', function(c) {
        debug('emp800::')('Inhibited', c);
        cd.getCoinName(c).then(function(name) { debug('emp800::')(name); });
      });
      cd.on('rejected', function(c) { debug('emp800::')('Rejected', c); });
    } catch(e) {
      debug('emp800::')(e, e.stack);
    }
  });


}

If You need help implamenting this feel free to asks Wenn Sie Hilfe brauchen bei der Implementierung fragen Sie ruhig

0.2.419

6 years ago

0.2.418

6 years ago

0.2.417

8 years ago

0.2.416

8 years ago

0.2.415

8 years ago

0.2.414

8 years ago

0.2.413

8 years ago

0.2.412

8 years ago

0.2.411

8 years ago

0.2.410

8 years ago

0.2.39

8 years ago

0.2.38

8 years ago

0.2.37

8 years ago

0.2.36

8 years ago

0.2.35

8 years ago

0.2.34

8 years ago

0.2.33

8 years ago

0.2.32

8 years ago

0.2.31

8 years ago

0.2.30

8 years ago

0.2.29

8 years ago

0.2.28

8 years ago

0.2.27

8 years ago

0.2.26

8 years ago

0.2.25

8 years ago

0.2.24

8 years ago

0.2.23

8 years ago

0.2.22

8 years ago

0.2.21

8 years ago

0.2.20

8 years ago

0.2.19

8 years ago

0.2.18

8 years ago

0.2.17

8 years ago

0.2.16

8 years ago

0.2.15

8 years ago

0.2.14

8 years ago

0.2.13

8 years ago

0.2.12

8 years ago

0.2.11

8 years ago

0.2.10

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.28

8 years ago

0.1.27

8 years ago

0.1.26

8 years ago

0.1.25

8 years ago

0.1.24

8 years ago

0.1.23

8 years ago

0.1.22

8 years ago

0.1.21

8 years ago

0.1.20

8 years ago

0.1.19

8 years ago

0.1.18

8 years ago

0.1.17

8 years ago

0.1.16

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago