Class: ECGDevice

ECGDevice

Provides methods and properties for accessing hardware on an external ECG (Ethernet to Can Gateway) product from ArcX.


Members


canEnabled :bool

Gets/sets whether CAN is enabled on the ECG device. If CAN is enabled, the serial ports on the device will not function.

Type:
  • bool
Since:
  • 0.1 (WAT 2.0)
See:

<readonly> connected :bool

Returns true when successfully connected.

Type:
  • bool
Since:
  • 0.1 (WAT 2.0)
See:

host :string

The hostname (e.g. IP address) of the ECG device that this object will connect to. This needs to be set before attempting to open.

Type:
  • string
Since:
  • 0.1 (WAT 2.0)
See:

<constant> serials :Array.<wat.SerialPort>

An array of the 2 serial ports on the device.

NOTE: The serial ports will not function if the CAN port on the ECG is configured.

Type:
Since:
  • 0.1 (WAT 2.0)

Methods


close()

Close the connection to the ECGDevice.

Since:
  • 0.1 (WAT 2.0)

open()

Attempts to open a connection to the ECG device.

Since:
  • 0.1 (WAT 2.0)
Returns:

Indicates if the open was successfully started.

Type
bool

reset()

Resets properties to the default value. Useful for resetting to a known state when re-configuring.

Since:
  • 0.1 (WAT 2.0)

Events


canEnabledChanged

Emitted when canEnabled changes.

Since:
  • 0.6 (WAT 2.4)

closed

Emitted when the connection to the device has been closed.

Since:
  • 0.1 (WAT 2.0)

connectedChanged

Emitted when a connection to the device has been closed or established.

Since:
  • 0.6 (WAT 2.4)

error

Emitted when the connection to the device detects an error condition.

Parameters:
Name Type Description
err string

Description of the error

Since:
  • 0.1 (WAT 2.0)

hostChanged

Emitted when host changes.

Since:
  • 0.6 (WAT 2.4)

opened

Emitted when a connection to the device has been established.

Since:
  • 0.1 (WAT 2.0)