import { IOcaIODirection } from '../../types/OcaIODirection.js'; import { OcaPort } from '../../types/OcaPort.js'; import { IOcaPortClockMapEntry, OcaPortClockMapEntry, } from '../../types/OcaPortClockMapEntry.js'; import { IOcaPortID, OcaPortID } from '../../types/OcaPortID.js'; import { Arguments } from '../arguments.js'; import { PropertyEvent } from '../property_event.js'; import { RemoteDevice } from '../remote_device.js'; import { OcaRoot } from './OcaRoot.js'; /** * Abstract base class for classes that represent the device's application and * support functions. * @extends OcaRoot * @class OcaWorker */ export declare class OcaWorker extends OcaRoot { /** * This event is emitted whenever Enabled changes. */ OnEnabledChanged: PropertyEvent; /** * This event is emitted whenever Ports changes. */ OnPortsChanged: PropertyEvent; /** * This event is emitted whenever Label changes. */ OnLabelChanged: PropertyEvent; /** * This event is emitted whenever Latency changes. */ OnLatencyChanged: PropertyEvent; /** * This event is emitted whenever PortClockMap changes. */ OnPortClockMapChanged: PropertyEvent>; constructor(objectNumber: number, device: RemoteDevice); /** * Gets the value of the Enabled property. * * @method OcaWorker#GetEnabled * @returns {Promise} * A promise which resolves to a single value of type ``boolean``. */ GetEnabled(): Promise; /** * Sets the value of the Enabled property. * * @method OcaWorker#SetEnabled * @param {boolean} enabled * * @returns {Promise} */ SetEnabled(enabled: boolean): Promise; /** * Adds an input or output port.. * * @method OcaWorker#AddPort * @param {string} Name * @param {IOcaIODirection} Mode * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPortID`. */ AddPort(Name: string, Mode: IOcaIODirection): Promise; /** * Deletes an input or output port.. * * @method OcaWorker#DeletePort * @param {IOcaPortID} ID * * @returns {Promise} */ DeletePort(ID: IOcaPortID): Promise; /** * Gets the list of ports owned by the Worker object. * * @method OcaWorker#GetPorts * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPort[]`. */ GetPorts(): Promise; /** * Gets the name of the designated port. * * @method OcaWorker#GetPortName * @param {IOcaPortID} PortID * * @returns {Promise} * A promise which resolves to a single value of type ``string``. */ GetPortName(PortID: IOcaPortID): Promise; /** * Sets the name of the designated port. * * @method OcaWorker#SetPortName * @param {IOcaPortID} ID * @param {string} Name * * @returns {Promise} */ SetPortName(ID: IOcaPortID, Name: string): Promise; /** * Gets the value of the Label property. * * @method OcaWorker#GetLabel * @returns {Promise} * A promise which resolves to a single value of type ``string``. */ GetLabel(): Promise; /** * Sets the value of the Label property. * * @method OcaWorker#SetLabel * @param {string} label * * @returns {Promise} */ SetLabel(label: string): Promise; /** * Gets the value of the Owner property. * * @method OcaWorker#GetOwner * @returns {Promise} * A promise which resolves to a single value of type ``number``. */ GetOwner(): Promise; /** * Gets the value of the Latency property. * * @method OcaWorker#GetLatency * @returns {Promise} * A promise which resolves to a single value of type ``number``. */ GetLatency(): Promise; /** * Sets the value of the Latency property. * * @method OcaWorker#SetLatency * @param {number} latency * * @returns {Promise} */ SetLatency(latency: number): Promise; /** * Returns Role Path and ONo Path from the Root Block to this object. The * return value indicates whether the operation succeeded. * The return values of this method are * * - RolePath of type ``string[]`` * - ONoPath of type ``number[]`` * * @method OcaWorker#GetPath * @returns {Promise>} */ GetPath(): Promise>; /** * Gets the value of the PortClockMap property. * * @method OcaWorker#GetPortClockMap * @returns {Promise>} * A promise which resolves to a single value of type ``Map``. */ GetPortClockMap(): Promise>; /** * Sets the value of the PortClockMap property. * * @method OcaWorker#SetPortClockMap * @param {Map} Map * * @returns {Promise} */ SetPortClockMap(Map: Map): Promise; /** * Gets the value of the PortClockMap entry identified by the given PortID. * * @method OcaWorker#GetPortClockMapEntry * @param {IOcaPortID} ID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPortClockMapEntry`. */ GetPortClockMapEntry(ID: IOcaPortID): Promise; /** * Sets an entry in the PortClockMap property. Adds entry if none already * exists for the given port; replaces entry if it does already exist. * * @method OcaWorker#SetPortClockMapEntry * @param {IOcaPortID} PortID * @param {IOcaPortClockMapEntry} Entry * * @returns {Promise} */ SetPortClockMapEntry( PortID: IOcaPortID, Entry: IOcaPortClockMapEntry ): Promise; /** * Deletes PortClockMap entry identified by the given ID. * * @method OcaWorker#DeletePortClockMapEntry * @param {IOcaPortID} ID * * @returns {Promise} */ DeletePortClockMapEntry(ID: IOcaPortID): Promise; }