C.1 Control Interface of Kernel

The control interface of the kernel is a set of messages that can be sent by a application process to the kernel. Most of these messages change the state of the whole kernel. We recommend to read section Process Priorities and States for information on the states of kernel. These messages are received by the collector layer of the parent process (PRIORITY_COLLECTOR). Only message STATE evokes the kernel's answer. The answer is the same message containing the state of the kernel. This message is intended as the only feedback for the application process. Not valid messages are ignored.

The control interface consists of these messages:

CONNECT
comment: Message enables a service connection i.e. it gives the kernel the PID of process responsible for the service. In this version we have two services: MS_ERROR for error reporting and MS_TEXT for journal text messages. These symbols corresponds with the special tags of messages sent after error/journal log performed in the kernel. See Kernel Data Interface for more information on these services.
tag: MT_ICONTROL
special tag: MS_ICONTROL_CONNECT
body: service ID (int)

DISCONNECT
comment: Disables service connection (see CONNECT).
tag: MT_ICONTROL
special tag: MT_ICONTROL_DISCONNECT
body: service ID (int)

STATE
comment: The only message in the control interface that evokes the kernel's answer. If this message is a request sent to the kernel, then its body is void. The answer is also message STATE, but its body contains the state of the kernel. The possible states are {KS_READY,KS_INITIALIZED,KS_RUNNING,KS_PAUSED,KS_STOPPED, KS_ERROR}. See Process Priorities and States for more information on states of the kernel.
tag: MT_ICONTROL
special tag: MT_ICONTROL_STATE
body: void / state (int)

INIT
comment: Starts the kernel initialisation procedure. Changes the state of the kernel to KS_INITIALIZED. See Kernel Initialization Procedure for more information.
tag: MT_ICONTROL
special tag: MS_ICONTROL_INIT
body: length of name of parameter file (int), name of parameter file (C string)

START
comment: Starts the computation of the genetic algorithm. Changes the state of the kernel to KS_RUNNING.
tag: MT_ICONTROL
special tag: MS_ICONTROL_START
body: void

PAUSE
comment: Pauses the computation of the genetic algorithm or continues previously paused computation. Changes the state of the kernel to KS_PAUSED or KS_RUNNING.
tag: MT_ICONTROL
special tag: MS_ICONTROL_PAUSE
body: void

STOP
comment: Stops the computation of the genetic algorithm. Changes the state of the kernel to KS_STOPPED.
tag: MT_ICONTROL
special tag: MS_ICONTROL_STOP
body: void

ABORT
comment: Aborts the computation of the genetic algorithm. Changes the state of the kernel to KS_ABORTED.
tag: MT_ICONTROL
special tag: MS_ICONTROL_ABORT
body: void

PARAMCHANGE
comment: Updates the whole paramfile object of parent process and all child processes specified by an array of PIDs. If length of this array is -1, then this message updates paramfile object in all child processes.
tag: MT_ICONTROL
special tag: MS_ICONTROL_PARAMCHANGE
body: length of array (int), array of PIDs array of PIDs (int[]), length of name (int), name of parameter file (C string)

ONEPARAMCHANGE
comment: Updates the value of a single parameter in paramfile object of parent process and all child processes specified by an array of PIDs. If length of this array is -1, then this message updates parameter in all child processes.
tag: MT_ICONTROL
special tag: MS_ICONTROL_ONEPARAMCHANGE
body: length of array (int), array of PIDs array of PIDs (int[]), length array (int), name of parameter (C string), length array (int), value of parameter (C string)

Programmer's Guide Project Antares