import { IOcaTime, OcaTime } from '../../types/OcaTime.js'; import { PropertyEvent } from '../property_event.js'; import { RemoteDevice } from '../remote_device.js'; import { OcaManager } from './OcaManager.js'; /** * 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 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. * * - May be instantiated at most once in any device. * * - 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. * @extends OcaManager * @class OcaDeviceTimeManager */ export declare class OcaDeviceTimeManager extends OcaManager { /** * This event is emitted whenever TimeSources changes. */ OnTimeSourcesChanged: PropertyEvent; /** * This event is emitted whenever CurrentDeviceTimeSource changes. */ OnCurrentDeviceTimeSourceChanged: PropertyEvent; constructor(objectNumber: number, device: RemoteDevice); /** * Get current value of device time-of-day clock in NTP format. **Deprecated** * in version 3 of this class. * * @method OcaDeviceTimeManager#GetDeviceTimeNTP * @returns {Promise} * A promise which resolves to a single value of type ``number|BigInt``. */ GetDeviceTimeNTP(): Promise; /** * Sets device time-of-day clock in NTP format. Not available if a time source * is identified in property CurrentDeviceTimeSource. **Deprecated** in * version 3 of this class. * * @method OcaDeviceTimeManager#SetDeviceTimeNTP * @param {number|BigInt} DeviceTime * * @returns {Promise} */ SetDeviceTimeNTP(DeviceTime: number | BigInt): Promise; /** * Gets the list of object numbers of OcaTimeSource instances in this device. * * @method OcaDeviceTimeManager#GetTimeSources * @returns {Promise} * A promise which resolves to a single value of type ``number[]``. */ GetTimeSources(): Promise; /** * Retrieves **ONo** of current time source object, or zero if none. * * @method OcaDeviceTimeManager#GetCurrentDeviceTimeSource * @returns {Promise} * A promise which resolves to a single value of type ``number``. */ GetCurrentDeviceTimeSource(): Promise; /** * Sets **ONo** of current time source object, or zero if none. * * @method OcaDeviceTimeManager#SetCurrentDeviceTimeSource * @param {number} TimeSourceONo * * @returns {Promise} */ SetCurrentDeviceTimeSource(TimeSourceONo: number): Promise; /** * Get current value of device time-of-day clock. * * @method OcaDeviceTimeManager#GetDeviceTime * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaTime`. */ GetDeviceTime(): Promise; /** * Get current value of device time-of-day clock. * An alias for GetDeviceTime. * * @method OcaDeviceTimeManager#GetDeviceTimePTP * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaTime`. */ GetDeviceTimePTP(): Promise; /** * Sets device time-of-day clock Not available if a time source is identified * in property **CurrentDeviceTimeSource**. * * @method OcaDeviceTimeManager#SetDeviceTime * @param {IOcaTime} DeviceTime * * @returns {Promise} */ SetDeviceTime(DeviceTime: IOcaTime): Promise; /** * Sets device time-of-day clock Not available if a time source is identified * in property **CurrentDeviceTimeSource**. * An alias for SetDeviceTime. * * @method OcaDeviceTimeManager#SetDeviceTimePTP * @param {IOcaTime} DeviceTime * * @returns {Promise} */ SetDeviceTimePTP(DeviceTime: IOcaTime): Promise; }