GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-1 > itc / linux-gcc
#include "PBS/FORK.h"
#include "ITC/ITC_pubdefs.h"
Classes | |
struct | _ITC_Map |
Structure to hold node/task proxies for foreign nodes. More... | |
Defines | |
#define | ITC_PRT_K_SNID (3) |
#define | ITC_PRT_K_STID (5) |
#define | ITC_PRT_K_DNID (3) |
#define | ITC_PRT_K_DTID (5) |
#define | ITC_PRT_K_DQID (3) |
#define | ITC_PRT_K_PNID (3) |
#define | ITC_PRT_K_DID (2) |
#define | ITC_PRT_K_PID (2) |
#define | ITC_PRT_K_RSV (4) |
#define | ITC_PRT_K_VER (2) |
#define | ITC_PRT_V_SNID ( 0 ) |
#define | ITC_PRT_V_STID ( ITC_PRT_V_SNID + ITC_PRT_K_SNID ) |
#define | ITC_PRT_V_DNID ( ITC_PRT_V_STID + ITC_PRT_K_STID ) |
#define | ITC_PRT_V_DTID ( ITC_PRT_V_DNID + ITC_PRT_K_DNID ) |
#define | ITC_PRT_V_DQID ( ITC_PRT_V_DTID + ITC_PRT_K_DTID ) |
#define | ITC_PRT_V_PNID ( ITC_PRT_V_DQID + ITC_PRT_K_DQID ) |
#define | ITC_PRT_V_DID ( ITC_PRT_V_PNID + ITC_PRT_K_PNID ) |
#define | ITC_PRT_V_PID ( ITC_PRT_V_DID + ITC_PRT_K_DID ) |
#define | ITC_PRT_V_RSV ( ITC_PRT_V_PID + ITC_PRT_K_PID ) |
#define | ITC_PRT_V_VER ( ITC_PRT_V_RSV + ITC_PRT_K_RSV ) |
#define | ITC_PRT_M_SNID (((1 << ITC_PRT_K_SNID ) - 1) << ITC_PRT_V_SNID ) |
#define | ITC_PRT_M_STID (((1 << ITC_PRT_K_STID ) - 1) << ITC_PRT_V_STID ) |
#define | ITC_PRT_M_DNID (((1 << ITC_PRT_K_DNID ) - 1) << ITC_PRT_V_DNID ) |
#define | ITC_PRT_M_DTID (((1 << ITC_PRT_K_DTID ) - 1) << ITC_PRT_V_DTID ) |
#define | ITC_PRT_M_DQID (((1 << ITC_PRT_K_DQID ) - 1) << ITC_PRT_V_DQID ) |
#define | ITC_PRT_M_PNID (((1 << ITC_PRT_K_PNID ) - 1) << ITC_PRT_V_PNID ) |
#define | ITC_PRT_M_DID (((1 << ITC_PRT_K_DID ) - 1) << ITC_PRT_V_DID ) |
#define | ITC_PRT_M_PID (((1 << ITC_PRT_K_PID ) - 1) << ITC_PRT_V_PID ) |
#define | ITC_PRT_M_RSV (((1 << ITC_PRT_K_RSV ) - 1) << ITC_PRT_V_RSV ) |
#define | ITC_PRT_M_VER (((1 << ITC_PRT_K_VER ) - 1) << ITC_PRT_V_VER ) |
Typedefs | |
typedef unsigned int | ITC_cb_Dispatch (void *prm, const ITC_QueueItem *qitem, void *qipay, unsigned int qilen) |
Signature for an ITC dispatch plug-in routine. | |
typedef struct _ITC_Map | ITC_Map |
Typedef for struct _ITC_Map. | |
Functions | |
void * | ITC_allocFromQueue (ITC_Queue *queue, unsigned int siz, ITC_cb_Completion **rtn, void **cb0, void **cb1, void **cb2) |
Allocate memory from a queue. | |
unsigned int | ITC_convertDispatch (ITC_Task *task, ITC_QueueID qid, ITC_cb_Dispatch *rtn, void *prm) |
Modify the task dispatch routine with a new plug-in. | |
unsigned int | ITC_convertFork (ITC_Task *task, ITC_QueueID qid, FORK_cb_rtn rtn, void *prm) |
Modify a queue to be a pure fork queue. | |
void | ITC_copyCmdConfirm (ITC_Task *task, const char *cmd, WCT_time tim) |
Make a copy of a spacecraft command. | |
FORK_que * | ITC_getForkQueueHandle (ITC_TaskID tid, ITC_QueueID qid) |
Return the fork queue handle for the given task/queue. | |
unsigned int | ITC_getPacketProtocol (const ITC_QueueItem *qitem) |
Return the complete ITC protocol word. | |
unsigned int | ITC_insertMap (unsigned int nim, ITC_TaskID tid) |
Insert entries into the ITC node map. | |
ITC_Queue * | ITC_mapApid2Queue (unsigned short apid, ITC_TaskID *tid, ITC_QueueID *qid, unsigned int *scb) |
Return queue handle corresponding to APID. | |
ITC_Queue * | ITC_mapDst2Queue (unsigned int itc) |
Return queue handle corresponding to destination task/queue IDs. | |
unsigned int | ITC_redirectApid (unsigned int APID, ITC_TaskID ntid, ITC_QueueID nqid, ITC_TaskID *otid, ITC_QueueID *oqid) |
Redirect APID dispatch to a new task/queue. | |
unsigned int | ITC_removeMap (unsigned int nim) |
Remove entries from the ITC node map. | |
unsigned int | ITC_revertDispatch (ITC_Task *task, ITC_QueueID qid) |
Revert the task dispatch routine to the default plug-in. | |
void | ITC_sendCmdConfirm (ITC_Task *task, const char *cmd, unsigned int scb, WCT_time dtim, WCT_time xtim, unsigned int status) |
Send a telecommand execution status reponse. | |
ITC_NodeID | ITC_setPacketSrcNodeID (ITC_QueueItem *qitem, ITC_NodeID nid) |
Set the source node ID for the given queue item. | |
ITC_TaskID | ITC_setPacketSrcTaskID (ITC_QueueItem *qitem, ITC_TaskID tid) |
Set the source task ID for the given queue item. |
CVS $Id: ITC_drvdefs.h,v 1.6 2006/10/26 02:00:48 apw Exp $
void* ITC_allocFromQueue | ( | ITC_Queue * | queue, | |
unsigned int | siz, | |||
ITC_cb_Completion ** | rtn, | |||
void ** | cb0, | |||
void ** | cb1, | |||
void ** | cb2 | |||
) |
Allocate memory from a queue.
queue | (in) Queue handle | |
siz | (in) Bytes to allocate | |
rtn | (out) Memory deallocation callback routine | |
cb0 | (out) Memory deallocation callback routine parameter 0 | |
cb1 | (out) Memory deallocation callback routine parameter 1 | |
cb2 | (out) Memory deallocation callback routine parameter 2 |
NULL | Memory not allocated | |
x | Pointer to allocated memory |
unsigned int ITC_convertDispatch | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
ITC_cb_Dispatch * | rtn, | |||
void * | prm | |||
) |
Modify the task dispatch routine with a new plug-in.
task | (in) Task handle | |
qid | (in) Queue ID | |
rtn | (in) Plug-in routine | |
prm | (in) Plug-in routine parameter |
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_TASKDISP | NULL dispatch routine specified | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_TASKTYP | Invalid call for a lightweight task | |
ITC_VARRNG | Out of range variable detected |
unsigned int ITC_convertFork | ( | ITC_Task * | task, | |
ITC_QueueID | qid, | |||
FORK_cb_rtn | rtn, | |||
void * | prm | |||
) |
Modify a queue to be a pure fork queue.
task | (in) Task handle | |
qid | (in) Queue ID | |
rtn | (in) Fork callback routine | |
prm | (in) Fork callback routine parameter |
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_TASKDISP | NULL dispatch routine specified | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation | |
ITC_TASKTYP | Invalid call for a lightweight task | |
ITC_VARRNG | Out of range variable detected |
void ITC_copyCmdConfirm | ( | ITC_Task * | task, | |
const char * | cmd, | |||
WCT_time | tim | |||
) |
Make a copy of a spacecraft command.
task | (in) Task handle | |
cmd | (in) Pointer to CCSDS telecommand | |
tim | (in) Time command was dequeued |
FORK_que* ITC_getForkQueueHandle | ( | ITC_TaskID | tid, | |
ITC_QueueID | qid | |||
) |
Return the fork queue handle for the given task/queue.
tid | (in) Task ID | |
qid | (in) Queue ID |
NULL | Error (no such task, no such queue, task not started) | |
x | The fork queue handle |
unsigned int ITC_getPacketProtocol | ( | const ITC_QueueItem * | qitem | ) |
Return the complete ITC protocol word.
qitem | (in) Queue item |
unsigned int ITC_insertMap | ( | unsigned int | nim, | |
ITC_TaskID | tid | |||
) |
Insert entries into the ITC node map.
nim | (in) Mask of nodes to be mapped to the given task ID | |
tid | (in) Task ID that will serve as proxy for the listed nodes |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC system not initialized | |
ITC_SUCCESS | Success |
ITC_Queue* ITC_mapApid2Queue | ( | unsigned short | APID, | |
ITC_TaskID * | tid, | |||
ITC_QueueID * | qid, | |||
unsigned int * | scb | |||
) |
Return queue handle corresponding to APID.
APID | (in) Application ID | |
tid | (out) Task ID | |
qid | (out) Queue ID | |
scb | (out) Is broadcast command (0/1 => not broadcast/broadcast) |
NULL | No mapping possible | |
x | Queue handle |
ITC_Queue* ITC_mapDst2Queue | ( | unsigned int | itcp | ) |
Return queue handle corresponding to destination task/queue IDs.
itcp | (in) ITC protocol word |
NULL | No mapping possible | |
x | Queue handle |
unsigned int ITC_redirectApid | ( | unsigned int | APID, | |
ITC_TaskID | ntid, | |||
ITC_QueueID | nqid, | |||
ITC_TaskID * | otid, | |||
ITC_QueueID * | oqid | |||
) |
Redirect APID dispatch to a new task/queue.
APID | (in) APID to redirect | |
ntid | (in) New task destination of APID dispatch | |
nqid | (in) New queue destination of APID dispatch | |
otid | (out) Old task destination of APID dispatch | |
oqid | (out) Old queue destination of APID dispatch |
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_removeMap | ( | unsigned int | nim | ) |
Remove entries from the ITC node map.
nim | (in) Mask of nodes to be mapped |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC system not initialized | |
ITC_SUCCESS | Success |
unsigned int ITC_revertDispatch | ( | ITC_Task * | task, | |
ITC_QueueID | qid | |||
) |
Revert the task dispatch routine to the default plug-in.
task | (in) Task handle | |
qid | (in) Queue ID |
ITC_APIDRNG | Invalid APID | |
ITC_APIDTBL | No APID table entry for APID | |
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 | |
ITC_TASKTYP | Invalid call for a lightweight task | |
ITC_VARRNG | Out of range variable detected |
void ITC_sendCmdConfirm | ( | ITC_Task * | task, | |
const char * | cmd, | |||
unsigned int | scb, | |||
WCT_time | dtim, | |||
WCT_time | xtim, | |||
unsigned int | status | |||
) |
Send a telecommand execution status reponse.
task | (in) Task handle | |
cmd | (in) Pointer to CCSDS telecommand | |
scb | (in) Spacecraft broadcast APID flag | |
dtim | (in) Time command dequeued | |
xtim | (in) Time execution completed | |
status | (in) Command completion code |
ITC_NodeID ITC_setPacketSrcNodeID | ( | ITC_QueueItem * | qitem, | |
ITC_NodeID | nid | |||
) |
Set the source node ID for the given queue item.
qitem | (in) Queue item pointer | |
nid | (in) ITC node ID |
x | Previous value of node ID (ITC_NID_NONE on error) |
ITC_TaskID ITC_setPacketSrcTaskID | ( | ITC_QueueItem * | qitem, | |
ITC_TaskID | tid | |||
) |
Set the source task ID for the given queue item.
qitem | (in) Queue item pointer | |
tid | (in) ITC task ID |
x | Previous value of task ID (ITC_TID_NONE on error) |