GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCS / V1-2-1

Constituent: lcs     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LTX_control.c File Reference

The basic control of CPU to CPU communications channels. More...

#include <string.h>
#include "PBI/TBD_id.h"
#include "PBS/FFS.ih"
#include "PBS/MBA.h"
#include "PBS/TBD.ih"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCS/LCS_pubdefs.h"
#include "LCS/LCS_msgs.h"
#include "LCS_prvdefs.h"

Include dependency graph for LTX_control.c:

Include dependency graph

Functions

unsigned int checkState (LCS_ControlState creq, ITC_TaskID tid, LCS_ServiceState sreq, const char *func)
 Check the state of master and service control blocks.

unsigned int createEngines (LTX_Service *ltx, unsigned int want)
 Create a set of transmit engines.

unsigned int createQueues (ITC_Task *itc, unsigned int want, void *rtn, void *prm)
 Create a set of ITC queues.

unsigned int createService (ITC_TaskID tid, unsigned int nim, unsigned int qim, unsigned int pgs, unsigned int mto, ITC_cb_Memory *rtn, void *prm)
 Initialize an LTX service control block.

unsigned int deleteEngines (LTX_Service *ltx, unsigned int want)
 Delete a set of queues.

unsigned int deleteQueues (ITC_Task *itc, unsigned int want)
 Delete a set of queues.

void startMeta (void *prm)
 LCB based service task one time initialization (in context of task).

void stopMeta (void *prm)
 LCB based service task one time shutdown (in context of task).

unsigned int LTX_createService (ITC_TaskID tid, unsigned int nim, unsigned int pgs, unsigned int mto, ITC_cb_Memory *rtn, void *prm)
 Create an LTX service task for CPU/CPU communications.

unsigned int LTX_createServiceCPU (ITC_TaskID tid, unsigned int nim, unsigned int pgs, unsigned int mto, ITC_cb_Memory *rtn, void *prm)
 Create an LTX service task for CPU/CPU communications.

unsigned int LTX_createServiceSDI (unsigned int pgs)
 Create an LTX service task for CPU/SDI communications.

unsigned int LTX_deleteService (ITC_TaskID tid)
 Delete the LTX service task and associated resources.

unsigned int LTX_startService (ITC_TaskID tid, TASK_attr *attr)
 Start an LTX communications service task.

unsigned int LTX_stopService (ITC_TaskID tid)
 Stop the task implementing the LCS service layer.


Variables

const LTX_Adapter LTX_adapter [LTX_L_ADAPTERS]
 Instantiations of the protocol adapters.


Detailed Description

The basic control of CPU to CPU communications channels.

CVS $Id: LTX_control.c,v 1.4 2005/09/08 03:54:14 apw Exp $
Author:
A.P.Waite

Function Documentation

unsigned int checkState LCS_ControlState  creq,
ITC_TaskID  tid,
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
tid (in) ITC task ID (from service set of tasks)
sreq (in) Required state of 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 Service control block does not exist
LCS_SVCSTAT 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.

unsigned int createEngines LTX_Service ltx,
unsigned int  want
[static]
 

Create a set of transmit engines.

Parameters:
ltx Service handle
want Mask of engines to create
Return values:
have Mask of engines created (may not be all of them)

unsigned int createQueues ITC_Task *  itc,
unsigned int  want,
void *  rtn,
void *  prm
[static]
 

Create a set of ITC 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 createService ITC_TaskID  tid,
unsigned int  nim,
unsigned int  qim,
unsigned int  pgs,
unsigned int  mto,
ITC_cb_Memory *  rtn,
void *  prm
[static]
 

Initialize an LTX service control block.

Parameters:
tid (in) ITC task ID (from service set of tasks)
nim (in) Mask of ITC nodes served by this service
qim (in) Mask of ITC queues served by this service
pgs (in) Number of 512 byte pages per packet (maximum 7)
mto (in) Message exchange timeout period (microseconds)
rtn (in) Command confirmation memory allocator
prm (in) Command confirmation memory allocator parameter
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_TXCBEXST Task control block already exists
LCS_TXNGNINI Cannot create transmit engines
LCS_TXQUEINI Cannot create queues
LCS_TXSVCID Task id is invalid for an LTX service task
LCS_TXSVCPGS Packet page count out of range
createService() is the real workhorse of service creation. It can create both CPU/CPU services and CPU/SDI services.

Here is the call graph for this function:

unsigned int deleteEngines LTX_Service ltx,
unsigned int  want
[static]
 

Delete a set of queues.

Parameters:
ltx Service handle
want Mask of engines to delete
Return values:
have Mask of engines deleted (may not be all of them)

unsigned int deleteQueues ITC_Task *  itc,
unsigned int  want
[static]
 

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 LTX_createService ITC_TaskID  tid,
unsigned int  nim,
unsigned int  pgs,
unsigned int  mto,
ITC_cb_Memory *  rtn,
void *  prm
 

Create an LTX service task for CPU/CPU communications.

Parameters:
tid (in) ITC task ID (from service set of tasks)
nim (in) Mask of ITC nodes served by this service
pgs (in) Number of 512 byte pages per packet (maximum 7)
mto (in) Message exchange timeout period (nsecs)
rtn (in) Command confirmation memory allocator
prm (in) Command confirmation memory allocator parameter
Warning:
This entry point is depcrecated. Use LTX_createServiceCPU() instead.
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_TXCBEXST Task control block already exists
LCS_TXNGNINI Cannot create transmit engines
LCS_TXQUEINI Cannot create queues
LCS_TXSVCID Task id is invalid for an LTX service task
LCS_TXSVCPGS Packet page count out of range
LTX_createService() creates an LTX service task for CPU/CPU communications.

Here is the call graph for this function:

unsigned int LTX_createServiceCPU ITC_TaskID  tid,
unsigned int  nim,
unsigned int  pgs,
unsigned int  mto,
ITC_cb_Memory *  rtn,
void *  prm
 

Create an LTX service task for CPU/CPU communications.

Parameters:
tid (in) ITC task ID (from service set of tasks)
nim (in) Mask of ITC nodes served by this service
pgs (in) Number of 512 byte pages per packet (maximum 7)
mto (in) Message exchange timeout period (nsecs)
rtn (in) Command confirmation memory allocator
prm (in) Command confirmation memory allocator parameter
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_TXCBEXST Task control block already exists
LCS_TXNGNINI Cannot create transmit engines
LCS_TXQUEINI Cannot create queues
LCS_TXSVCID Task id is invalid for an LTX service task
LCS_TXSVCPGS Packet page count out of range
LTX_createServiceCPU() creates an LTX service task for CPU/CPU communications.

Here is the call graph for this function:

unsigned int LTX_createServiceSDI unsigned int  pgs  ) 
 

Create an LTX service task for CPU/SDI communications.

Parameters:
pgs (in) Number of 512 byte pages per packet (maximum 7)
Return values:
LCS_ALOCFAIL Memory allocation failure
LCS_CTLSTAT LCS master control block not in requested state
LCS_NOTINIT LCS master control block does not exist
LCS_SUCCESS Success
LCS_TXCBEXST Task control block already exists
LCS_TXNGNINI Cannot create transmit engines
LCS_TXQUEINI Cannot create queues
LCS_TXSVCID Task id is invalid for an LTX service task
LCS_TXSVCPGS Packet page count out of range
LTX_createServiceSDI() creates an LTX service task for CPU/SDI communications.

Here is the call graph for this function:

unsigned int LTX_deleteService ITC_TaskID  tid  ) 
 

Delete the LTX service task and associated resources.

Parameters:
tid (in) ITC task ID (from service set of tasks)
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 LTX service control block does not exist
LCS_SVCSTAT LTX service control block not in requested state
LCS_TXSVCID Task id is invalid for an LTX service task
LTX_deleteService() deletes the LTX service task and associated resources.

Here is the call graph for this function:

unsigned int LTX_startService ITC_TaskID  tid,
TASK_attr *  attr
 

Start an LTX communications service task.

Parameters:
tid (in) ITC task ID (from service set of tasks)
attr (in) Task attributes
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 LTX service control block does not exist
LCS_SVCSTAT LTX service control block not in requested state
LCS_TXSVCID Task id is invalid for an LTX service task
LTX_startService() starts a service layer LTX task.

Here is the call graph for this function:

unsigned int LTX_stopService ITC_TaskID  tid  ) 
 

Stop the task implementing the LCS service layer.

Parameters:
tid (in) ITC task ID (from service set of tasks)
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 LTX service control block does not exist
LCS_SVCSTAT LTX service control block not in requested state
LCS_TXSVCID Task id is invalid for an LTX service task
LTX_stopService() stops a service layer LTX task.

Here is the call graph for this function:

void startMeta void *  prm  )  [static]
 

LCB based service task one time initialization (in context of task).

Parameters:
prm (in) User context parameter

void stopMeta void *  prm  )  [static]
 

LCB based service task one time shutdown (in context of task).

Parameters:
prm (in) User context parameter


Variable Documentation

const LTX_Adapter LTX_adapter[LTX_L_ADAPTERS]
 

Initial value:

Instantiations of the protocol adapters.


Generated on Tue Sep 20 21:40:03 2005 by doxygen 1.3.3