Class: Device

Device

new Device(id, version, label, type, node_id, senders, receivers)

Describes a Device. Immutable value.
Parameters:
Name Type Description
id String Globally unique UUID identifier for the Device.
version string String formatted PTP timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed.
label string Freeform string label for the Device.
type string Device type URN.
node_id string Globally unique UUID identifier for the Node which initially created the Device.
senders Array.<string> UUIDs of Senders attached to the Device.
receivers Array.<string> UUIDs of Receivers attached to the Device
Source:

Extends

Members

(readonly) id :string

Globally unique UUID identifier for the resource.
Type:
  • string
Overrides:
Source:

(readonly) label :string

Freeform string label for the resource.
Type:
  • string
Overrides:
Source:

(readonly) node_id :string

Globally unique UUID identifier for the Node which initially created the Device.
Type:
  • string
Source:

(readonly) receivers :Array.<string>

UUIDs of Receivers attached to the Device.
Type:
  • Array.<string>
Source:

(readonly) senders :Array.<string>

UUIDs of Senders attached to the Device.
Type:
  • Array.<string>
Source:

(readonly) type :string

Type:
  • string
Source:

(readonly) version :string

String formatted PTP timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed.
Type:
  • string
Overrides:
Source:

Methods

generateID(idopt) → {string}

Generate an identifier when one is not provided, otherwise pass this one through. No validation takes place.
Parameters:
Name Type Attributes Description
id string <optional>
Identifier to pass through.
Overrides:
Source:
Returns:
Value passed to the method or a generated pseudo-random UUID for no arguments, null or undefined.
Type
string

generateLabel(labelopt) → {string}

Generate a label when one is not provided, otherwise pass the given one through. No validation takes place.
Parameters:
Name Type Attributes Description
label string <optional>
Label to pass through.
Overrides:
Source:
Returns:
Value passed to the method or an empty string for no arguments, null or undefined.
Type
string

generateVersion(versionopt) → {string}

Generate a version number when one is not provided, otherwise pass the given one through. No validation takes place.
Parameters:
Name Type Attributes Description
version string <optional>
Version number to pass through.
Overrides:
Source:
Returns:
Value passed to the method or a generated version number from the current clock with no arguments, null or undefined.
Type
string

valid() → {boolean}

Checks that all the properties of this resource are valid. The is a syntactic check and does not check semantics such as references to other objects can be checked. Valid includes:
  • Required properties are defined and not null.
  • Identifiers a valid UUIDs.
  • Enumerations are known values and/or match expected patterns.
  • Values are of the expected type.
Overrides:
Source:
Returns:
Is the resource valid?
Type
boolean