GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > ITC / V3-1-0

Constituent: itc     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

ITC_pubdefs.h File Reference

Public definitions for the ITC package. More...

#include "PBS/TASK.h"
#include "MSG/MSG_pubdefs.h"

Include dependency graph for ITC_pubdefs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _ITC_ApidDef
 Structure to define a member of the APID list. 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...


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 _ITC_Queue ITC_Queue
 Typedef/forward reference for struct _ITC_Queue.

typedef _ITC_QueueItem ITC_QueueItem
 Typedef for struct _ITC_QueueItem.

typedef _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)
 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 _ITC_CommandCount ITC_CommandCount
 Typedef for struct _ITC_CommandCount.

typedef _ITC_CommandItem ITC_CommandItem
 Typedef for struct _ITC_CommandItem.

typedef _ITC_CommandList ITC_CommandList
 Typedef for struct _ITC_CommandList.

typedef _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 = 1,
  ITC_TID_LFS_M = 2,
  ITC_TID_LFS_S = 3,
  ITC_TID_LHK_M = 4,
  ITC_TID_LHK_S = 5,
  ITC_TID_LIM_M = 6,
  ITC_TID_LIM_S = 7,
  ITC_TID_LSM_M = 8,
  ITC_TID_LSM_S = 9,
  ITC_TID_LSW_M = 10,
  ITC_TID_LSW_S = 11,
  ITC_TID_LCI_M = 12,
  ITC_TID_LCI_S = 13,
  ITC_TID_ICT = 20,
  ITC_LID_CRXC = 22,
  ITC_LID_CRXT = 23,
  ITC_SID_LRX = 24,
  ITC_SID_LTX0 = 25,
  ITC_SID_LTX1 = 26,
  ITC_SID_LTX2 = 27,
  ITC_SID_LTX3 = 28,
  ITC_SID_CTX = 29,
  ITC_SID_STX = 30,
  ITC_SID_BCST = 31
}
 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 queues 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_TaskITC_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_revertTaskLite (ITC_Task *task)
 Revert a lightweight ITC task to a regular task.

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.

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.


Detailed Description

Public definitions for the ITC package.

CVS $Id: ITC_pubdefs.h,v 1.16 2005/05/03 20:14:21 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

enum _ITC_CmdAction
 

Enumeration of task action types (in response to spacecraft command).

Enumeration values:
ITC_ACT_EXECUTE  Execute command
ITC_ACT_FORWARD  Forward command

enum _ITC_CmdClass
 

Enumeration of spacecraft command classes.

Enumeration values:
ITC_CMD_NORMAL  Normal command (not broadcast)
ITC_CMD_BROADCAST  Broadcast command

enum _ITC_CmdLevel
 

Enumeration of states for spacecraft command acknowledgement.

Enumeration values:
ITC_LVL_UNKNOWN  Guard value
ITC_LVL_ALL  Respond to all commands
ITC_LVL_ERROR  Respond to errored commands
ITC_LVL_NONE  Respond to -no- commands

enum _ITC_DispID
 

Enumeration of dispatch protocols.

Enumeration values:
ITC_DID_NONE  Guard value
ITC_DID_RAW  Raw packets dispatch
ITC_DID_CMD  Command dispatch
ITC_DID_APID  APID dispatch

enum _ITC_NodeID
 

Enumeration of ITC nodes.

Enumeration values:
ITC_NID_NONE  Guard value
ITC_NID_SIU  SIU
ITC_NID_EPU0  EPU 0
ITC_NID_EPU1  EPU 1
ITC_NID_EPU2  EPU 2
ITC_NID_EPU3  EPU 3 (or SIU-EXT if you prefer)
ITC_NID_SC  Spacecraft
ITC_NID_SDI  Science data interface
ITC_NID_BCST  CPU broadcast

enum _ITC_NodeMask
 

Enumeration values:
ITC_NIM_SIU  SIU node (as mask)
ITC_NIM_EPU0  EPU 0 node (as mask)
ITC_NIM_EPU1  EPU 1 node (as mask)
ITC_NIM_EPU2  EPU 2 node (as mask)
ITC_NIM_EPU3  EPU 3 node (as mask)
ITC_NIM_SC  Spacecraft node (as mask)
ITC_NIM_SDI  Science data node (as mask)
ITC_NIM_BCST  Broadcast "node" (as mask)

enum _ITC_ProtID
 

Enumeration of hardware protocols (across LCB fabric).

Enumeration values:
ITC_PID_NONE  Guard value
ITC_PID_NOACK  Non-acknowledged protocol
ITC_PID_ACK  Acknowledged protocol

enum _ITC_QueueID
 

Enumeration of queue identifiers.

Enumeration values:
ITC_QID_NONE  Guard value
ITC_QID_METAHI  Meta-queue (private to ITC)
ITC_QID_SYNC  Sync-queue
ITC_QID_CMD_X  Command queue (special )
ITC_QID_CMD  Command queue (typical: CTDB)
ITC_QID_CTL_X  Control queue (special)
ITC_QID_CTL  Control queue (typical: CPU-CPU)
ITC_QID_BULK  Bulk data queue (typical: CPU-CPU)
ITC_QID_METALO  Meta-queue (private to ITC)

enum _ITC_QueueMask
 

Enumeration of queues as elements in a mask.

Enumeration values:
ITC_QIM_METAHI  Meta-hi queue (as mask)
ITC_QIM_SYNC  Sync queue (as mask)
ITC_QIM_CMD_X  Command X queue (as mask)
ITC_QIM_CMD  Command queue (as mask)
ITC_QIM_CTL_X  Control X queue (as mask)
ITC_QIM_CTL  Control queue (as mask)
ITC_QIM_BULK  Bulk data queue (as mask)
ITC_QIM_METALO  Meta-lo queue (as mask)
ITC_QIM_USER  Mask of all "user" queues

enum _ITC_TaskID
 

Enumeration of task identifiers.

Enumeration values:
ITC_TID_NONE  Guard value
ITC_TID_ANON  The anonymous task (beware!)
ITC_TID_LCM  LAT computer manager
ITC_TID_LFS_M  LAT file system (master)
ITC_TID_LFS_S  LAT file system (slave)
ITC_TID_LHK_M  LAT housekeeping (master)
ITC_TID_LHK_S  LAT housekeeping (slave)
ITC_TID_LIM_M  LAT instrument manager (master)
ITC_TID_LIM_S  LAT instrument manager (slave)
ITC_TID_LSM_M  LAT spacecraft messages (master)
ITC_TID_LSM_S  LAT spacecraft messages (slave)
ITC_TID_LSW_M  LAT software watchdog (master)
ITC_TID_LSW_S  LAT software watchdog (slave)
ITC_TID_LCI_M  LAT charge injection (master)
ITC_TID_LCI_S  LAT charge injection (slave)
ITC_TID_ICT  ISIS control task
ITC_LID_CRXC  CTDB Rx task (telecommand)
ITC_LID_CRXT  CTDB Rx task (telemetry)
ITC_SID_LRX  LCB Rx task
ITC_SID_LTX0  LCB Tx task (CPU-CPU)
ITC_SID_LTX1  LCB Tx task (CPU-CPU)
ITC_SID_LTX2  LCB Tx task (CPU-CPU)
ITC_SID_LTX3  LCB Tx task (CPU-CPU)
ITC_SID_CTX  CTDB Tx task
ITC_SID_STX  LCB Tx task (CPU-SDI)
ITC_SID_BCST  LCB Tx task (CPU-CPU broadcast)


Function Documentation

unsigned int ITC_addQueue ITC_Task task,
ITC_QueueID  qid
 

Add a queue to a task.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
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

Here is the call graph for this function:

unsigned int ITC_attachApid ITC_Task task,
ITC_QueueID  qid,
const ITC_ApidDef def,
void *  prm
 

Attach an APID definition to a queue.

Parameters:
task (in) Task handle
qid (in) Queue ID
def (in) APID definition
prm (in) User context parameter (per APID)
Warning:
Caller is responsible for ensuring the persistence of the ITC_ApidDef structure and the validity of the context parameter. This routine only captures pointers.
Return values:
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
Attach an APID definition structure to a queue.

Here is the call graph for this function:

unsigned int ITC_attachCmdConfirm ITC_Task task,
ITC_cb_Memory rtn,
void *  prm
 

Attach a command confirmation memory allocator to a task.

Parameters:
task (in) Task handle
rtn (in) Memory allocation routine
prm (in) Memory allocation routine parameter
Return values:
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
ITC_attachConfirm() allows a user to attach a memory allocator to a task for the express purpose of sending command confirmations back to the spacecraft. By making the allocation the responsibility of a task, one task cannot blame another for having hogged all the command confirmation memory.

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).

Parameters:
task (in) Task handle
qid (in) Queue ID
lst (in) A command list
prm (in) User context parameter (per command list)
Warning:
Caller is responsible for ensuring the persistence of the ITC_CommandList structure and the validity of the context parameter. This routine only captures pointers.
Return values:
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

Here is the call graph for this function:

unsigned int ITC_attachMemory ITC_Task task,
ITC_QueueID  qid,
ITC_cb_Memory rtn,
void *  prm
 

Attach a memory manager description to a queue.

Parameters:
task (in) Task handle
qid (in) Queue ID
rtn (in) Memory allocation routine
prm (in) Memory allocation routine parameter
Return values:
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
ITC_attachMemory() attaches an abstract memory manager to a queue so that driver level tasks can allocate memory from applications tasks.

Here is the call graph for this function:

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).

Parameters:
task (in) Task handle
qid (in) Queue ID
rtn (in) Callback for raw packets
prm (in) User context parameter (per raw processor)
Warning:
Caller is responsible for ensuring the persistence and validity of the context parameter. This routine only captures pointers.
Return values:
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

Here is the call graph for this function:

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.

Parameters:
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
Return values:
ITC_SUCCESS Success
ITC_VARNULL NULL variable (pointer) detected
ITC_VARRNG Out of range variable detected
ITC_bind() binds a queue item descriptor (connects together all the elements of a message: the location of the message, the destination of the message and the disposal method of the message).

Here is the call graph for this function:

void ITC_complete const ITC_QueueItem qitem,
unsigned int  status
 

Call back the user provided completion routine (often a free).

Parameters:
qitem (in) Queue item
status (in) Completion status

unsigned int ITC_convertTaskLite ITC_Task task  ) 
 

Convert a task to a lightweight ITC task.

Parameters:
task (in) Task handle
Return values:
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
Warning:
This routine must be called in the context of the task wishing to be converted.
ITC_convertTaskLite() converts an existing task to a lightweight ITC task.

Here is the call graph for this function:

unsigned int ITC_copyCounts void *  dst,
ITC_TaskID  tid
 

Copy a command counts block to the provided destination.

Parameters:
dst (in) Destination of copy
tid (in) Task for which to copy counts
Return values:
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.

Parameters:
task (out) Task handle (pass to other task configuration routines)
tid (in) Task ID (taken from preassigned application list)
Return values:
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
ITC_createTask() creates a bare task structure that can be further configured by calls to other task configuration routines. See ITC_addQueue(), ITC_attachRaw(), ITC_attachApid(), ITC_attachCommand(). Once the task configuration is completed, the task can be started with a call to ITC_startTask().

Here is the call graph for this function:

unsigned int ITC_deleteTask ITC_Task task  ) 
 

Delete a task container.

Parameters:
task (in) Task handle
Return values:
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

Here is the call graph for this function:

unsigned int ITC_detachApid const ITC_ApidDef def  ) 
 

Detach an APID definition from a queue.

Parameters:
def (in) APID definition
Return values:
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

Here is the call graph for this function:

unsigned int ITC_detachCmdConfirm ITC_Task task  ) 
 

Detach a command confirmation memory allocator from a task.

Parameters:
task (in) Task handle
Return values:
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
ITC_detachCmdConfirm() detaches a task's command confirmation memory allocator.

unsigned int ITC_detachCommand ITC_Task task,
ITC_QueueID  qid
 

Detach a command list from a queue.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
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

Here is the call graph for this function:

unsigned int ITC_detachMemory ITC_Task task,
ITC_QueueID  qid
 

Detach a memory control description from a queue.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
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

Here is the call graph for this function:

unsigned int ITC_detachRaw ITC_Task task,
ITC_QueueID  qid
 

Detach a raw processor from a queue.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
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

Here is the call graph for this function:

unsigned int ITC_disableQueues unsigned int  iqm  ) 
 

Disable a set of ITC queues.

Parameters:
iqm (in) ITC queue mask (or of members of ITC_QIM_xxx)
Return values:
FORK_C_CONTINUE Continue fork
~FORK_C_CONTINUE Shut down fork

Here is the call graph for this function:

unsigned int ITC_enableQueues unsigned int  iqm  ) 
 

Enable a set of ITC queues.

Parameters:
iqm (in) ITC queue mask (or of members of ITC_QIM_xxx)
Return values:
FORK_C_CONTINUE Continue fork
~FORK_C_CONTINUE Shut down fork

Here is the call graph for this function:

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.

Parameters:
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
Return values:
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_forward() sends an existing, fully described queue item to another destination. If successful, it returns the code ITC_FORWARD (level "success"). If this queue item is being forwarded from within the standard task level dispatch, this code should be returned from the dispatch callback so that the dispatcher doesn't free the queue item.

Here is the call graph for this function:

ITC_NodeID ITC_getNodeID void   ) 
 

Return the node ID of the current node.

Return values:
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 (or SIU-EXT if you prefer)
ITC_NID_SC Node SC (spacecraft)
ITC_getNodeID() returns the node ID for the calling node.

ITC_DispID ITC_getPacketDispID const ITC_QueueItem qitem  ) 
 

Return ITC dispatch protocol for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Dispatch protocol (ITC_DID_NONE on error)

ITC_NodeID ITC_getPacketDstNodeID const ITC_QueueItem qitem  ) 
 

Return destination node ID for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Node ID (ITC_NID_NONE on error)

ITC_QueueID ITC_getPacketDstQueueID const ITC_QueueItem qitem  ) 
 

Return destination queue ID for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Queue ID (ITC_QID_NONE on error)

ITC_TaskID ITC_getPacketDstTaskID const ITC_QueueItem qitem  ) 
 

Return destination task ID for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Task ID (ITC_TID_NONE on error)

unsigned int ITC_getPacketLen const ITC_QueueItem qitem  ) 
 

Return payload length for queue item.

Parameters:
qitem (in) Queue item
Return values:
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.

Parameters:
qitem (in) Queue item
Return values:
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.

Parameters:
qitem (in) Queue item pointer
Return values:
x Hardware protocol (ITC_PID_NONE on error)

ITC_NodeID ITC_getPacketSrcNodeID const ITC_QueueItem qitem  ) 
 

Return source node ID for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Node ID (ITC_NID_NONE on error)

ITC_TaskID ITC_getPacketSrcTaskID const ITC_QueueItem qitem  ) 
 

Return source task ID for given queue item.

Parameters:
qitem (in) Queue item pointer
Return values:
x Task ID (ITC_TID_NONE on error)

ITC_QueueID ITC_getQueueID ITC_Queue queue  ) 
 

Return queue ID for given queue.

Parameters:
queue (in) Queue pointer
Return values:
x Queue ID (ITC_QID_NONE on error)

ITC_Task* ITC_getTaskHandle ITC_TaskID  tid  ) 
 

Return the task handle for a given task ID.

Return values:
NULL tid out or range or task not created
x Task handle
Warning:
Why do I have this feeling that I'm going to regret making this entry point available?
ITC_getTaskHandle() returns the task handle for the given task ID

ITC_TaskID ITC_getTaskID void   ) 
 

Return task ID of current task.

Return values:
x Task ID (ITC_TID_NONE if not an ITC task or at interrupt level)

unsigned int ITC_initialize ITC_NodeID  nid  ) 
 

Initialize the ITC control block.

Parameters:
nid Node ID of this node
Return values:
ITC_ALOCFAIL Memory allocation failure
ITC_CTLSTAT ITC control block not in state uninitialized
ITC_MUALOCFL Cannot allocate a mutex
ITC_SELFNID Bad node ID for this node
ITC_SUCCESS Success
ITC_initialize() initialized the ITC system.

unsigned int ITC_removeQueue ITC_Task task,
ITC_QueueID  qid
 

Remove a queue from a task.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
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

Here is the call graph for this function:

unsigned int ITC_revertTaskLite ITC_Task task  ) 
 

Revert a lightweight ITC task to a regular task.

Parameters:
task (in) Task handle
Return values:
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
Warning:
This routine must be called in the context of the task wishing to be reverted.
ITC_revertTaskLite() reverts a lightweight ITC task to a regular task.

Here is the call graph for this function:

unsigned int ITC_send ITC_QueueItem qitem  ) 
 

Send a queue item to a destination queue.

Parameters:
qitem (in) Queue item descriptor
Return values:
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_sendQueueItem() sends a packet to a destination. The queue item must be fully composed and is assumed to have integrity. This routine should never be made part of the public interface.

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.

Parameters:
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)
Return values:
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
ITC_setCmdConfirm() sets one of the command confirmation levels for a task. There are four levels that can be controlled, arranged as a two-by-two matrix. The first element of the matrix is whether the command belongs to the class "spacecraft broadcast" (parameter 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.

Parameters:
tid (in) Task ID
new (in) New task response level
Return values:
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
ITC_setMsgResponse() sets the message reporting level of a task.

ITC_ProtID ITC_setPacketProtID ITC_QueueItem qitem,
ITC_ProtID  pid
 

Set the source task ID for the given queue item.

Parameters:
qitem (in) Queue item pointer
pid (in) ITC hardare protocol ID
Return values:
x Previous value of hardware protocol ID (ITC_PID_NONE on error)

unsigned int ITC_shutdown void   ) 
 

Shut down the ITC system.

Return values:
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
ITC_shutdown() shuts down the ITC system.

unsigned int ITC_sizeofCounts void   ) 
 

Return size of a command counting structure.

Return values:
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).

Parameters:
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
Return values:
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

Here is the call graph for this function:

unsigned int ITC_startTaskW ITC_Task task,
const TASK_attr *  attr,
ITC_cb_Meta rtn,
void *  prm
 

Fork the specified ITC task (blocking version).

Parameters:
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
Return values:
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

Here is the call graph for this function:

unsigned int ITC_stopTask ITC_Task task,
ITC_cb_Meta rtn,
void *  prm
 

Stop an ITC task.

Parameters:
task (in) Task handle
rtn (in) User's task stop routine (can be NULL)
prm (in) User's task stop routine parameter
Warning:
This routine is blocking (on FORK_join)
Return values:
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

Here is the call graph for this function:


Generated on Tue May 3 23:16:01 2005 by doxygen 1.3.3