GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-2 > itc / linux-gcc
#include <string.h>
#include <PBI/TBD_id.h>
#include <PBS/FORK.h>
#include <PBS/TBD.ih>
#include <PBS/TOC.h>
#include <MSG/MSG_pubdefs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <ITC/ITC_msgs.h>
#include <ITC_inline.ih>
#include <ITC_prvdefs.h>
Functions | |
static ITC_cb_Processor * | findProcessor (const ITC_CommandList *lst, unsigned int fnc) |
Find a command in a list of commands indexed by function code. | |
FORK_cb_status | ITC_dispatch (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
The heart of ITC task level dispatching. | |
unsigned int | ITC_dispatchApp (void *prm, const ITC_QueueItem *qitem, void *qipay, unsigned int qilen) |
Find a command in a list of commands indexed by function code. | |
FORK_cb_status | ITC_startMeta (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a request to start an ITC task. | |
FORK_cb_status | ITC_stopMeta (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a request to stop an ITC task. |
CVS $Id: ITC_dispatch.c,v 1.15 2011/03/25 21:01:11 apw Exp $
static ITC_cb_Processor * findProcessor | ( | const ITC_CommandList * | lst, | |
unsigned int | fnc | |||
) | [inline, static] |
Find a command in a list of commands indexed by function code.
lst | (in) Command list | |
fnc | (in) Function code |
NULL | Failure | |
x | Address of routine |
References _ITC_CommandList::cmd, _ITC_CommandItem::fnc, and _ITC_CommandItem::rtn.
Referenced by ITC_dispatchApp().
FORK_cb_status ITC_dispatch | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
The heart of ITC task level dispatching.
prm | (in) User context parameter | |
msg | (in) Message buffer |
FORK_C_CONTINUE | Continue fork | |
~FORK_C_CONTINUE | Shut down fork |
References _ITC_Queue::cnt, _ITC_Queue::dspPrm, _ITC_Queue::dspRtn, ITC_complete(), ITC_copyCmdConfirm(), ITC_icb, ITC_isTaskDrained(), ITC_NID_SC, ITC_sendCmdConfirm(), ITC_tpl, ITC_TSK_STOPPING, _ITC_QueueItem::itcp, _ITC_QueueItem::len, _ITC_Control::nid, _ITC_QueueItem::pay, _ITC_Control::rwi, _ITC_Task::state, and _ITC_Queue::tid.
Referenced by startTask().
unsigned int ITC_dispatchApp | ( | void * | prm, | |
const ITC_QueueItem * | qitem, | |||
void * | qipay, | |||
unsigned int | qilen | |||
) |
Find a command in a list of commands indexed by function code.
prm | (in) User parameter | |
qitem | (in) Queue item | |
qipay | (in) Queue item payload pointer | |
qilen | (in) Queue item payload length |
NULL | Failure | |
x | Address of routine |
References _ITC_Queue::bad, _ITC_Queue::cmdLst, _ITC_Queue::cmdPrm, findProcessor(), ITC_apl, ITC_DID_APID, ITC_DID_CMD, ITC_DID_RAW, ITC_K_DISPS, ITC_L_DISPS, _ITC_QueueItem::itcp, _ITC_QueueItem::pay, _ITC_Apid::prm, _ITC_Queue::qid, _ITC_Queue::rawPrm, _ITC_Queue::rawRtn, _ITC_Queue::rcv, _ITC_Queue::tid, and validApidRx().
Referenced by createQueues(), and ITC_revertDispatch().
FORK_cb_status ITC_startMeta | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
Process a request to start an ITC task.
prm | (in) User context parameter | |
msg | (in) Message buffer |
ITC_SUCCESS | Success |
References ITC_TSK_STARTED, _ITC_Fork::prm0, _ITC_Fork::prm1, _ITC_Task::sem, _ITC_Task::state, _ITC_Fork::task, and _ITC_Task::tbd.
Referenced by startTask().
FORK_cb_status ITC_stopMeta | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | msg | |||
) |
Process a request to stop an ITC task.
prm | (in) User context parameter | |
msg | (in) Message buffer |
ITC_SUCCESS | Success |
References ITC_isTaskDrained(), ITC_TSK_STOPPING, _ITC_Fork::prm0, _ITC_Fork::prm1, _ITC_Task::state, _ITC_Task::stopPrm, _ITC_Task::stopRtn, and _ITC_Fork::task.
Referenced by ITC_stopTask().