GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCS / V1-5-0

Constituent: lcs     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LRX_control.c File Reference

Basic control of CPU to CPU communications receivers. More...

#include <string.h>
#include "PBS/FFS.ih"
#include "PBS/MBA.h"
#include "PBS/FPA.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD_drv.h"
#include "LCBD/LCBD_evt.h"
#include "LCBD/LCBD_nut.h"
#include "LCS/LCS_pubdefs.h"
#include "LCS/LCS_msgs.h"
#include "LCS_prvdefs.h"

Include dependency graph for LRX_control.c:


Functions

static unsigned int checkState (LCS_ControlState creq, LCS_ServiceState sreq, const char *func)
 Check the state of master and service control blocks.
static unsigned int createEngines (LRX_Service *lrx, ITC_NodeID nid, unsigned int want)
 Create a set of receive engines for one node.
static unsigned int createTasks (LRX_Service *lrx, ITC_TaskID rst, ITC_TaskID evt, ITC_TaskID nut)
 Create the LCB driver tasks.
static unsigned int deleteEngines (LRX_Service *lrx, ITC_NodeID nid, unsigned int want)
 Delete a set of queues.
static void deleteTasks (LRX_Service *lrx)
 Delete the LCB driver tasks.
static unsigned int startTasks (LRX_Service *lrx, TASK_attr *rst, TASK_attr *evt, TASK_attr *nut)
 Start the LCB driver tasks.
static void stopTasks (LRX_Service *lrx)
 Stop the LCB driver tasks.
unsigned int LRX_createService (ITC_TaskID rst, ITC_TaskID evt, ITC_TaskID nut)
 Create and initialize LRX services.
unsigned int LRX_deleteService ()
 Delete the LTX service task and associated resources.
unsigned int LRX_setAlloc (LRX_cb_Alloc *rtn)
 Set the allocation plug-in.
unsigned int LRX_startService (TASK_attr *rst, TASK_attr *evt, TASK_attr *nut)
 Start the LCB service tasks and configure LCB to use them.
unsigned int LRX_stopService (LRX_cb_Stop *rtn, void *prm)
 Stop the LRX service.

Detailed Description

Basic control of CPU to CPU communications receivers.

CVS $Id: LRX_control.c,v 1.5 2006/10/26 02:08:50 apw Exp $
Author:
A.P.Waite

Function Documentation

static unsigned int checkState LCS_ControlState  creq,
LCS_ServiceState  sreq,
const char *  func
[inline, static]
 

Check the state of master and service control blocks.

Parameters:
creq (in) Required state of LCS master control block
sreq (in) Required state of LRX service control block
func (in) Name of function calling this routine
Return values:
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_SVCHNDL LRX service control block does not exist
LCS_SVCSTAT LRX 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 LCS_SUCCESS, otherwise it generates a message and returns with a non-LCS_SUCCESS message.

Warning:
If successful, the master control block will be returned with the mutex locked. Any failure and the mutex is returned unlocked.

static unsigned int createEngines LRX_Service lrx,
ITC_NodeID  nid,
unsigned int  want
[static]
 

Create a set of receive engines for one node.

Parameters:
lrx LRX service handle
nid ITC node which this block of engines serves
want Mask of engines to create
Return values:
have Mask of engines created (may not be all of them)

static unsigned int createTasks LRX_Service lrx,
ITC_TaskID  rst,
ITC_TaskID  evt,
ITC_TaskID  nut
[inline, static]
 

Create the LCB driver tasks.

Parameters:
lrx (in) The LRX control block
rst (in) Task ID for "result" task (command/response fabric)
evt (in) Task ID for "event: task (event fabric)
nut (in) Task ID for "nut" task (change of LCB state)
Return values:
LCS_SUCCESS Success

static unsigned int deleteEngines LRX_Service lrx,
ITC_NodeID  nid,
unsigned int  want
[static]
 

Delete a set of queues.

Parameters:
lrx LRX service handle
nid ITC node which this block of engines serves
want Mask of engines to delete
Return values:
have Mask of queues deleted (may not be all of them)

static void deleteTasks LRX_Service lrx  )  [static]
 

Delete the LCB driver tasks.

Parameters:
lrx (in) The LRX control block

unsigned int LRX_createService ITC_TaskID  rst,
ITC_TaskID  evt,
ITC_TaskID  nut
 

Create and initialize LRX services.

Parameters:
rst (in) Task ID for "result" task (command/response fabric)
evt (in) Task ID for "event: task (event fabric)
nut (in) Task ID for "nut" task (change of LCB state)
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT Invalid control state for this operation
LCS_NOTINIT LCS master control block does not exist
LCS_RXCBEXST LRX control block already exists
LCS_RXNGNINI Cannot create LRX receive engines
LCS_SUCCESS Success
LRX_createService() creates and intializes LRX services

unsigned int LRX_deleteService void   ) 
 

Delete the LTX service task and associated resources.

Return values:
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_SVCHNDL LRX service control block does not exist
LCS_SVCSTAT LRX service control block not in requested state
LRX_deleteService() deletes the LRX service task and associated resources.

unsigned int LRX_setAlloc LRX_cb_Alloc rtn  ) 
 

Set the allocation plug-in.

Parameters:
rtn (in) LRX allocation plug-in
Return values:
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_SVCHNDL LRX service control block does not exist
LCS_SVCSTAT LRX service control block not in requested state
LRX_setAlloc() changes the allocation plug-in

unsigned int LRX_startService TASK_attr *  rst,
TASK_attr *  evt,
TASK_attr *  nut
 

Start the LCB service tasks and configure LCB to use them.

Parameters:
rst (in) Task attributes for "result" task (command/response fabric)
evt (in) Task attributes for "event: task (event fabric)
nut (in) Task attributes for "nut" task (change of LCB state)
Return values:
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_SVCHNDL LRX service control block does not exist
LCS_SVCSTAT LRX service control block not in requested state
LRX_startService() starts the LCB service tasks, and configures the protocol 2 and 3 handlers for the "event" task.

unsigned int LRX_stopService LRX_cb_Stop rtn,
void *  prm
 

Stop the LRX service.

Parameters:
rtn (in) LRX service stop callback routine
prm (in) LRX service stop callback routine parameter
Return values:
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_SVCHNDL LRX service control block does not exist
LCS_SVCSTAT LRX service control block not in requested state
LRX_stopService() starts the process of draining the LRX service.

static unsigned int startTasks LRX_Service lrx,
TASK_attr *  rst,
TASK_attr *  evt,
TASK_attr *  nut
[static]
 

Start the LCB driver tasks.

Parameters:
lrx (in) The LRX control block
rst (in) Task ID for "result" task (command/response fabric)
evt (in) Task ID for "event: task (event fabric)
nut (in) Task ID for "nut" task (change of LCB state)
Return values:
LCS_SUCCESS Success

static void stopTasks LRX_Service lrx  )  [static]
 

Stop the LCB driver tasks.

Parameters:
lrx (in) The LRX control block
Return values:
LCS_SUCCESS Success


Generated on Thu Oct 26 16:32:03 2006 by  doxygen 1.4.4