GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > ITC / V2-1-7

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 "PBS/TOC.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_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_Map
 Structure to hold maps of how to get from here to there. More...

struct  _ITC_PoolDsc
 Structure to describe a memory pool. More...


Defines

#define ITC_L_NODES   (8)
 Maximum number of nodes supported.

#define ITC_L_CPUS   (5)
 Number of nodes that are genuine LAT CPUs.

#define ITC_L_APPS   ( 30 )
 Number of application level tasks.

#define ITC_L_SVCS   ( 2 )
 Number of service level tasks.

#define ITC_L_TASKS   ( ITC_L_APPS + ITC_L_SVCS )
 Total number of tasks (including "anonymous", excluding "lites").

#define ITC_L_LITES   ( 3 )
 Total number of lieghtweight tasks.

#define ITC_SID_NONE   ( 32 )
 Provided for backward compatibility only.

#define ITC_L_QUEUES   (8)
 Maximum number of queues supported per task.

#define ITC_L_PROTS   (4)
 Maximum number of protocols supported.

#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_QueueItem ITC_QueueItem
 Typedef/forward reference for struct _ITC_QueueItem.

typedef _ITC_PacketHdr ITC_PacketHdr
 Typedef/forward reference for struct _ITC_PacketHdr.

typedef _ITC_Task ITC_Task
 Typedef/forward reference for struct _ITC_Task.

typedef _ITC_Queue ITC_Queue
 Typedef/forward reference for struct _ITC_Queue.

typedef enum _ITC_NodeID ITC_NodeID
 Typedef for enum _ITC_NodeID.

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_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 unsigned int ITC_cb_StartTask (void *prm)
 Signature for an ITC task startup routine.

typedef unsigned int ITC_cb_Processor (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Signature for an ITC packet processing routine.

typedef void ITC_cb_Free (void *prm, struct _ITC_QueueItem *qitem)
 Signature for an ITC memory freeing routine.

typedef _ITC_Map ITC_Map
 Typedef for struct _ITC_Map.

typedef _ITC_PoolDsc ITC_PoolDsc
 Typedef for struct _ITC_PoolDsc.

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_UNKNOWN = -1,
  ITC_NID_SIU = 0,
  ITC_NID_EPU0 = 1,
  ITC_NID_EPU1 = 2,
  ITC_NID_EPU2 = 3,
  ITC_NID_EPU3 = 4,
  ITC_NID_SDI = 5,
  ITC_NID_SC = 6,
  ITC_NID_BCST = 7
}
 Enumeration of communications nodes. More...

enum  _ITC_TaskID {
  ITC_TID_UNKNOWN = -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_SID_LCS = 30,
  ITC_SID_CTS = 31,
  ITC_LID_LCX = 32,
  ITC_LID_CTX = 33,
  ITC_LID_MSG = 34
}
 Enumeration of task identifiers. More...

enum  _ITC_QueueID {
  ITC_QID_UNKNOWN = -1,
  ITC_QID_META = 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_X = 6,
  ITC_QID_BULK = 7
}
 Enumeration of queue identifiers. More...

enum  _ITC_ProtID {
  ITC_PRT_UNKNOWN = -1,
  ITC_PRT_LID = 0,
  ITC_PRT_RAW = 1,
  ITC_PRT_CMD = 2,
  ITC_PRT_APID = 3
}
 Enumeration of protocols. 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 (struct _ITC_Task *task, ITC_QueueID qid)
 Add a queue to a task.

const struct _ITC_QueueItemITC_allocW (unsigned int len, ITC_NodeID nid, ITC_TaskID tid, ITC_QueueID qid, ITC_ProtID pid, const TOC *toc)
 Allocate a queue item descriptor and a send buffer.

unsigned int ITC_attachApid (struct _ITC_Task *task, ITC_QueueID qid, const ITC_ApidDef *def, void *prm)
 Attach an APID definition to a queue.

unsigned int ITC_attachCmd (struct _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_attachRaw (struct _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_copyCounts (void *dst, ITC_TaskID tid)
 Copy a command counts block to the provided destination.

unsigned int ITC_createService (struct _ITC_Task **task, ITC_TaskID tid, ITC_cb_Processor *rtn)
 Create a service task.

unsigned int ITC_createTask (struct _ITC_Task **task, ITC_TaskID tid)
 Create a task level container for queues.

unsigned int ITC_createTaskLite (struct _ITC_Task **task, ITC_TaskID tid)
 Create a lightweight ITC task.

unsigned int ITC_convertTaskLite (struct _ITC_Task *task)
 Convert a task to a lightweight ITC task.

unsigned int ITC_deleteTask (struct _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_detachCmd (struct _ITC_Task *task, ITC_QueueID qid)
 Detach a command list from a queue.

unsigned int ITC_detachRaw (struct _ITC_Task *task, ITC_QueueID qid)
 Detach a raw processor from a queue.

unsigned int ITC_dispatchCTDB (void *prm, unsigned char *pkt)
 Driver level packet dispatch (used in CTDB driver).

void ITC_freeQueueItem (const struct _ITC_QueueItem *qitem)
 Free a queue item and it's associated packet.

ITC_NodeID ITC_getNodeID (void)
 Initialize the ITC control block.

ITC_NodeID ITC_getPacketDstNodeID (const struct _ITC_QueueItem *qitem)
 Return destination node ID for given queue item.

ITC_QueueID ITC_getPacketDstQueueID (const struct _ITC_QueueItem *qitem)
 Return destination queue ID for given queue item.

ITC_TaskID ITC_getPacketDstTaskID (const struct _ITC_QueueItem *qitem)
 Return destination task ID for given queue item.

void * ITC_getPacketPay (const struct _ITC_QueueItem *qitem)
 Return pointer to packet payload for queue item.

ITC_ProtID ITC_getPacketProtocol (const struct _ITC_QueueItem *qitem)
 Return ITC protocol for given queue item.

ITC_NodeID ITC_getPacketSrcNodeID (const struct _ITC_QueueItem *qitem)
 Return source node ID for given queue item.

ITC_TaskID ITC_getPacketSrcTaskID (const struct _ITC_QueueItem *qitem)
 Return source task ID for given queue item.

ITC_QueueID ITC_getQueueID (struct _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 the ITC task ID of the calling task (if it's an ITC task).

unsigned int ITC_initialize (ITC_NodeID nid, ITC_Map *map, unsigned int recvCnt, ITC_PoolDsc *recvDsc, unsigned int sendCnt, ITC_PoolDsc *sendDsc)
 Initialize the ITC control block.

unsigned int ITC_removeQueue (struct _ITC_Task *task, ITC_QueueID qid)
 Remove a queue from a task.

unsigned int ITC_send (const struct _ITC_QueueItem *qitem)
 Send a queue item to a destination.

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_sizeofCounts (void)
 Return size of a command counting structure.

unsigned int ITC_startTask (struct _ITC_Task *task, const TASK_attr *attr, ITC_cb_StartTask *rtn, void *prm)
 Fork a task with the queues described in the task handle.

unsigned int ITC_stopTask (struct _ITC_Task *task)
 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.7 2004/12/14 01:22:56 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  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_NodeID
 

Enumeration of communications nodes.

Enumeration values:
ITC_NID_UNKNOWN  Unknown (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_SDI  Science data interface
ITC_NID_SC  Spacecraft
ITC_NID_BCST  CPU broadcast

enum _ITC_ProtID
 

Enumeration of protocols.

Enumeration values:
ITC_PRT_UNKNOWN  Unknown (guard value)
ITC_PRT_LID  LAT instrument data
ITC_PRT_RAW  Raw packets (inter-CPU)
ITC_PRT_CMD  Command dispatch
ITC_PRT_APID  APID dispatch

enum _ITC_QueueID
 

Enumeration of queue identifiers.

Enumeration values:
ITC_QID_UNKNOWN  Unknown (guard value)
ITC_QID_META  Meta-queue (private to ITC)
ITC_QID_SYNC  Sync-queue (not yet implemented)
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_X  Bulk data queue (special)
ITC_QID_BULK  Bulk data queue (typical: CPU-CPU)

enum _ITC_TaskID
 

Enumeration of task identifiers.

Enumeration values:
ITC_TID_UNKNOWN  Unknown (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_SID_LCS  LCB Tx task (service)
ITC_SID_CTS  CTDB Tx task (service)
ITC_LID_LCX  LCBD Rx task (lightweight)
ITC_LID_CTX  CTDB Rx task (lightweight)
ITC_LID_MSG  MSG proxy task (lightweight)


Function Documentation

unsigned int ITC_addQueue struct _ITC_Task task,
ITC_QueueID  qid
 

Add a queue to a task.

Parameters:
task (in) Task handle
qid (in) Queue ID
Return values:
ITC_NOTINIT ITC has not been initialized
ITC_QUEUITC Queue ID reserved for ITC
ITC_QUEUINIT Queue initialization failed
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state undefined
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

Here is the call graph for this function:

const ITC_QueueItem * ITC_allocW unsigned int  size,
ITC_NodeID  nid,
ITC_TaskID  tid,
ITC_QueueID  qid,
ITC_ProtID  pid,
const TOC *  toc
 

Allocate a queue item descriptor and a send buffer.

Parameters:
size (in) Size (bytes) of buffer payload to allocate
nid (in) Destination node ID
tid (in) Destination task ID
qid (in) Destination queue ID
pid (in) Protocol ID
toc (in) Time-out control
Return values:
ITC_ALOCFAIL Memory allocation failure
ITC_FPAGET Memory allocation from FPA failed
ITC_SENDNID Invalid/unreachable destination node
ITC_SENDQID Invalid/unreachable destination queue
ITC_SHRMEM Shared memory pool stopping/stopped
ITC_SUCCESS Success
Warning:
Can return NULL if the request could never be satisfied.

Allocations currently limited to 2 kByte

Allocates a queue-able buffer long enough to accomodate the requested length payload. Note that this is an ITC payload, not a CCSDS payload. When allocating for a CCSDS packet, size must include the CCSDS header (both primary and secondary), the CCSDS payload and (when appropriate) the CCSDS checksum.

Here is the call graph for this function:

unsigned int ITC_attachApid struct _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)
Return values:
ITC_ALOCFAIL Cannot allocate for an ITC_Apid object
ITC_DBLAPID Table entry for this APID already in use
ITC_NOTINIT ITC has not been initialized
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

Here is the call graph for this function:

unsigned int ITC_attachCmd struct _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)
Return values:
ITC_DBLCMD Command entry for this queue alrady in use
ITC_NOTINIT ITC has not been initialized
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

unsigned int ITC_attachRaw struct _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)
Return values:
ITC_DBLRAW Raw protocol handler for this queue already defined
ITC_NOTINIT ITC has not been initialized
ITC_RAWRTN Cannot specify a NULL routine
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

unsigned int ITC_convertTaskLite struct _ITC_Task task  ) 
 

Convert a task to a lightweight ITC task.

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

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

unsigned int ITC_createService struct _ITC_Task **  task,
ITC_TaskID  tid,
ITC_cb_Processor rtn
 

Create a service task.

Parameters:
task (out) Task handle (pass to ITC_startTask())
tid (in) Service ID (taken from preassigned service list)
rtn (in) Service callback routine
Return values:
ITC_ALOCFAIL Cannot allocate an ITC_Task object
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKQUEU Cannot create task queues
ITC_TASKRNG Task ID not valid for a service task
ITC_TASKSTAT Task not in state undefined
ITC_createService() creates a complete service task. The only function that can be applied to such a task handle is ITC_startTask().

Here is the call graph for this function:

unsigned int ITC_createTask struct _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 has not been initialized
ITC_SUCCESS Success
ITC_TASKQUEU Cannot create task queues
ITC_TASKRNG Task ID not valid for an application task
ITC_TASKSTAT Task not in state undefined
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_createTaskLite struct _ITC_Task **  task,
ITC_TaskID  tid
 

Create a lightweight ITC task.

Parameters:
task (out) Task handle
tid (in) Task ID (taken from preassigned lightweight list)
Return values:
ITC_ALOCFAIL Cannot allocate an ITC_Task object
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKRNG Task ID not valid for a lightweight task
ITC_TASKSTAT Task not in state undefined
ITC_createTaskLite() creates a lightweight ITC task structure. This can be registered by a non-ITC task to give the task some (but not all) of the features of an ITC task.

unsigned int ITC_deleteTask struct _ITC_Task task  ) 
 

Delete a task container.

Parameters:
task (in) Task handle
Return values:
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKNULL Task not in task table
ITC_TASKSTAT Task not in state initialized

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_NOAPID APID command table not attached to a queue
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKSTAT Task not in state initialized

Here is the call graph for this function:

unsigned int ITC_detachCmd struct _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_NOCMD No command table attached to the queue
ITC_NOTINIT ITC has not been initialized
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

unsigned int ITC_detachRaw struct _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_NORAW No raw protocol handler defined for this queue
ITC_NOTINIT ITC has not been initialized
ITC_QUEURNG Queue ID is out of range
ITC_QUEUSTAT Queue not in state initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

unsigned int ITC_dispatchCTDB void *  prm,
unsigned char *  pkt
 

Driver level packet dispatch (used in CTDB driver).

Parameters:
prm (in) User context parameter
pkt (in) CCSDS telecommand (first byte of primary header)
Return values:
ITC_SUCCESS Success
ITC_ALOCFAIL Cannot allocate packet to forward the command
ITC_APIDRNG APID invalid as spacecraft command
ITC_APIDTBL APID has no associated APID table entry
ITC_QUEUTBL APID does not map to a queue table entry
ITC_GENERROR Generic error
ITC_dispatchCTDB() is designed for use in the CTDB receive task. It performs the first tier dispatch to a task/queue.

Here is the call graph for this function:

void ITC_freeQueueItem const struct _ITC_QueueItem qitem  ) 
 

Free a queue item and it's associated packet.

Parameters:
qitem (in) Queue item

ITC_NodeID ITC_getNodeID void   ) 
 

Initialize the ITC control block.

Return values:
ITC_NID_UNKNOWN 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_getNodeID() returns the node ID for the calling node.

ITC_NodeID ITC_getPacketDstNodeID const struct _ITC_QueueItem qitem  ) 
 

Return destination node ID for given queue item.

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

ITC_QueueID ITC_getPacketDstQueueID const struct _ITC_QueueItem qitem  ) 
 

Return destination queue ID for given queue item.

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

ITC_TaskID ITC_getPacketDstTaskID const struct _ITC_QueueItem qitem  ) 
 

Return destination task ID for given queue item.

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

void * ITC_getPacketPay const struct _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_getPacketProtocol const struct _ITC_QueueItem qitem  ) 
 

Return ITC protocol for given queue item.

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

ITC_NodeID ITC_getPacketSrcNodeID const struct _ITC_QueueItem qitem  ) 
 

Return source node ID for given queue item.

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

ITC_TaskID ITC_getPacketSrcTaskID const struct _ITC_QueueItem qitem  ) 
 

Return source task ID for given queue item.

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

ITC_QueueID ITC_getQueueID struct _ITC_Queue queue  ) 
 

Return queue ID for given queue.

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

struct _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 the ITC task ID of the calling task (if it's an ITC task).

Returns:
A task ID from the ITC_TaskID enumeration
Warning:
Not all tasks are ITC tasks. If a non-ITC task calls this routine, the value ITC_TID_UNKNOWN will be returned.
ITC_getTaskID() returns the task ID for the calling task.

unsigned int ITC_initialize ITC_NodeID  nid,
ITC_Map map,
unsigned int  recvCnt,
ITC_PoolDsc recvDsc,
unsigned int  sendCnt,
ITC_PoolDsc sendDsc
 

Initialize the ITC control block.

Parameters:
nid Node ID of this node
map Node specific "network map"
recvCnt Receive memory pool descriptor count
recvDsc Receive memory pool descriptors
sendCnt Send memory pool descriptor count
sendDsc Send memory pool descriptors
Return values:
ITC_ALOCFAIL Memory allocation failure
ITC_DBLINIT Cannot double initialize
ITC_MAPNID Bad node ID in node map
ITC_MAPSID Bad service task ID in node map
ITC_MUALOCFL Cannot allocate a mutex
ITC_SELFNID Bad node ID for this node
ITC_SUCCESS Success
ITC_initialize() does all one-time ITC initialization.

Here is the call graph for this function:

unsigned int ITC_removeQueue struct _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_NOTINIT ITC has not been initialized
ITC_QUEUITC Queue ID reserved for ITC
ITC_QUEURNG Queue ID is out of range
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state initialized

Here is the call graph for this function:

unsigned int ITC_send const struct _ITC_QueueItem qitem  ) 
 

Send a queue item to a destination.

Parameters:
qitem (in) Queue item to send
Return values:
ITC_SENDTID Destination task stopping/stopped
ITC_SUCCESS Success
ITC_send() sends a packet to a destination..

Here is the call graph for this function:

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
Return values:
ITC_PARMRNG E Parameter out of range
ITC_SUCCESS Success
ITC_TASKCROS E Task pointer check failed
ITC_TASKRNG E Task ID out of range
ITC_TASKNULL E No entry in task table for task
ITC_setCmdLevel() 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_shutdown void   ) 
 

Shut down the ITC system.

Warning:
This routine is currently a no-op
Return values:
ITC_SUCCESS Success

unsigned int ITC_sizeofCounts void   ) 
 

Return size of a command counting structure.

Return values:
Size of command counting structure

unsigned int ITC_startTask struct _ITC_Task task,
const TASK_attr *  attr,
ITC_cb_StartTask rtn,
void *  prm
 

Fork a task with the queues described in the task handle.

Parameters:
task (in) Task handle
attr (in) Task attributes (can be NULL)
rtn (in) User's task startup routine (can be NULL)
prm (in) User's task startup routine parameter
Return values:
ITC_ALOCFAIL Cannot allocate for fork control block
ITC_FORKINIT Fork initialization failed
ITC_FORKQHND Cannot recover all fork queue handles (obscure)
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKINIT Cannot set up task intialization
ITC_TASKSTAT Task not in state initialized

Here is the call graph for this function:

unsigned int ITC_stopTask struct _ITC_Task task  ) 
 

Stop an ITC task.

Warning:
This routine is blocking (on FORK_join)
Return values:
ITC_NOTINIT ITC has not been initialized
ITC_SUCCESS Success
ITC_TASKHNDL Task handle is invalid
ITC_TASKSTAT Task not in state started


Generated on Thu Mar 3 20:41:08 2005 by doxygen 1.3.3