Cicode Programming Reference > Cicode Function Categories > Task Functions | Cicode

Task Functions

Task functions support advanced multi-tasking operations in Cicode, handling queues, semaphores, messages, and other process functions. The task functions control the transfer of data between different Cicode tasks and across the network to different computers (by remote procedure calls).

Following are functions relating to Tasks:

CodeSetMode

Sets the execution mode of a Cicode task.

EnterCriticalSection

Requests permission for the current thread to have access to a critical shared resource (critical section). If the critical section is already being accessed, the thread will be granted access when it is free.

Halt

Halts the current Cicode task.

LeaveCriticalSection

Relinquishes the current thread's ownership of a critical shared resource (critical section).

MsgBrdcst

Broadcasts a message.

MsgClose

Closes a message.

MsgGetCurr

Gets the handle of the message that called the current report or remote procedure.

MsgOpen

Opens a message session with a Citect SCADA server or client.

MsgRead

Reads a message from a session.

MsgRPC

Calls a remote procedure on another Citect SCADA computer.

MsgState

Verifies the status of a message session.

MsgWrite

Writes a message to a session.

QueClose

Closes a queue.

QueLength

Gets the current length of a queue.

QueOpen

Creates or opens a queue.

QuePeek

Searches a queue for a queue element.

QueRead

Reads elements from a queue.

QueWrite

Writes elements to a queue.

ReRead

ReRead is deprecated in this version.

SemClose

Closes a semaphore.

SemOpen

Creates or opens a semaphore.

SemSignal

Signals a semaphore.

SemWait

Waits on a semaphore.

ServerRPC

Calls a remote procedure on a Citect server.

Sleep

Suspends the current Cicode task for a specified time.

SleepMS

Suspends the current Cicode task for a specified time (in milliseconds).

TaskCall Calls a Cicode function by specifying the function name and providing an arguments string.

TaskCluster

Gets the name of the cluster context in which the current task is executing.

TaskGetSignal

Retrieves a value that indicates the stop signal for a specific task.

TaskHnd

Gets the handle of a particular task.

TaskKill

Kills a running task.

TaskNew

Creates a new task.

TaskNewEx

Creates a new task with a subscription rate.

TaskResume

Resumes a task.

TaskSetSignal

Ends a task by manually triggering its stop signal.

TaskSuspend

Suspends a task.

See Also

Published June 2018