GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-1 > itc / linux-gcc
#include "PBS/TASK.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "MSG/MSG_pubdefs.h"
Classes | |
struct | _ITC_Configuration_bf |
Structure to hold per task configuration information. More... | |
union | _ITC_Configuration |
Union of per task configuration information. More... | |
struct | _ITC_CommandCount |
Structure to hold per task command count information. More... | |
struct | _ITC_CommandItem |
Structure to define a command item in a command list. More... | |
struct | _ITC_CommandList |
Structure to define a list of command definitions. More... | |
struct | _ITC_ApidDef |
Structure to define a member of the APID list. More... | |
Defines | |
#define | ITC_L_NODES (8) |
Maximum number of nodes supported. | |
#define | ITC_L_ALLCPUS (6) |
Number of "intelligent" nodes (including spacecraft). | |
#define | ITC_L_LATCPUS (5) |
Number of "intelligent" nodes (not including spacecraft). | |
#define | ITC_K_APPS ( 0) |
Base of application task numbers. | |
#define | ITC_K_LITES (22) |
Base of lightweight task numbers. | |
#define | ITC_K_SVCS (24) |
Base of service task numbers. | |
#define | ITC_L_APPS (22) |
Number of application tasks (maximum). | |
#define | ITC_L_LITES ( 2) |
Number of lightweight tasks (maximum). | |
#define | ITC_L_SVCS ( 8) |
Number of service tasks (maximum). | |
#define | ITC_L_TASKS (ITC_L_APPS + ITC_L_LITES + ITC_L_SVCS) |
Total number of tasks. | |
#define | ITC_K_USERQS (1) |
Base of user queues numbers. | |
#define | ITC_L_USERQS (6) |
Length of user queue numbers. | |
#define | ITC_L_QUEUES (8) |
Maximum number of queues supported per task. | |
#define | ITC_K_DISPS (1) |
Base of dispatch protocol range. | |
#define | ITC_L_DISPS (3) |
Length of dispatch protocol range. | |
#define | ITC_K_PROTS (2) |
Base of hardware protocol range. | |
#define | ITC_L_PROTS (2) |
Length of hardware protocol range. | |
#define | ITC_L_LEVELS (3) |
Maximum number of response levels. | |
#define | ITC_L_CLASSES (2) |
Maximum number of command classes. | |
#define | ITC_L_ACTIONS (2) |
Maximum number of actions a task can perform on a command. | |
Typedefs | |
typedef struct _ITC_Queue | ITC_Queue |
Typedef/forward reference for struct _ITC_Queue. | |
typedef struct _ITC_QueueItem | ITC_QueueItem |
Typedef for struct _ITC_QueueItem. | |
typedef struct _ITC_Task | ITC_Task |
Typedef/forward reference for struct _ITC_Task. | |
typedef enum _ITC_NodeID | ITC_NodeID |
Typedef for enum _ITC_NodeID. | |
typedef enum _ITC_NodeMask | ITC_NodeMask |
Typedef for enum _ITC_NodeMask. | |
typedef enum _ITC_TaskID | ITC_TaskID |
Typedef for enum _ITC_TaskID. | |
typedef enum _ITC_QueueID | ITC_QueueID |
Typedef for enum _ITC_QueueID. | |
typedef enum _ITC_QueueMask | ITC_QueueMask |
Typedef for enum _ITC_QueueMask. | |
typedef enum _ITC_DispID | ITC_DispID |
Typedef for enum _ITC_DispID. | |
typedef enum _ITC_ProtID | ITC_ProtID |
Typedef for enum _ITC_ProtID. | |
typedef enum _ITC_CmdLevel | ITC_CmdLevel |
Typedef for enum _ITC_CmdLevel. | |
typedef enum _ITC_CmdClass | ITC_CmdClass |
Typedef for enum _ITC_CmdClass. | |
typedef enum _ITC_CmdAction | ITC_CmdAction |
Typedef for enum _ITC_CmdAction. | |
typedef void | ITC_cb_Completion (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
Signature for an ITC processing completion routine (often a "free"). | |
typedef void * | ITC_cb_Memory (void *prm, unsigned int siz, ITC_cb_Completion **rtn, void **cb0, void **cb1, void **cb2) |
Signature for an ITC memory allocation routine. | |
typedef unsigned int | ITC_cb_Processor (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len) |
Signature for an ITC packet processing routine. | |
typedef void | ITC_cb_Meta (void *prm) |
Signature for a user routine called during start/stop operations. | |
typedef struct _ITC_Configuration_bf | ITC_Configuration_bf |
Typedef for union _ITC_Configuration_bf. | |
typedef union _ITC_Configuration | ITC_Configuration |
Typedef for union _ITC_Configuration. | |
typedef struct _ITC_CommandCount | ITC_CommandCount |
Typedef for struct _ITC_CommandCount. | |
typedef struct _ITC_CommandItem | ITC_CommandItem |
Typedef for struct _ITC_CommandItem. | |
typedef struct _ITC_CommandList | ITC_CommandList |
Typedef for struct _ITC_CommandList. | |
typedef struct _ITC_ApidDef | ITC_ApidDef |
Typedef for struct _ITC_ApidDef. | |
Enumerations | |
enum | _ITC_NodeID { ITC_NID_NONE = -1, ITC_NID_SIU = 0, ITC_NID_EPU0 = 1, ITC_NID_EPU1 = 2, ITC_NID_EPU2 = 3, ITC_NID_EPU3 = 4, ITC_NID_SC = 5, ITC_NID_SDI = 6, ITC_NID_BCST = 7 } |
Enumeration of ITC nodes. More... | |
enum | _ITC_NodeMask { ITC_NIM_SIU = (1 << ITC_NID_SIU ), ITC_NIM_EPU0 = (1 << ITC_NID_EPU0 ), ITC_NIM_EPU1 = (1 << ITC_NID_EPU1 ), ITC_NIM_EPU2 = (1 << ITC_NID_EPU2 ), ITC_NIM_EPU3 = (1 << ITC_NID_EPU3 ), ITC_NIM_SC = (1 << ITC_NID_SC ), ITC_NIM_SDI = (1 << ITC_NID_SDI ), ITC_NIM_BCST = (1 << ITC_NID_BCST ) } |
enum | _ITC_TaskID { ITC_TID_NONE = -1, ITC_TID_ANON = 0, ITC_TID_LCM = CPU_DB_TID_LCM, ITC_TID_LFS = CPU_DB_TID_LFS, ITC_TID_LFS_M = CPU_DB_TID_LFS_M, ITC_TID_LFS_S = CPU_DB_TID_LFS_S, ITC_TID_LHK_M = CPU_DB_TID_LHK_M, ITC_TID_LIM = CPU_DB_TID_LIM, ITC_TID_LIM_M = CPU_DB_TID_LIM_M, ITC_TID_LIM_S = CPU_DB_TID_LIM_S, ITC_TID_LSM_M = CPU_DB_TID_LSM_M, ITC_TID_LSM_S = CPU_DB_TID_LSM_S, ITC_TID_LSW = CPU_DB_TID_LSW, ITC_TID_LCI = CPU_DB_TID_LCI, ITC_TID_LCI_M = CPU_DB_TID_LCI_M, ITC_TID_LCI_S = CPU_DB_TID_LCI_S, ITC_TID_LMC = CPU_DB_TID_LMC, ITC_TID_LPA_M = CPU_DB_TID_LPA_M, ITC_TID_LPA_S = CPU_DB_TID_LPA_S, ITC_TID_LRA = CPU_DB_TID_LRA, ITC_TID_LTC = CPU_DB_TID_LTC, ITC_TID_GRB = CPU_DB_TID_GRB, ITC_TID_LIH = CPU_DB_TID_LIH, ITC_LID_CRXC = CPU_DB_TID_CRXC, ITC_LID_CRXT = CPU_DB_TID_CRXT, ITC_SID_LTX1 = CPU_DB_TID_LTX1, ITC_SID_LTX0 = CPU_DB_TID_LTX0, ITC_SID_LRXR = CPU_DB_TID_LRXR, ITC_SID_LRXE = CPU_DB_TID_LRXE, ITC_SID_LRXN = CPU_DB_TID_LRXN, ITC_SID_CTX = CPU_DB_TID_CTX, ITC_SID_STX = CPU_DB_TID_STX, ITC_SID_BCST = CPU_DB_TID_BCST } |
Enumeration of task identifiers. More... | |
enum | _ITC_QueueID { ITC_QID_NONE = -1, ITC_QID_METAHI = 0, ITC_QID_SYNC = 1, ITC_QID_CMD_X = 2, ITC_QID_CMD = 3, ITC_QID_CTL_X = 4, ITC_QID_CTL = 5, ITC_QID_BULK = 6, ITC_QID_METALO = 7 } |
Enumeration of queue identifiers. More... | |
enum | _ITC_QueueMask { ITC_QIM_METAHI = (1 << ITC_QID_METAHI ), ITC_QIM_SYNC = (1 << ITC_QID_SYNC ), ITC_QIM_CMD_X = (1 << ITC_QID_CMD_X ), ITC_QIM_CMD = (1 << ITC_QID_CMD ), ITC_QIM_CTL_X = (1 << ITC_QID_CTL_X ), ITC_QIM_CTL = (1 << ITC_QID_CTL ), ITC_QIM_BULK = (1 << ITC_QID_BULK ), ITC_QIM_METALO = (1 << ITC_QID_METALO ), ITC_QIM_USER } |
Enumeration of nodes as elements in a mask. More... | |
enum | _ITC_DispID { ITC_DID_NONE = -1, ITC_DID_RAW = 1, ITC_DID_CMD = 2, ITC_DID_APID = 3 } |
Enumeration of dispatch protocols. More... | |
enum | _ITC_ProtID { ITC_PID_NONE = -1, ITC_PID_NOACK = 2, ITC_PID_ACK = 3 } |
Enumeration of hardware protocols (across LCB fabric). More... | |
enum | _ITC_CmdLevel { ITC_LVL_UNKNOWN = -1, ITC_LVL_ALL = 0, ITC_LVL_ERROR = 1, ITC_LVL_NONE = 2 } |
Enumeration of states for spacecraft command acknowledgement. More... | |
enum | _ITC_CmdClass { ITC_CMD_NORMAL = 0, ITC_CMD_BROADCAST = 1 } |
Enumeration of spacecraft command classes. More... | |
enum | _ITC_CmdAction { ITC_ACT_EXECUTE = 0, ITC_ACT_FORWARD = 1 } |
Enumeration of task action types (in response to spacecraft command). More... | |
Functions | |
unsigned int | ITC_addQueue (ITC_Task *task, ITC_QueueID qid) |
Add a queue to a task. | |
unsigned int | ITC_attachApid (ITC_Task *task, ITC_QueueID qid, const ITC_ApidDef *def, void *prm) |
Attach an APID definition to a queue. | |
unsigned int | ITC_attachCmdConfirm (ITC_Task *task, ITC_cb_Memory *rtn, void *prm) |
Attach a command confirmation memory allocator to a task. | |
unsigned int | ITC_attachCommand (ITC_Task *task, ITC_QueueID qid, const ITC_CommandList *lst, void *prm) |
Attach a command list to a queue (only one per queue). | |
unsigned int | ITC_attachMemory (ITC_Task *task, ITC_QueueID qid, ITC_cb_Memory *rtn, void *prm) |
Attach a memory manager description to a queue. | |
unsigned int | ITC_attachRaw (ITC_Task *task, ITC_QueueID qid, ITC_cb_Processor *rtn, void *prm) |
Attach a raw processor to a queue (only one per queue). | |
unsigned int | ITC_bind (ITC_QueueItem *qitem, void *qipay, unsigned int qilen, ITC_NodeID dnid, ITC_TaskID dtid, ITC_QueueID dqid, ITC_DispID did, ITC_ProtID pid, ITC_cb_Completion *rtn, void *prm0, void *prm1, void *prm2) |
Bind a queue item descriptor. | |
void | ITC_complete (const ITC_QueueItem *qitem, unsigned int status) |
Call back the user provided completion routine (often a free). | |
unsigned int | ITC_convertTaskLite (ITC_Task *task) |
Convert a task to a lightweight ITC task. | |
unsigned int | ITC_copyCounts (void *dst, ITC_TaskID tid) |
Copy a command counts block to the provided destination. | |
unsigned int | ITC_createTask (ITC_Task **task, ITC_TaskID tid) |
Create a task level container for queues. | |
unsigned int | ITC_deleteTask (ITC_Task *task) |
Delete a task container. | |
unsigned int | ITC_detachApid (const ITC_ApidDef *def) |
Detach an APID definition from a queue. | |
unsigned int | ITC_detachCmdConfirm (ITC_Task *task) |
Detach a command confirmation memory allocator from a task. | |
unsigned int | ITC_detachCommand (ITC_Task *task, ITC_QueueID qid) |
Detach a command list from a queue. | |
unsigned int | ITC_detachMemory (ITC_Task *task, ITC_QueueID qid) |
Detach a memory control description from a queue. | |
unsigned int | ITC_detachRaw (ITC_Task *task, ITC_QueueID qid) |
Detach a raw processor from a queue. | |
unsigned int | ITC_disableQueues (unsigned int iqm) |
Disable a set of ITC queues. | |
unsigned int | ITC_enableQueues (unsigned int iqm) |
Enable a set of ITC queues. | |
unsigned int | ITC_forward (const ITC_QueueItem *qitem, ITC_NodeID dnid, ITC_TaskID dtid, ITC_QueueID dqid, ITC_DispID did, ITC_ProtID pid) |
Forward a queue item to another destination. | |
ITC_NodeID | ITC_getNodeID (void) |
Return the node ID of the current node. | |
ITC_DispID | ITC_getPacketDispID (const ITC_QueueItem *qitem) |
Return ITC dispatch protocol for given queue item. | |
ITC_NodeID | ITC_getPacketDstNodeID (const ITC_QueueItem *qitem) |
Return destination node ID for given queue item. | |
ITC_QueueID | ITC_getPacketDstQueueID (const ITC_QueueItem *qitem) |
Return destination queue ID for given queue item. | |
ITC_TaskID | ITC_getPacketDstTaskID (const ITC_QueueItem *qitem) |
Return destination task ID for given queue item. | |
unsigned int | ITC_getPacketLen (const ITC_QueueItem *qitem) |
Return payload length for queue item. | |
void * | ITC_getPacketPay (const ITC_QueueItem *qitem) |
Return pointer to packet payload for queue item. | |
ITC_ProtID | ITC_getPacketProtID (const ITC_QueueItem *qitem) |
Return ITC hardware protocol for given queue item. | |
ITC_NodeID | ITC_getPacketSrcNodeID (const ITC_QueueItem *qitem) |
Return source node ID for given queue item. | |
ITC_TaskID | ITC_getPacketSrcTaskID (const ITC_QueueItem *qitem) |
Return source task ID for given queue item. | |
ITC_QueueID | ITC_getQueueID (ITC_Queue *queue) |
Return queue ID for given queue. | |
ITC_Task * | ITC_getTaskHandle (ITC_TaskID tid) |
Return the task handle for a given task ID. | |
ITC_TaskID | ITC_getTaskID (void) |
Return task ID of current task. | |
unsigned int | ITC_initialize (ITC_NodeID nid) |
Initialize the ITC control block. | |
unsigned int | ITC_removeQueue (ITC_Task *task, ITC_QueueID qid) |
Remove a queue from a task. | |
unsigned int | ITC_reportConfiguration (ITC_Configuration *cfg) |
Generate a configuration report. | |
unsigned int | ITC_revertTaskLite (ITC_Task *task) |
Revert a lightweight ITC task to a regular task. | |
void | ITC_rollback (const ITC_QueueItem *qitem, unsigned int status) |
Call back the user provided completion routine (often a free). | |
unsigned int | ITC_send (ITC_QueueItem *qitem) |
Send a queue item to a destination queue. | |
unsigned int | ITC_setCmdConfirm (ITC_TaskID tid, ITC_CmdClass scb, ITC_CmdAction fwd, ITC_CmdLevel new, ITC_CmdLevel *old) |
Set the command confirmation level for a task. | |
unsigned int | ITC_setMsgResponse (ITC_TaskID tid, MSG_Level new) |
Set the message response level of a task. | |
unsigned int | ITC_setNodeID (ITC_NodeID new) |
Set the node ID of the current node. | |
ITC_ProtID | ITC_setPacketProtID (ITC_QueueItem *qitem, ITC_ProtID pid) |
Set the source task ID for the given queue item. | |
unsigned int | ITC_sizeofCounts (void) |
Return size of a command counting structure. | |
unsigned int | ITC_sizeofQueueItem (void) |
return the size of a queue item header (bytes) | |
unsigned int | ITC_startTask (ITC_Task *task, const TASK_attr *attr, ITC_cb_Meta *rtn, void *prm) |
Fork the specified ITC task (non-blocking version). | |
unsigned int | ITC_startTaskW (ITC_Task *task, const TASK_attr *attr, ITC_cb_Meta *rtn, void *prm) |
Fork the specified ITC task (blocking version). | |
unsigned int | ITC_stopTask (ITC_Task *task, ITC_cb_Meta *rtn, void *prm) |
Stop an ITC task. | |
unsigned int | ITC_shutdown (void) |
Shut down the ITC system. |
CVS $Id: ITC_pubdefs.h,v 1.27 2007/10/28 19:35:42 apw Exp $
enum _ITC_CmdAction |
enum _ITC_CmdClass |
enum _ITC_CmdLevel |
enum _ITC_DispID |
enum _ITC_NodeID |
enum _ITC_NodeMask |
enum _ITC_ProtID |
enum _ITC_QueueID |
Enumeration of queue identifiers.
enum _ITC_QueueMask |
Enumeration of nodes as elements in a mask.
Enumeration of queues as elements in a mask.
enum _ITC_TaskID |
Enumeration of task identifiers.
unsigned int ITC_addQueue | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Add a queue to a task.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUITC | Queue ID reserved for ITC | |
ITC_QUEUINIT | Queue initialization failed | |
ITC_QUEUSTAT | Queue not in state undefined | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_attachApid | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
const ITC_ApidDef * | def, | |||
void * | prm | |||
) |
Attach an APID definition to a queue.
task | (in) Task handle | |
qid | (in) Queue ID | |
def | (in) APID definition | |
prm | (in) User context parameter (per APID) |
ITC_ALOCFAIL | Cannot allocate for an ITC_Apid object | |
ITC_APIDDBL | Table entry for this APID already in use | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_attachCmdConfirm | ( | ITC_Task * | task, | |
ITC_cb_Memory * | rtn, | |||
void * | prm | |||
) |
Attach a command confirmation memory allocator to a task.
task | (in) Task handle | |
rtn | (in) Memory allocation routine | |
prm | (in) Memory allocation routine parameter |
ITC_CNFRTNAT | Command confirmation memory allocator already attached | |
ITC_CTLSTAT | Control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Task not in state initialized | |
ITC_SUCCESS | Success | |
ITC_VARNULL | NULL variable (pointer) detected |
Any (ITC compliant) memory manager will do, but this memory manager application has the characteristics of "single write/single reader" with all deallocations being done in the exact order of allocations. In other words it's tailor made for a ring buffer. If a ring buffer is used (better yet, a managed ring buffer as provided in the IMM package), a buffer size of 1 kByte with a 256 byte overflow area should suffice (most command confirmations are of order 110-120 bytes (minimum 98, maximum 150), so this is sufficient buffering to hold ~8 command confirmations.
unsigned int ITC_attachCommand | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
const ITC_CommandList * | lst, | |||
void * | prm | |||
) |
Attach a command list to a queue (only one per queue).
task | (in) Task handle | |
qid | (in) Queue ID | |
lst | (in) A command list | |
prm | (in) User context parameter (per command list) |
ITC_CMDDBL | Command entry for this queue alrady in use | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_attachMemory | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
ITC_cb_Memory * | rtn, | |||
void * | prm | |||
) |
Attach a memory manager description to a queue.
task | (in) Task handle | |
qid | (in) Queue ID | |
rtn | (in) Memory allocation routine | |
prm | (in) Memory allocation routine parameter |
ITC_ALOCFAIL | Cannot allocate for an ITC_Apid object | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_MEMDBL | Memory control description block already attached | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_attachRaw | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
ITC_cb_Processor * | rtn, | |||
void * | prm | |||
) |
Attach a raw processor to a queue (only one per queue).
task | (in) Task handle | |
qid | (in) Queue ID | |
rtn | (in) Callback for raw packets | |
prm | (in) User context parameter (per raw processor) |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_RAWDBL | Raw protocol handler for this queue already defined | |
ITC_RAWRTN | Cannot specify a NULL routine | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_bind | ( | ITC_QueueItem * | qitem, | |
void * | qipay, | |||
unsigned int | qilen, | |||
ITC_NodeID | dnid, | |||
ITC_TaskID | dtid, | |||
ITC_QueueID | dqid, | |||
ITC_DispID | did, | |||
ITC_ProtID | pid, | |||
ITC_cb_Completion * | rtn, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2 | |||
) |
Bind a queue item descriptor.
qitem | (in) Queue item descriptor | |
qipay | (in) Location of buffer to be queued | |
qilen | (in) Length of buffer to be queued (bytes) | |
dnid | (in) Destination node ID | |
dtid | (in) Destination task ID | |
dqid | (in) Destination queue ID | |
did | (in) Dispatch protocol ID | |
pid | (in) Hardware protocol ID | |
rtn | (in) Completion routine | |
prm0 | (in) Completion routine user parameter 0 | |
prm1 | (in) Completion routine user parameter 1 | |
prm2 | (in) Completion routine user parameter 2 |
ITC_SUCCESS | Success | |
ITC_VARNULL | NULL variable (pointer) detected | |
ITC_VARRNG | Out of range variable detected |
void ITC_complete | ( | const ITC_QueueItem * | qitem, | |
unsigned int | status | |||
) |
Call back the user provided completion routine (often a free).
qitem | (in) Queue item | |
status | (in) Completion status |
unsigned int ITC_convertTaskLite | ( | ITC_Task * | task | ) |
Convert a task to a lightweight ITC task.
task | (in) Task handle |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Invalid task handle | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned int ITC_copyCounts | ( | void * | dst, | |
ITC_TaskID | tid | |||
) |
Copy a command counts block to the provided destination.
dst | (in) Destination of copy | |
tid | (in) Task for which to copy counts |
ITC_SUCCESS | S Success | |
ITC_VARRNG | E Out of range variable detected |
unsigned int ITC_createTask | ( | ITC_Task ** | task, | |
ITC_TaskID | tid | |||
) |
Create a task level container for queues.
task | (out) Task handle (pass to other task configuration routines) | |
tid | (in) Task ID (taken from preassigned application list) |
ITC_ALOCFAIL | Cannot allocate an ITC_Task object | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKQUEU | Cannot create task queues | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_deleteTask | ( | ITC_Task * | task | ) |
Delete a task container.
task | (in) Task handle |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKMISS | Task not in task table | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned int ITC_detachApid | ( | const ITC_ApidDef * | def | ) |
Detach an APID definition from a queue.
def | (in) APID definition |
ITC_APIDNONE | APID command table not attached to a queue | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Invalid task handle | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned int ITC_detachCmdConfirm | ( | ITC_Task * | task | ) |
Detach a command confirmation memory allocator from a task.
task | (in) Task handle |
ITC_CNFRTNDE | No command confirmation memory allocator exists to detach | |
ITC_CTLSTAT | Control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Task not in state initialized |
unsigned int ITC_detachCommand | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Detach a command list from a queue.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_CMDNONE | No command table attached to the queue | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_detachMemory | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Detach a memory control description from a queue.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_MEMNONE | No memory descriptor defined for this task/queue | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_detachRaw | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Detach a raw processor from a queue.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_RAWNONE | No raw protocol handler defined for this queue | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUSTAT | Queue not in state initialized | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_disableQueues | ( | unsigned int | iqm | ) |
Disable a set of ITC queues.
iqm | (in) ITC queue mask (or of members of ITC_QIM_xxx) |
FORK_C_CONTINUE | Continue fork | |
~FORK_C_CONTINUE | Shut down fork |
unsigned int ITC_enableQueues | ( | unsigned int | iqm | ) |
Enable a set of ITC queues.
iqm | (in) ITC queue mask (or of members of ITC_QIM_xxx) |
FORK_C_CONTINUE | Continue fork | |
~FORK_C_CONTINUE | Shut down fork |
unsigned int ITC_forward | ( | const ITC_QueueItem * | qitem, | |
ITC_NodeID | dnid, | |||
ITC_TaskID | dtid, | |||
ITC_QueueID | dqid, | |||
ITC_DispID | did, | |||
ITC_ProtID | pid | |||
) |
Forward a queue item to another destination.
qitem | (in) Queue item descriptor | |
dnid | (in) Destination node ID | |
dtid | (in) Destination task ID | |
dqid | (in) Destination queue ID | |
did | (in) Dispatch protocol ID | |
pid | (in) Hardware protocol ID |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started | |
ITC_SUCCESS | Success | |
ITC_VARNULL | NULL variable (pointer) detected | |
ITC_VARRNG | Out of range variable detected |
ITC_NodeID ITC_getNodeID | ( | void | ) |
Return the node ID of the current node.
ITC_NID_NONE | Node ID not known (not yet initialized) | |
ITC_NID_SIU | Node SIU | |
ITC_NID_EPU0 | Node EPU 0 | |
ITC_NID_EPU1 | Node EPU 1 | |
ITC_NID_EPU2 | Node EPU 2 | |
ITC_NID_EPU3 | Node EPU 3 | |
ITC_NID_SC | Node SC (spacecraft) |
ITC_DispID ITC_getPacketDispID | ( | const ITC_QueueItem * | qitem | ) |
Return ITC dispatch protocol for given queue item.
qitem | (in) Queue item pointer |
x | Dispatch protocol (ITC_DID_NONE on error) |
ITC_NodeID ITC_getPacketDstNodeID | ( | const ITC_QueueItem * | qitem | ) |
Return destination node ID for given queue item.
qitem | (in) Queue item pointer |
x | Node ID (ITC_NID_NONE on error) |
ITC_QueueID ITC_getPacketDstQueueID | ( | const ITC_QueueItem * | qitem | ) |
Return destination queue ID for given queue item.
qitem | (in) Queue item pointer |
x | Queue ID (ITC_QID_NONE on error) |
ITC_TaskID ITC_getPacketDstTaskID | ( | const ITC_QueueItem * | qitem | ) |
Return destination task ID for given queue item.
qitem | (in) Queue item pointer |
x | Task ID (ITC_TID_NONE on error) |
unsigned int ITC_getPacketLen | ( | const ITC_QueueItem * | qitem | ) |
Return payload length for queue item.
qitem | (in) Queue item |
0 | Packet length exactly zero (unlikely), or NULL queue item pointer | |
x | Packet length |
void* ITC_getPacketPay | ( | const ITC_QueueItem * | qitem | ) |
Return pointer to packet payload for queue item.
qitem | (in) Queue item |
NULL | Queue item is NULL | |
x | Pointer to packet payload |
ITC_ProtID ITC_getPacketProtID | ( | const ITC_QueueItem * | qitem | ) |
Return ITC hardware protocol for given queue item.
qitem | (in) Queue item pointer |
x | Hardware protocol (ITC_PID_NONE on error) |
ITC_NodeID ITC_getPacketSrcNodeID | ( | const ITC_QueueItem * | qitem | ) |
Return source node ID for given queue item.
qitem | (in) Queue item pointer |
x | Node ID (ITC_NID_NONE on error) |
ITC_TaskID ITC_getPacketSrcTaskID | ( | const ITC_QueueItem * | qitem | ) |
Return source task ID for given queue item.
qitem | (in) Queue item pointer |
x | Task ID (ITC_TID_NONE on error) |
ITC_QueueID ITC_getQueueID | ( | ITC_Queue * | queue | ) |
Return queue ID for given queue.
queue | (in) Queue pointer |
x | Queue ID (ITC_QID_NONE on error) |
ITC_Task* ITC_getTaskHandle | ( | ITC_TaskID | tid | ) |
Return the task handle for a given task ID.
NULL | tid out or range or task not created | |
x | Task handle |
ITC_TaskID ITC_getTaskID | ( | void | ) |
Return task ID of current task.
x | Task ID (ITC_TID_NONE if not an ITC task or at interrupt level) |
unsigned int ITC_initialize | ( | ITC_NodeID | deprecated | ) |
Initialize the ITC control block.
deprecated | Parameter no longer used ... it is ignored |
ITC_ALOCFAIL | Memory allocation failure | |
ITC_CTLSTAT | ITC control block not in state uninitialized | |
ITC_MUALOCFL | Cannot allocate a mutex | |
ITC_TYPENID | Cannot identify the type of node (SIU, EPU, SC) | |
ITC_SUCCESS | Success |
unsigned int ITC_removeQueue | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Remove a queue from a task.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_ALOCLIVE | Memory allocator for this queue is still live | |
ITC_ALOCOUT | Memory allocations still outstanding for this queue | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_QUEUITC | Queue ID reserved for ITC | |
ITC_QUEUMISS | No entry in queue table for this task/queue | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_reportConfiguration | ( | ITC_Configuration * | cfg | ) |
Generate a configuration report.
cfg | (in) Pointer to array of configuration records |
unsigned int ITC_revertTaskLite | ( | ITC_Task * | task | ) |
Revert a lightweight ITC task to a regular task.
task | (in) Task handle |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Invalid task handle | |
ITC_TASKSTAT | Invalid task state for this operation |
void ITC_rollback | ( | const ITC_QueueItem * | qitem, | |
unsigned int | status | |||
) |
Call back the user provided completion routine (often a free).
qitem | (in) Queue item | |
status | (in) Completion status |
unsigned int ITC_send | ( | ITC_QueueItem * | qitem | ) |
Send a queue item to a destination queue.
qitem | (in) Queue item descriptor |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started | |
ITC_SUCCESS | Success | |
ITC_VARNULL | NULL variable (pointer) detected |
unsigned int ITC_setCmdConfirm | ( | ITC_TaskID | tid, | |
ITC_CmdClass | scb, | |||
ITC_CmdAction | fwd, | |||
ITC_CmdLevel | new, | |||
ITC_CmdLevel * | old | |||
) |
Set the command confirmation level for a task.
tid | (in) Task ID | |
scb | (in) Spacecraft broadcast APID flag | |
fwd | (in) Task acting as forwarding agent flag | |
new | (in) New command confirmation level | |
old | (in) Old command confirmation level (pointer can be NULL) |
ITC_SUCCESS | S Success | |
ITC_TASKMISS | E No entry in task table for task | |
ITC_TASKPTR | E Task pointer check failed | |
ITC_VARRNG | E Out of range variable detected |
scb
). The second element of the matrix is whether the task is acting as a forwarding agent (parameter fwd
). Thus the call ITC_setCmdReponse( tid, ITC_CMD_NORMAL, ITC_ACT_FORWARD, ITC_LVL_ERROR, &old );
would mean "for task tid
, set the command confirmation level to ITC_LVL_ERROR
when forwarding non-broadcast spacecraft commands".
unsigned int ITC_setMsgResponse | ( | ITC_TaskID | tid, | |
MSG_Level | new | |||
) |
Set the message response level of a task.
tid | (in) Task ID | |
new | (in) New task response level |
ITC_SUCCESS | S Success | |
ITC_TASKMISS | E No entry in task table for task | |
ITC_TASKPTR | E Task pointer check failed | |
ITC_VARRNG | E Out of range variable detected |
unsigned int ITC_setNodeID | ( | ITC_NodeID | new | ) |
Set the node ID of the current node.
new | (in) New ITC node ID |
ITC_NOTEPUID | Requested node ID is not an EPU node ID | |
ITC_NOTEPUND | Current node is not type EPU | |
ITC_NOTINIT | ITC uninitialized | |
ITC_SUCCESS | Success |
ITC_ProtID ITC_setPacketProtID | ( | ITC_QueueItem * | qitem, | |
ITC_ProtID | pid | |||
) |
Set the source task ID for the given queue item.
qitem | (in) Queue item pointer | |
pid | (in) ITC hardare protocol ID |
x | Previous value of hardware protocol ID (ITC_PID_NONE on error) |
unsigned int ITC_shutdown | ( | void | ) |
Shut down the ITC system.
ITC_CTLACTIV | ITC control block still managing >0 tasks | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC system not initialized | |
ITC_SUCCESS | Success |
unsigned int ITC_sizeofCounts | ( | void | ) |
Return size of a command counting structure.
Size | of command counting structure |
unsigned int ITC_sizeofQueueItem | ( | void | ) |
return the size of a queue item header (bytes)
ITC_sizeofQueueItem()returns the size of a queue item header (in bytes).
unsigned int ITC_startTask | ( | ITC_Task * | task, | |
const TASK_attr * | attr, | |||
ITC_cb_Meta * | rtn, | |||
void * | prm | |||
) |
Fork the specified ITC task (non-blocking version).
task | (in) Task handle | |
attr | (in) Task attributes (can be NULL) | |
rtn | (in) User's task start routine (can be NULL) | |
prm | (in) User's task start routine parameter |
ITC_ALOCFAIL | Cannot allocate for fork control block | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_FORKINIT | Fork initialization failed | |
ITC_FORKQHND | Cannot recover all fork queue handles (obscure) | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKINIT | Cannot set up task intialization | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned int ITC_startTaskW | ( | ITC_Task * | task, | |
const TASK_attr * | attr, | |||
ITC_cb_Meta * | rtn, | |||
void * | prm | |||
) |
Fork the specified ITC task (blocking version).
task | (in) Task handle | |
attr | (in) Task attributes (can be NULL) | |
rtn | (in) User's task start routine (can be NULL) | |
prm | (in) User's task start routine parameter |
ITC_ALOCFAIL | Cannot allocate for fork control block | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_FORKINIT | Fork initialization failed | |
ITC_FORKQHND | Cannot recover all fork queue handles (obscure) | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKINIT | Cannot set up task intialization | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned int ITC_stopTask | ( | ITC_Task * | task, | |
ITC_cb_Meta * | rtn, | |||
void * | prm | |||
) |
Stop an ITC task.
task | (in) Task handle | |
rtn | (in) User's task stop routine (can be NULL) | |
prm | (in) User's task stop routine parameter |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_SUCCESS | Success | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation |