GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-2 > itc / sun-gcc
#include <PBS/FORK.h>
#include <PBS/MTX.h>
#include <PBS/PL.h>
#include <PBS/RW.ih>
#include <PBS/SEM.h>
#include <PBS/WCT.h>
#include <ITC/ITC_apidefs.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
Classes | |
struct | _ITC_TaskConfirm |
Structure to hold ITC per task command confirmation information. More... | |
struct | _ITC_QueueItem |
Structure to hold an ITC queue item descriptor. More... | |
struct | _ITC_Fork |
Message structure that can be queued to a fork. More... | |
struct | _ITC_Task |
Structure to hold ITC per task information. More... | |
struct | _ITC_Queue |
Structure to hold ITC per queue information. More... | |
struct | _ITC_Apid |
Structure to hold ITC per command APID information. More... | |
struct | _ITC_Control |
Structure to hold the ITC control block. More... | |
Defines | |
#define | ITC_L_APIDS (ITC_L_APID_CMDRX + ITC_L_APID_BCST) |
#define | ITC_L_TSK_TYPES (3) |
Number of task types. | |
#define | ITC_L_TSK_STATES (7) |
Number of control states. | |
#define | ITC_L_CTL_STATES (2) |
Number of control states. | |
Typedefs | |
typedef enum _ITC_TaskType | ITC_TaskType |
Typedef for enum _ITC_TaskType. | |
typedef enum _ITC_TaskState | ITC_TaskState |
Typedef for enum _ITC_TaskState. | |
typedef enum _ITC_ControlState | ITC_ControlState |
Typedef for enum _ITC_ControlState. | |
typedef struct _ITC_TaskConfirm | ITC_TaskConfirm |
Typedef for struct _ITC_TaskConfirm. | |
typedef struct _ITC_Fork | ITC_Fork |
Typedef for struct _ITC_Fork. | |
typedef struct _ITC_Apid | ITC_Apid |
Typedef for struct _ITC_Apid. | |
typedef struct _ITC_Control | ITC_Control |
Typedef for struct _ITC_Control. | |
Enumerations | |
enum | _ITC_TaskType { ITC_TSK_TYP_SVC = 0, ITC_TSK_TYP_APP = 1, ITC_TSK_TYP_LITE = 2 } |
Enumeration of task types. More... | |
enum | _ITC_TaskState { ITC_TSK_UNINITIALIZED = 0, ITC_TSK_INITIALIZED = 1, ITC_TSK_STARTING = 2, ITC_TSK_STARTED = 3, ITC_TSK_STOPSYNC = 4, ITC_TSK_STOPPING = 5, ITC_TSK_CONVERTED = 6 } |
Enumeration of states a task can be in. More... | |
enum | _ITC_ControlState { ITC_CTL_UNINITIALIZED = 0, ITC_CTL_INITIALIZED = 1 } |
Enumeration of states the control block can be in. More... | |
Functions | |
FORK_cb_status | ITC_dispatch (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
The heart of ITC task level dispatching. | |
unsigned int | ITC_dispatchApp (void *prm, const ITC_QueueItem *qitem, void *qipay, unsigned int qilen) |
Find a command in a list of commands indexed by function code. | |
FORK_cb_status | ITC_isTaskDrained (ITC_Task *task) |
Determine if a task has drained all its activities. | |
FORK_cb_status | ITC_startMeta (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a request to start an ITC task. | |
FORK_cb_status | ITC_stopMeta (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a request to stop an ITC task. | |
Variables | |
ITC_Control * | ITC_icb |
Control block for the inter-task communications system. | |
ITC_Task * | ITC_tpl [ITC_L_TASKS] |
Application/service/lightweight task pointer list. | |
ITC_Queue * | ITC_qpl [ITC_L_TASKS][ITC_L_QUEUES] |
Queue pointer list. | |
ITC_Apid * | ITC_apl [ITC_L_APIDS] |
APID pointer list. | |
const char * | ITC_ctl_states [ITC_L_CTL_STATES] |
String constants for ITC control block states. | |
const char * | ITC_tsk_states [ITC_L_TSK_STATES] |
String constants for ITC task control block states. |
CVS $Id: ITC_prvdefs.h,v 1.13 2011/03/25 21:01:11 apw Exp $
enum _ITC_ControlState |
enum _ITC_TaskState |
Enumeration of states a task can be in.
enum _ITC_TaskType |
FORK_cb_status ITC_dispatch | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
The heart of ITC task level dispatching.
prm | (in) User context parameter | |
msg | (in) Message buffer |
FORK_C_CONTINUE | Continue fork | |
~FORK_C_CONTINUE | Shut down fork |
References _ITC_Queue::cnt, _ITC_Queue::dspPrm, _ITC_Queue::dspRtn, ITC_complete(), ITC_copyCmdConfirm(), ITC_icb, ITC_isTaskDrained(), ITC_NID_SC, ITC_sendCmdConfirm(), ITC_tpl, ITC_TSK_STOPPING, _ITC_QueueItem::itcp, _ITC_QueueItem::len, _ITC_Control::nid, _ITC_QueueItem::pay, _ITC_Control::rwi, _ITC_Task::state, and _ITC_Queue::tid.
Referenced by startTask().
unsigned int ITC_dispatchApp | ( | void * | prm, | |
const ITC_QueueItem * | qitem, | |||
void * | qipay, | |||
unsigned int | qilen | |||
) |
Find a command in a list of commands indexed by function code.
prm | (in) User parameter | |
qitem | (in) Queue item | |
qipay | (in) Queue item payload pointer | |
qilen | (in) Queue item payload length |
NULL | Failure | |
x | Address of routine |
References _ITC_Queue::bad, _ITC_Queue::cmdLst, _ITC_Queue::cmdPrm, findProcessor(), ITC_apl, ITC_DID_APID, ITC_DID_CMD, ITC_DID_RAW, ITC_K_DISPS, ITC_L_DISPS, _ITC_QueueItem::itcp, _ITC_QueueItem::pay, _ITC_Apid::prm, _ITC_Queue::qid, _ITC_Queue::rawPrm, _ITC_Queue::rawRtn, _ITC_Queue::rcv, _ITC_Queue::tid, and validApidRx().
Referenced by createQueues(), and ITC_revertDispatch().
FORK_cb_status ITC_isTaskDrained | ( | ITC_Task * | task | ) |
Determine if a task has drained all its activities.
task | (in) ITC task handle |
FORK_C_CONTINUE | Continue fork | |
~FORK_C_CONTINUE | Shut down fork |
References _ITC_Queue::cnt, ITC_L_QUEUES, ITC_qpl, _ITC_Task::mskdis, _ITC_Task::stopPrm, _ITC_Task::stopRtn, _ITC_Task::tbd, and _ITC_Task::tid.
Referenced by ableQueues(), ITC_dispatch(), and ITC_stopMeta().
unsigned int ITC_startMeta | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
Process a request to start an ITC task.
prm | (in) User context parameter | |
msg | (in) Message buffer |
ITC_SUCCESS | Success |
References ITC_TSK_STARTED, _ITC_Fork::prm0, _ITC_Fork::prm1, _ITC_Task::sem, _ITC_Task::state, _ITC_Fork::task, and _ITC_Task::tbd.
Referenced by startTask().
unsigned int ITC_stopMeta | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
Process a request to stop an ITC task.
prm | (in) User context parameter | |
msg | (in) Message buffer |
ITC_SUCCESS | Success |
References ITC_isTaskDrained(), ITC_TSK_STOPPING, _ITC_Fork::prm0, _ITC_Fork::prm1, _ITC_Task::state, _ITC_Task::stopPrm, _ITC_Task::stopRtn, and _ITC_Fork::task.
Referenced by ITC_stopTask().
APID pointer list.
A mapping table to go from APID/function code to task/queue/callback. This is global, so care must be taken when writing elements of this table that the code is properly protected.
Referenced by ITC_attachApid(), ITC_deleteTask(), ITC_detachApid(), ITC_dispatchApp(), ITC_mapApid2Queue(), ITC_redirectApid(), and ITC_removeQueue().
Control block for the inter-task communications system.
Control block for the inter-task communications system. This is global, so care must be taken when writing elements of this block that the code is properly protected.
Referenced by checkState(), ITC_addQueue(), ITC_allocFromQueue(), ITC_attachApid(), ITC_attachCmdConfirm(), ITC_attachCommand(), ITC_attachMemory(), ITC_attachRaw(), ITC_bind(), ITC_convertDispatch(), ITC_convertFork(), ITC_convertTaskLite(), ITC_createTask(), ITC_deleteTask(), ITC_detachApid(), ITC_detachCmdConfirm(), ITC_detachCommand(), ITC_detachMemory(), ITC_detachRaw(), ITC_dispatch(), ITC_getNodeID(), ITC_mapDst2Queue(), ITC_redirectApid(), ITC_removeQueue(), ITC_reportConfiguration(), ITC_revertDispatch(), ITC_revertTaskLite(), ITC_send(), ITC_sendCmdConfirm(), ITC_setCmdConfirm(), ITC_setMsgResponse(), ITC_setNodeID(), ITC_stopTask(), and startTask().
Queue pointer list.
Per queue control block for the inter-task communications system. These are global, so care must be taken when writing elements of these blocks that the code is properly protected.
Referenced by ableQueues(), createQueues(), deleteQueues(), ITC_addQueue(), ITC_attachApid(), ITC_attachCommand(), ITC_attachMemory(), ITC_attachRaw(), ITC_convertDispatch(), ITC_convertFork(), ITC_deleteTask(), ITC_detachCommand(), ITC_detachMemory(), ITC_detachRaw(), ITC_getForkQueueHandle(), ITC_isTaskDrained(), ITC_mapApid2Queue(), ITC_mapDst2Queue(), ITC_removeQueue(), ITC_revertDispatch(), ITC_send(), ITC_stopTask(), and startTask().
Application/service/lightweight task pointer list.
Per task control block for the inter-task communications system. These are global, so care must be taken when writing elements of these blocks that the code is properly protected.
Referenced by ableQueues(), ITC_copyCounts(), ITC_createTask(), ITC_deleteTask(), ITC_detachApid(), ITC_dispatch(), ITC_getForkQueueHandle(), ITC_getTaskHandle(), ITC_redirectApid(), ITC_reportConfiguration(), ITC_send(), ITC_setCmdConfirm(), and ITC_setMsgResponse().