OcaDeviceTimeManager¶
A online version of the AES70 specification of this class can be found at http://docs.deuso.de.
The class is a subclass of OcaManager()
.
This class defines the properties
Name |
JavaScript Type |
AES70 Type |
---|---|---|
TimeSources |
number[] |
OcaList<OcaONo> |
CurrentDeviceTimeSource |
number |
OcaONo |
Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, TimeSources, CurrentDeviceTimeSource and DeviceTimePTP.
-
class
OcaDeviceTimeManager
(objectNumber, device)¶ Manager that allows controlling and monitoring a device’s time-of-day clock, and that collects the device’s time source objects.
Must be instantiated once in every device that has more than one time source object. In this context, a “time source object” is an instance of OcaTimeSource or a subclass of it.
If instantiated, object number must be 10.
Note: The clock value is accessible via Get and Set methods, but has not been defined as a public property because its value is volatile and should not cause property-change events. The current value of the OcaTimeSource object designated by the CurrentDeviceTimeSource property of this Manager is known as the Device Time . The property TimeSources was added in version 2 of this class.
-
OcaDeviceTimeManager.
OnCurrentDeviceTimeSourceChanged
¶ type: PropertyEvent.<number>
This event is emitted when the property CurrentDeviceTimeSource changes in the remote object. The property
CurrentDeviceTimeSource
is described in the AES70 standard as follows. The current time source for this device’s device time, or zero if none.
-
OcaDeviceTimeManager.
OnTimeSourcesChanged
¶ type: PropertyEvent.<Array.<number>>
This event is emitted when the property TimeSources changes in the remote object. The property
TimeSources
is described in the AES70 standard as follows. The list of ONos of OcaTimeSource objects in this device
-
OcaDeviceTimeManager.
GetCurrentDeviceTimeSource
()¶ Retrieves ONo of current time source object, or zero if none. Return value indicates whether value was successfully retrieved.
- Returns
Promise.<number> – A promise which resolves to a single value of type
number
.
-
OcaDeviceTimeManager.
GetDeviceTimeNTP
()¶ Get current value of device time-of-day clock in NTP format. Return value indicates whether value was successfully retrieved. This method is _optional_ and _deprecated_ .
- Returns
Promise.<(number|BigInt)> – A promise which resolves to a single value of type
number|BigInt
.
-
OcaDeviceTimeManager.
GetDeviceTimePTP
()¶ Get current value of device time-of-day clock in PTP format. Return value indicates whether value was successfully retrieved.
- Returns
Promise.<OcaTimePTP> – A promise which resolves to a single value of type
OcaTimePTP()
.
-
OcaDeviceTimeManager.
GetTimeSources
()¶ Returns list of object numbers of OcaTimeSource instances in this device. Return value indicates whether list was successfully retrieved.
- Returns
Promise.<Array.<number>> – A promise which resolves to a single value of type
number[]
.
-
OcaDeviceTimeManager.
SetCurrentDeviceTimeSource
(TimeSourceONo)¶ Sets ONo of current time source object, or zero if none. Return value indicates whether value was successfully retrieved.
- Arguments
TimeSourceONo (number) –
- Returns
Promise.<void> –
-
OcaDeviceTimeManager.
SetDeviceTimeNTP
(DeviceTime)¶ Sets device time-of-day clock in NTP format. Return value indicates whether value was successfully set. Not available if a time source is identified in property CurrentDeviceTimeSource. This method is _optional_ and _deprecated_ .
- Arguments
DeviceTime (number|BigInt) –
- Returns
Promise.<void> –
-
OcaDeviceTimeManager.
SetDeviceTimePTP
(DeviceTime)¶ Sets device time-of-day clock in PTP format. Return value indicates whether value was successfully set. Not available if a time source is identified in property CurrentDeviceTimeSource.
- Arguments
DeviceTime (OcaTimePTP) –
- Returns
Promise.<void> –