MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / constructor

Method constructor

modules/io/firmata/firmataclient.js:629–640  ·  view source on GitHub ↗
(dictionary, firmata)

Source from the content-addressed store, hash-verified

627 #firmata;
628 #state;
629 constructor(dictionary, firmata) {
630 this.#firmata = firmata;
631 this.#state = {
632 target: this,
633 onReadable: dictionary.onReadable,
634 address: dictionary.address,
635 received: [],
636 }
637
638 firmata.i2cReaders.push(this.#state);
639 firmata.doI2CConfig();
640 }
641 close() {
642 firmata.i2cReaders.splice(firmata.i2cReaders.indexOf(this.#state), 1);
643

Callers

nothing calls this directly

Calls 2

doI2CConfigMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected