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

Constituent: cts_scp_enet     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

CTS_pubdefs.h File Reference

Public definitions for the CTS package. More...

#include "PBS/TASK.h"
#include "ITC/ITC_pubdefs.h"

Include dependency graph for CTS_pubdefs.h:

This graph shows which files directly or indirectly include this file:


Defines

#define CRX_L_SVC_TYPES   (2)
 Number of CRX service types.

Typedefs

typedef enum _CRX_ServiceType CRX_ServiceType
 Typedef for enum _CRX_ServiceType.
typedef unsigned int CRX_cb_Driver (void *prm, unsigned char *pkt)
 Signature for an callback buried in the CTDB receive task.

Enumerations

enum  _CRX_ServiceType {
  CRX_TYP_CMD = 0,
  CRX_TYP_TLM = 1
}
 Enumeration of CRX service types. More...

Functions

unsigned int CRX_createService (CRX_ServiceType typ, CRX_cb_Driver *rtn, void *prm)
 Create a CTDB (1553) receive service block.
unsigned int CRX_deleteService (CRX_ServiceType typ)
 Delete a CTDB (1553) receive service block.
unsigned int CRX_dispatch (void *prm, unsigned char *pkt)
 Driver level packet dispatch (used in CTDB driver).
unsigned int CRX_startService (CRX_ServiceType typ, TASK_attr *attr)
 Start a CTDB (1553) receive service.
unsigned int CRX_stopService (CRX_ServiceType typ)
 Start a CTDB (1553) receive service.
unsigned int CTS_configure (void)
 Configure the CTDB/CTS system from a CDM configuration database.
unsigned int CTS_createDevice (void *addr)
 Create and initialize a CTDB (1553) device.
unsigned int CTS_deleteDevice (void)
 Delete a CTDB (1553) device.
void * CTS_getDevice (void)
 Return the CTDB (1553) device handle.
unsigned int CTS_initialize (void)
 Initialize the CTS master control block.
unsigned int CTS_rundown (void)
 Run down the CTS tasks/resources configured with CTS_configure().
unsigned int CTS_shutdown (void)
 Shut down the CTS master control block and release resources.
unsigned int CTS_startDevice (void)
 Start a CTDB (1553) device.
unsigned int CTS_stopDevice (void)
 Stop a CTDB (1553) device.
unsigned int CTX_createService (ITC_TaskID tid, unsigned int nim, ITC_cb_Memory *rtn, void *prm)
 Initialize an CTX service control block.
unsigned int CTX_deleteService (void)
 Delete an CTX task block and release the associated resources.
unsigned int CTX_startService (TASK_attr *attr)
 Start the CTX service task.
unsigned int CTX_stopService (void)
 Stop the task implementing the CTX service layer.

Detailed Description

Public definitions for the CTS package.

CVS $Id: CTS_pubdefs.h,v 1.8 2005/08/30 23:32:45 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

enum _CRX_ServiceType
 

Enumeration of CRX service types.

Enumerator:
CRX_TYP_CMD  Service to receive telecommands
CRX_TYP_TLM  Service to receive telemetry


Function Documentation

unsigned int CRX_createService CRX_ServiceType  typ,
CRX_cb_Driver rtn,
void *  prm
 

Create a CTDB (1553) receive service block.

Parameters:
typ (in) Service type (command or telemetry)
rtn (in) Dispatch callback routine
prm (in) Dispatch callback routine parameter
Return values:
CTS_ALOCFAIL Memory allocation failure
CTS_BADSTAT Not in state "uninitialized" (bad state transition)
CTS_MUALOCFL Cannot allocate a mutex
CTS_SUCCESS Success
CRX_createService() allocates and initializes a CTDB (1553) receive service block.

unsigned int CRX_deleteService CRX_ServiceType  typ  ) 
 

Delete a CTDB (1553) receive service block.

Parameters:
typ (in) Service type (command or telemetry)
Return values:
CTS_BADSTAT Not in state "uninitialized" (bad state transition)
CTS_SUCCESS Success
CRX_deleteService() frees resources associated with a CTDB (1553) receive service block.

unsigned int CRX_dispatch void *  prm,
unsigned char *  pkt
 

Driver level packet dispatch (used in CTDB driver).

Parameters:
prm (in) User context parameter
pkt (in) CCSDS telecommand (first byte of primary header)
Return values:
CTS_ALOCFAIL Cannot allocate packet to forward the command
CTS_APIDNOQ Command APID does not map to an ITC queue
CTS_SUCCESS Success
Returns:
Failure in ITC_bind() or ITC_send()
Warning:
This dispatcher can only be used on a LAT SIU. It will fail if it's made the dispatcher on an emulated spacecraft.
CRX_dispatch() is the dispatcher operating inside the CTDB command receive task. If dispatches to an application task based on APID.

unsigned int CRX_startService CRX_ServiceType  typ,
TASK_attr *  attr
 

Start a CTDB (1553) receive service.

Parameters:
typ (in) Service type (command or telemetry)
attr (in) Task attributes
Return values:
CTS_BADSTAT Not in state "initialized" (bad state transition)
CTS_NOTINIT Control block has not been allocated/initialized
CTS_SUCCESS Success
CTS_TASKSTRT Cannot start receive task
CRX_startService() starts a CTDB (1553) receive service

unsigned int CRX_stopService CRX_ServiceType  typ  ) 
 

Start a CTDB (1553) receive service.

Parameters:
typ (in) Service type (command or telemetry)
Return values:
CTS_BADSTAT Not in state "initialized" (bad state transition)
CTS_NOTINIT Control block has not been allocated/initialized
CTS_SUCCESS Success
CTS_TASKSTRT Cannot start receive task
CRX_stopService() stops a CTDB (1553) receive service

unsigned int CTS_configure void   ) 
 

Configure the CTDB/CTS system from a CDM configuration database.

Return values:
CTS_ALOCFAIL Memory allocation failure
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_BADSTAT Not in state "uninitialized" (bad state transition)
CTS_DEVDUP Device already created
CTS_MUALOCFL Cannot allocate a mutex
CTS_NOTINIT CTS master control block does not exist
CTS_QCREATE Cannot create queue
CTS_SUCCESS Success
CTS_SVCHNDL CTS service control block does not exist
CTS_SVCSTAT CTS service control block in wrong state for operation
CTS_TASKSTRT Cannot start receive task
ITC_ALOCFAIL Cannot allocate an ITC_Task object
ITC_CNFRTNAT Command confirmation memory allocator already attached
ITC_CTLSTAT Control block not in state initialized
ITC_NOTINIT ITC control block does not exist
ITC_TASKHNDL Task handle is invalid
ITC_TASKQUEU Cannot create task queues
ITC_TASKSTAT Invalid task state for this operation
ITC_VARNULL NULL variable (pointer) detected
ITC_VARRNG Out of range variable detected
FPM_ALOCFAIL Memory allocation failure
FPM_CTLSTAT FPM control block not in state initialized
FPM_FPAINIT FPA initialization failure
FPM_NOTINIT FPM system not initialized
FPM_PDSCCNT Pool descriptor list size out of range
FPM_PDSCORDR Pool descriptor list not sorted in ascending order
FPM_PDSCPKTN Pool descriptor allocator count below minimum
FPM_PDSCPKTS Pool descriptor allocator size out of range
FPM_PNAMLEN Pool name length out of valid range
FPM_PNAMNULL Pool name is a NULL pointer
FPM_PNAMSNTX Pool name s has invalid syntax
FPM_POOLPTR Pool control block pointer invalid
FPM_POOLSTAT Pool control block not in state initialized
RBM_ALOCFAIL Memory allocation failure
RBM_FPAINIT FPA initialization failure
RBM_NOTINIT RBM system not initialized
RBM_RINGPTR Ring control block pointer invalid
RBM_RINGSTAT Ring control block not in state initialized
RBM_RNAMLEN Ring name length out of valid range
RBM_RNAMNULL Ring name is a NULL pointer
RBM_RNAMSNTX Ring name s has invalid syntax
CTS_configure() creates and starts the CTDB device (either a real 1553 or an ethernet simulation), and the CRX/CTX service tasks.

unsigned int CTS_createDevice void *  addr  ) 
 

Create and initialize a CTDB (1553) device.

Parameters:
addr (in) Address of remote terminal
Return values:
CTS_ALOCFAIL Memory allocation failure
CTS_BADSTAT Not in state "uninitialized" (bad state transition)
CTS_DEVDUP Device already created
CTS_MUALOCFL Cannot allocate a mutex
CTS_SUCCESS Success
CTS_createDevice() creates and initializes a CTDB (1553) device

unsigned int CTS_deleteDevice void   ) 
 

Delete a CTDB (1553) device.

Return values:
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_DEVACTIV Cannot delete, service task still attached
CTS_NOTINIT CTS master control block does not exist
CTS_SUCCESS Success
CTS_SVCHNDL CTS service control block does not exist
CTS_SVCSTAT CTS service control block in wrong state for operation
CTS_deleteDevice() deletes a CTDB (1553) device

void * CTS_getDevice void   ) 
 

Return the CTDB (1553) device handle.

Returns:
The CTDB device handle

unsigned int CTS_initialize void   ) 
 

Initialize the CTS master control block.

Return values:
CTS_ALOCFAIL Memory allocation failure
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_MUALOCFL Cannot allocate a mutex
CTS_SUCCESS Success
CTS_initialize() initializes the CTS master control block.

unsigned int CTS_rundown void   ) 
 

Run down the CTS tasks/resources configured with CTS_configure().

Return values:
CTS_BADSTAT Not in state "initialized" (bad state transition)
CTS_CTLSTAT CTS master control block not in requested state
CTS_DEVACTIV Cannot delete, service task still attached
CTS_NOTINIT CTS master control block does not exist
CTS_SUCCESS Success
CTS_SVCHNDL CTS service control block does not exist
CTS_SVCSTAT CTX service control block not in requested state
CTS_TASKSTRT Cannot start receive task
FPM_POOLPTR Pool control block pointer invalid
FPM_POOLSTAT Pool control block not in state initialized
ITC_CNFRTNDE No command confirmation memory allocator exists to detach
ITC_CTLSTAT Control block not in state initialized
ITC_NOTINIT ITC control block does not exist
ITC_TASKHNDL Task handle is invalid
ITC_TASKMISS Task not in task table
ITC_TASKSTAT Task not in state initialized
RBM_RINGPTR Ring control block pointer invalid
RBM_RINGSTAT Ring control block not in state started
CTS_rundown() uses contextual information gathered during CTS_configure() to run down all the CTS tasks and their associated resources.

unsigned int CTS_shutdown void   ) 
 

Shut down the CTS master control block and release resources.

Return values:
CTS_DEVACTIV Generic error
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_NOTINIT CTS master control block does not exist
CTS_SUCCESS Success
CTS_shutdown() shuts down the CTS master control block and releases assocoated resources

unsigned int CTS_startDevice void   ) 
 

Start a CTDB (1553) device.

Return values:
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_NOTINIT CTS master control block does not exist
CTS_SUCCESS Success
CTS_SVCHNDL CTS service control block does not exist
CTS_SVCSTAT CTS service control block in wrong state for operation
CTS_startDevice() starts a CTDB (1553) device

unsigned int CTS_stopDevice void   ) 
 

Stop a CTDB (1553) device.

Return values:
CTS_CTLSTAT CTS master control block in wrong state for operation
CTS_NOTINIT CTS master control block does not exist
CTS_SUCCESS Success
CTS_SVCHNDL CTS service control block does not exist
CTS_SVCSTAT CTS service control block in wrong state for operation
CTS_stopDevice() stops a CTDB (1553) device

unsigned int CTX_createService ITC_TaskID  tid,
unsigned int  nim,
ITC_cb_Memory *  rtn,
void *  prm
 

Initialize an CTX service control block.

Parameters:
tid (in) ITC task ID for this service
nim (in) Mask of ITC nodes served by this service (not implemented)
rtn (in) Memory allocator for diagnostic stream
prm (in) Memory allocator for diagnostic stream - parameter
Return values:
CTS_SUCCESS Success
CTS_QCREATE Cannot create queue
CTX_createService() creates and intializes an CTX service control block

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_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.


Generated on Tue Oct 25 21:56:57 2005 by  doxygen 1.4.4