1.2.13 OcaTaskScheduler

Class Hierarchy:

OcaRoot : OcaAgent : OcaTaskScheduler

class OcaTaskScheduler : OcaAgent

Optional scheduler for scheduling tasks to run programs and commandsets in the future.

Properties:

static const OcaClassID ClassID = "1.2.13"

Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the OcaRoot property.

This property has id 1.1.

static const OcaClassVersionNumber ClassVersion = 1

Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the OcaRoot property.

This property has id 1.2.

OcaList<OcaJobQueueItem> JobQueue

List of queued jobs. Items are added to the queue by the AddJob() method, and removed from the queue when they have run to completion, or by the DeleteJob() or ClearJobQueue() methods.

This property has id 3.3.

OcaTaskSchedulerState State

See OcaTaskSchedulerState for state values and their semantics.

This property has id 3.1.

OcaList<OcaONo> TaskAgents

List of ONos of OcaTaskAgent objects. Readonly; updated automatically when OcaTaskAgent objects are created or deleted.

This property has id 3.2.

Properties inherited from 1.2 OcaAgent:

Methods:

OcaStatus ActionStart()

Changes state to Running.

This method has id 3.1.

OcaStatus ActionStop()

Changes state to Stopped.

This method has id 3.2.

OcaStatus ActionPause()

Changes state to Paused.

This method has id 3.3.

OcaStatus ActionDrain()

Changes state to Draining.

This method has id 3.4.

OcaStatus GetState(OcaTaskSchedulerState &State)

Gets the scheduler’s state.

This method has id 3.5.

  • State: Output parameter.

OcaStatus GetTaskAgents(OcaList<OcaONo> &ONos)

Gets the list of all OcaTaskAgent ONos.

This method has id 3.6.

  • ONos: Output parameter.

OcaStatus GetJobQueue(OcaList<OcaJobQueueItem> &Queue)

Gets the job queue.

This method has id 3.7.

  • Queue: Output parameter.

OcaStatus GetJob(OcaID32 ID, OcaJobQueueItem &Item)

Gets a jobqueue item, given its ID.

This method has id 3.8.

  • ID: Input parameter.

  • Item: Output parameter.

OcaStatus SetJob(OcaID32 ID, OcaJobQueueItem Item)

Replaces a job queue item, given its ID. If given ID references a nonexistent job queue item, method shall return status value ParameterOutOfRange.

This method has id 3.9.

  • ID: Input parameter.

  • Item: Input parameter.

OcaStatus AddJob(OcaJobQueueItem Item, OcaID32 &ID)

Adds a job queue item, returns its ID.

This method has id 3.10.

  • Item: Input parameter.

  • ID: Output parameter.

OcaStatus DeleteJob(OcaID32 ID)

Deletes a job queue item given its ID.

This method has id 3.11.

  • ID: Input parameter.

OcaStatus ClearJobQueue()

Deletes all job queue items.

This method has id 3.12.

Methods inherited from 1.2 OcaAgent:

Events:

void JobDisposed(OcaJobDisposedEventData EventData)

Event raised when a job queue item is removed from the queue, either because it has fulfilled its purpose or because it has been explicitly deleted by the DeleteJob() or ClearJobQueue() method.

This event has id 3.1.