Index

Class OcaTaskManager

ClassID: 1.3.11

extends OcaManager

Optional manager that collects OcaTask and OcaProgram objects. Tasks shall be device execution threads that start, execute, and (normally) stop. The action of an OcaTask is defined by an OcaProgram. The idea is that OcaTasks shall execute OcaPrograms. OcaTaskManager offers global control over tasks in the device. Tasks may be stopped by: passing the OcaTaskManager a Stop or Abort command, which will stop designated tasks in the device;.

Properties

static readonly OcaClassID ClassID = 1.3.11

Level: 1 Index: 1

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.

static readonly OcaClassVersionNumber ClassVersion = 1

Level: 1 Index: 2

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.

OcaTaskManagerState State

Level: 3 Index: 1

Current state of task processing. State is Disabled after a Disable command has been received, Enabled otherwise.

OcaMap<OcaTaskID,OcaTask> Tasks

Level: 3 Index: 2

Task collection

Properties inherited from OcaRoot

readonly OcaONo ObjectNumber

readonly OcaBoolean Lockable

readonly OcaString Role

Methods

OcaTaskManager::Enable ( OcaBoolean Enable )

Level: 3 Index: 1

Enables (parameter =TRUE) or disables (parameter = FALSE) the running of tasks. Changes value of property State from Disabled to Enabled and vice versa. All tasks running when Enable is called with parameter = FALSE are immediately aborted.

OcaTaskManager::ControlAllTasks ( OcaTaskCommand Command, OcaBlob ApplicationTaskParameter )

Level: 3 Index: 2

Controls all tasks in device. Return value indicates whether tasks were successfully controlled.

OcaTaskManager::ControlTaskGroup ( OcaTaskGroupID GroupID, OcaTaskCommand Command, OcaBlob ApplicationTaskParameter )

Level: 3 Index: 3

Controls all tasks in the given group. Return value indicates whether tasks were successfully controlled.

OcaTaskManager::ControlTask ( OcaTaskID TaskID, OcaTaskCommand Command, OcaBlob ApplicationTaskParameter )

Level: 3 Index: 4

Controls a specified task. Return value indicates whether tasks were successfully controlled.

OcaTaskManager::GetState ( ) → ( OcaTaskManagerState State)

Level: 3 Index: 5

Gets value of property State. Return value indicates whether value was successfully retrieved.

OcaTaskManager::GetTaskStatuses ( ) → ( OcaTaskStatus Statuses)

Level: 3 Index: 6

OcaTaskManager::GetTaskStatus ( OcaTaskID TaskID ) → ( OcaTaskStatus Status)

Level: 3 Index: 7

OcaTaskManager::AddTask ( OcaTask Task ) → ( OcaTask Task_)

Level: 3 Index: 8

Creates a Task. Parameters of the new Task are given in the Task parameter; device returns the same parameter with the new Task ID filled in. Initial task state is set to Disabled. Return value indicates whether Task was successfully created.

OcaTaskManager::GetTasks ( ) → ( OcaMap<OcaTaskID,OcaTask> Tasks)

Level: 3 Index: 9

Gets map of Tasks in the device. Return value indicates whether map was successfully retrieved.

OcaTaskManager::GetTask ( OcaTaskID ID ) → ( OcaTask Task)

Level: 3 Index: 10

Retrieves a Task. Return value indicates whether Task was successfully retrieved.

OcaTaskManager::SetTask ( OcaTaskID ID, OcaTask Task )

Level: 3 Index: 11

Updates a Task. Return value indicates whether Task was successfully updated.

OcaTaskManager::DeleteTask ( OcaTaskID ID )

Level: 3 Index: 12

Deletes a task. Return value indicates whether task was successfully deleted. Method fails with status=ProcessingFailed if task is running.

Methods inherited from OcaRoot

OcaRoot::GetClassIdentification ( ) → ( OcaClassIdentification ClassIdentification)

OcaRoot::GetLockable ( ) → ( OcaBoolean lockable)

OcaRoot::LockTotal ( )

OcaRoot::Unlock ( )

OcaRoot::GetRole ( ) → ( OcaString Role)

OcaRoot::LockReadonly ( )

Events

Event TaskStateChanged