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

Constituent: itc     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

ITC_utility.c File Reference

Collection of utility routines. More...

#include <string.h>
#include "PBS/FORK.h"
#include "PBI/TBD_id.h"
#include "PBS/TBD.ih"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_msgs.h"
#include "ITC_prvdefs.h"

Include dependency graph for ITC_utility.c:


Functions

unsigned int ITC_copyCounts (void *dst, ITC_TaskID tid)
 Copy a command counts block to the provided destination.
ITC_NodeID ITC_getNodeID ()
 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 ()
 Return task ID of current 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 ()
 Return size of a command counting structure.

Detailed Description

Collection of utility routines.

CVS $Id: ITC_utility.c,v 1.8 2005/09/08 03:20:47 apw Exp $
Author:
A.P.Waite

Function Documentation

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

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
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_setNodeID ITC_NodeID  new  ) 
 

Set the node ID of the current node.

Parameters:
new (in) New ITC node ID
Return values:
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_setNodeID() sets the ITC node ID of the current node. This is a special facility provided for EPUs which cannot identify their ITC node ID until after the LCB has been brought up. This routine will reject efforts to set the node ID on non-EPU nodes.

ITC_TaskID 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_sizeofCounts void   ) 
 

Return size of a command counting structure.

Return values:
Size of command counting structure


Generated on Wed May 17 21:52:42 2006 by  doxygen 1.4.4