GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
CTS / V2-1-0
Constituent: cts_lcp_sumt     Tag: mv2304
Interface Data Structures File List Data Fields Globals
CTX_control.c File Reference
The basic control of the CTDB service layer.
More...
#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"
Include dependency graph for CTX_control.c:
|
Functions |
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.
|
Detailed Description
The basic control of the CTDB service layer.
CVS $Id: CTX_control.c,v 1.7 2005/05/12 01:23:17 apw Exp $
- Author:
- D.L.Wood
A.P.Waite
Function Documentation
|
Check the state of master and task control blocks.
- Parameters:
-
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 |
- Return values:
-
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 |
checkState() is a state integrity checker. It demands that the master control exists and be in state creq, it also demands that the service control block exists and be in state sreq. If these conditions are met, the routine returns CTS_SUCCESS, otherwise it generates a message and returns with a non-CTS_SUCCESS message.
- Warning:
- If successful, the master control block will be returned with the mutex locked. Any failure and the mutex is returned unlocked.
|
unsigned int CTX_createQ |
( |
ITC_Task * |
itc, |
|
|
unsigned int |
want, |
|
|
void * |
rtn, |
|
|
void * |
prm |
|
) |
|
|
|
Create a set of queues.
- Parameters:
-
itc | ITC task handle |
want | Mask of queues to create |
rtn | Raw routine to attach |
prm | Raw routine parameter to attach |
- Return values:
-
have | Mask of queues created (may not be all of them) |
|
unsigned int CTX_deleteQ |
( |
ITC_Task * |
itc, |
|
|
unsigned int |
want |
|
) |
|
|
|
Delete a set of queues.
- Parameters:
-
itc | ITC task handle |
want | Mask of queues to delete |
- Return values:
-
have | Mask of queues deleted (may not be all of them) |
|
unsigned int CTX_deleteService |
( |
void |
|
) |
|
|
|
Delete an CTX task block and release the associated resources.
- Return values:
-
CTS_SUCCESS | Success |
CTS_GENERROR | Generic error |
CTX_deleteTask() deletes an CTX task block and releases the associated resources. |
Here is the call graph for this function:
unsigned int CTX_setCmdCallback |
( |
ITC_cb_Processor * |
rtn |
) |
|
|
|
Insert a callback in CTX command processing (just before the "send").
- Parameters:
-
- Return values:
-
LCS_SUCCESS | Success |
LCS_GENERROR | Generic error |
- Warning:
- This entry point is provided specifically to support tests based on LATTE 4. It is not a general purpose entry point, and if you do not know how and why it was implemented, you should not use it.
CTX_setCmdCallback() inserts the specified routine as a callback in the CTX service just before the telecommand is sent. |
Here is the call graph for this function:
unsigned int CTX_setTlmCallback |
( |
ITC_cb_Processor * |
rtn |
) |
|
|
|
Insert a callback in CTX telemetry processing (just before the "send").
- Parameters:
-
- Return values:
-
LCS_SUCCESS | Success |
LCS_GENERROR | Generic error |
- Warning:
- This entry point is provided specifically to support tests based on LATTE 4. It is not a general purpose entry point, and if you do not know how and why it was implemented, you should not use it.
CTX_setTlmCallback() inserts the specified routine as a callback in the CTX service just before the telemetry is sent. |
Here is the call graph for this function:
unsigned int CTX_startService |
( |
TASK_attr * |
attr |
) |
|
|
|
Start the CTX service task.
- Parameters:
-
attr | (in) Task attributes |
- Return values:
-
LCS_SUCCESS | Success |
LCS_GENERROR | Generic error |
CTX_startService() starts the CTX service task. |
Here is the call graph for this function:
unsigned int CTX_stopService |
( |
void |
|
) |
|
|
|
Stop the task implementing the CTX service layer.
- Return values:
-
LCS_SUCCESS | Success |
LCS_GENERROR | Generic error |
CTX_stopService() stops the task implementing the CTX service layer. |
Here is the call graph for this function:
Variable Documentation
|
Initial value:
{
"uninitialized",
"initialized",
"started"
}
String constants for CTX service block states.
|
Generated on Wed May 11 21:26:07 2005 by
1.3.3