new SerialPort()
->navigator.serial.requestPort
SerialPort.list
->navigator.serial.getPorts
serialPort.open
->serialPort.open
serialPort.path
-> manually set after user gesture and user permission granted? I don't see it in the port info objectserialPort.close
->serialPort.close
serialPort.set
->serialPort.setControlSignals
serialPort.write
->serialPort.writeable.getWriter().write
serialPort.read
->serialPort.readable.getReader().read
serialPort.flush
->serialPort.flush
- error
- close
- open
Note: this list is not exhaustive of node serialport but these are the minimum requirements in order to bootstrap Avrgirl Arduino
- what should the default buffer size be for writing? Although in Avrgirl we can set this to the pageSize + amount of control bytes needed for opcodes
- should the browser serialport library shim be written in typescript? (probably)
- how are the pid and vid properties extracted? Assumption is that they're included in the properties of
getPorts
results though I don't see it in the fake mock that Reilly wrote - how can a static method be declared in an ES6 class declaration? I forget right now and I don't have internet for a week to look it up
- should a more modern interface of promises be an option for the library shim while remaining compatible with existing callback implementation?
- should the bundler be changed from browserify to webpack? graceful-fs would need to be swapped out for regular fs if so
- do the events all match up to equivalencies?
- perhaps the serialPort.path needs to be the id of the serial device instance? How do we reconnect after a reset of the device?