GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CTS / V2-3-1

Constituent: cts_scp_enet     Tag: linux-gcc


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

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.

Detailed Description

The basic control of the CTDB service layer.

CVS $Id: CTX_control.c,v 1.8 2005/08/05 01:27:28 apw Exp $
Author:
D.L.Wood

A.P.Waite


Function Documentation

static unsigned int checkState CTS_ControlState  creq,
CTX_ServiceState  sreq,
const char *  func
[inline, static]
 

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_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
CTX_deleteTask() deletes an CTX task block and releases the associated resources.

unsigned int CTX_setCmdCallback ITC_cb_Processor *  rtn  ) 
 

Insert a callback in CTX command processing (just before the "send").

Parameters:
rtn (in) Routine to call
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
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.

unsigned int CTX_setTlmCallback ITC_cb_Processor *  rtn  ) 
 

Insert a callback in CTX telemetry processing (just before the "send").

Parameters:
rtn (in) Routine to call
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
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.

unsigned int CTX_startService TASK_attr *  attr  ) 
 

Start the CTX service task.

Parameters:
attr (in) Task attributes
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
CTX_startService() starts the CTX service task.

unsigned int CTX_stopService void   ) 
 

Stop the task implementing the CTX service layer.

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
CTX_stopService() stops the task implementing the CTX service layer.


Variable Documentation

const char * CTX_svc_states[CTX_L_SVC_STATES]
 

Initial value:

{
    "uninitialized",
    "initialized",
    "started"
}
String constants for CTX service block states.


Generated on Sun Jun 14 02:28:15 2009 by  doxygen 1.4.4