GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CTS / V2-3-2 > cts_lcp_enet / sun-gcc
#include <string.h>
#include <PBS/FFS.ih>
#include <PBS/MBA.h>
#include <PBS/MTX.h>
#include <PBS/RW.ih>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <CTS/CTS_pubdefs.h>
#include <CTS/CTS_msgs.h>
#include <CTS_prvdefs.h>
Functions | |
static unsigned int | checkState (CTS_ControlState creq, CTX_ServiceState sreq, const char *func) |
Check the state of master and task control blocks. | |
unsigned int | CTX_createQ (ITC_Task *itc, unsigned int want, void *rtn, void *prm) |
Create a set of queues. | |
unsigned int | CTX_deleteQ (ITC_Task *itc, unsigned int want) |
Delete a set of queues. | |
unsigned int | CTX_deleteService () |
Delete an CTX task block and release the associated resources. | |
unsigned int | CTX_setCmdCallback (ITC_cb_Processor *rtn) |
Insert a callback in CTX command processing (just before the "send"). | |
unsigned int | CTX_setTlmCallback (ITC_cb_Processor *rtn) |
Insert a callback in CTX telemetry processing (just before the "send"). | |
unsigned int | CTX_startService (TASK_attr *attr) |
Start the CTX service task. | |
unsigned int | CTX_stopService () |
Stop the task implementing the CTX service layer. | |
Variables | |
const char * | CTX_svc_states [CTX_L_SVC_STATES] |
String constants for CTX service block states. |
CVS $Id: CTX_control.c,v 1.9 2011/03/28 23:55:14 apw Exp $
static unsigned int checkState | ( | CTS_ControlState | creq, | |
CTX_ServiceState | sreq, | |||
const char * | func | |||
) | [inline, static] |
Check the state of master and task control blocks.
creq | (in) Required state of CTS master control block | |
sreq | (in) Required state of CTX service control block | |
func | (in) Name of function calling this routine |
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References _CTX_Service::chk, CTS_ccb, CTS_ctl_states, _CTS_Control::ctx, _CTS_Control::mtx, _CTX_Service::state, _CTS_Control::state, and _CTX_Service::tid.
Referenced by CRX_deleteService(), CRX_startService(), CRX_stopService(), CTS_deleteDevice(), CTS_startDevice(), CTS_stopDevice(), CTX_deleteService(), CTX_setCmdCallback(), CTX_setTlmCallback(), CTX_startService(), and CTX_stopService().
unsigned int CTX_createQ | ( | ITC_Task * | itc, | |
unsigned int | want, | |||
void * | rtn, | |||
void * | prm | |||
) |
Create a set of queues.
itc | ITC task handle | |
want | Mask of queues to create | |
rtn | Raw routine to attach | |
prm | Raw routine parameter to attach |
have | Mask of queues created (may not be all of them) |
Referenced by CTX_createService().
unsigned int CTX_deleteQ | ( | ITC_Task * | itc, | |
unsigned int | want | |||
) |
Delete a set of queues.
itc | ITC task handle | |
want | Mask of queues to delete |
have | Mask of queues deleted (may not be all of them) |
Referenced by CTX_createService().
unsigned int CTX_deleteService | ( | void | ) |
Delete an CTX task block and release the associated resources.
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References checkState(), _CTX_Service::chk, _CTS_Control::cnt, CTS_ccb, CTS_CTL_INITIALIZED, _CTS_Control::ctx, CTX_SVC_INITIALIZED, CTX_SVC_UNINITIALIZED, _CTX_Service::itc, _CTX_Service::msk, _CTS_Control::mtx, _CTX_Service::nim, _CTX_Service::state, and _CTX_Service::tid.
Referenced by CTS_rundown().
unsigned int CTX_setCmdCallback | ( | ITC_cb_Processor * | rtn | ) |
Insert a callback in CTX command processing (just before the "send").
rtn | (in) Routine to call |
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References checkState(), _CTX_Service::cmd, CTS_ccb, CTS_CTL_INITIALIZED, _CTS_Control::ctx, CTX_SVC_INITIALIZED, and _CTS_Control::mtx.
unsigned int CTX_setTlmCallback | ( | ITC_cb_Processor * | rtn | ) |
Insert a callback in CTX telemetry processing (just before the "send").
rtn | (in) Routine to call |
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References checkState(), CTS_ccb, CTS_CTL_INITIALIZED, _CTS_Control::ctx, CTX_SVC_INITIALIZED, _CTS_Control::mtx, and _CTX_Service::tlm.
unsigned int CTX_startService | ( | TASK_attr * | attr | ) |
Start the CTX service task.
attr | (in) Task attributes |
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References checkState(), CTS_ccb, CTS_CTL_INITIALIZED, _CTS_Control::ctx, CTX_SVC_INITIALIZED, CTX_SVC_STARTED, _CTX_Service::itc, _CTS_Control::mtx, and _CTX_Service::state.
Referenced by CTS_configure().
unsigned int CTX_stopService | ( | void | ) |
Stop the task implementing the CTX service layer.
CTS_CTLSTAT | CTS master control block not in requested state | |
CTS_NOTINIT | CTS master control block does not exist | |
CTS_SUCCESS | Success | |
CTS_SVCSTAT | CTX service control block not in requested state |
References checkState(), CTS_ccb, CTS_CTL_INITIALIZED, _CTS_Control::ctx, CTX_SVC_INITIALIZED, CTX_SVC_STARTED, _CTX_Service::itc, _CTS_Control::mtx, and _CTX_Service::state.
Referenced by CTS_rundown().
const char * CTX_svc_states[CTX_L_SVC_STATES] |
Initial value:
{ "uninitialized", "initialized", "started" }