Class: SS

SS

Provides methods for creating and destroying connections to a sensorsoft sensor via a serial port.


Example
var ss = $wat.load('ss')[0];

Methods


createDevice(port [, name])

Create a new instance of a sensorsoft.SSDevice using the supplied serial port.

The object created will be cleaned up automatically, but only when the page reloads. If these objects are re-created without reloading the page, then they must be deleted using deleteDevice, otherwise a memory leak will occur.

Parameters:
Name Type Argument Default Description
port wat.SerialPort

The serial port to use for communications.

name string <optional>
""

If specified, the object returned will also be accessible as a property of this object, with the same name as the new device.

Since:
  • 0.1 (WAT 1.2)
Returns:
Type
sensorsoft.SSDevice

deleteDevice(dev)

Delete a previously created device.

Parameters:
Name Type Description
dev sensorsoft.SSDevice

The device to delete.

Since:
  • 0.1 (WAT 1.2)