GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-2 > itc / linux-gcc
#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>
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_Task * | ITC_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. |
CVS $Id: ITC_utility.c,v 1.9 2011/03/25 21:01:11 apw Exp $
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 |
References _ITC_TaskConfirm::cmd, _ITC_Task::cnf, ITC_L_TASKS, and ITC_tpl.
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) |
References ITC_icb, ITC_NID_NONE, and _ITC_Control::nid.
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) |
References ITC_DID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_NID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_QID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_TID_NONE, and _ITC_QueueItem::itcp.
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 |
References _ITC_QueueItem::len.
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 |
References _ITC_QueueItem::pay.
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) |
References ITC_PID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_NID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_TID_NONE, and _ITC_QueueItem::itcp.
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) |
References ITC_QID_NONE, and _ITC_Queue::qid.
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 |
References ITC_L_TASKS, and ITC_tpl.
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) |
References ITC_TID_NONE, and _ITC_Task::tid.
Referenced by ableQueues(), and ITC_bind().
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 |
References ITC_CTL_UNINITIALIZED, ITC_icb, ITC_NID_EPU0, ITC_NID_EPU3, _ITC_Control::nid, and _ITC_Control::state.
ITC_TaskID 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) |
References ITC_K_PROTS, ITC_L_PROTS, ITC_PID_NONE, and _ITC_QueueItem::itcp.
unsigned int ITC_sizeofCounts | ( | void | ) |
Return size of a command counting structure.
Size | of command counting structure |