GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-0 > lra / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LRA_process.c File Reference

Routines for processing requests for LRA services. More...

#include "LRA_p.h"
#include "LRA/LRA_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/FPA.h"
#include "PBS/SEM.h"
#include "ITC/ITC_pubdefs.h"
#include <string.h>

Classes

struct  _LRA_parmSend
struct  _LRA_rqstData

Typedefs

typedef struct
_LRA_parmSend 
LRA_parmSend
typedef struct
_LRA_rqstData 
LRA_rqstData

Functions

static unsigned doRequest (LRA_rqstData *rqst)
 Local routine to send a request packet.
static void rqstDone (ITC_QueueItem *qitem, unsigned status, void *prm0, void *prm1, void *prm2, unsigned tx)
 Local routine called after a request has been completed.
unsigned LRA_send (const LRA_regSpec *rSpec)
 Send register values to the spacecraft.
unsigned LRA_sendEsr (void)
 Send the error and status register values to the spacecraft.
unsigned LRA_sendStats (void)
 Send statistics data to the spacecraft.
unsigned LRA_process (void *prm, const ITC_QueueItem *qItem, void *pay, unsigned len)
 Process a received request.


Detailed Description

Routines for processing requests for LRA services.

Because the LRA routines that send data to the spacecraft use internal non-shareable resources, they cannot be called directly by other code runnning on the LAT. They must always be executed within the LRA task. The routines in this module provide a callable interface to queue requests to the LRA task and wait for their completion.

Author:
Owen H Saxton
$Id: LRA_process.c,v 1.6 2009/07/31 22:07:53 saxton Exp $

Function Documentation

unsigned doRequest ( LRA_rqstData *  rqst  )  [static]

Local routine to send a request packet.

This routine queues a request to the LRA task, then waits for its completion.

Parameters:
rqst The address of a request data packet
Return values:
ITC_SENDTID Destination task (LRA) not started
Returns:
The status returned from the request

unsigned LRA_process ( void *  prm,
const ITC_QueueItem *  qItem,
void *  pay,
unsigned  len 
)

Process a received request.

This routine runs within the LRA task and handles the queued raw requests for service.

Parameters:
prm User parameter (not used)
qItem The address of the queue item (not used)
pay The address of the request payload
len The length of the request payload (not used)
Returns:
The return status from the processing
Return values:
LRA_INVFCODE The received function code was invalid

unsigned LRA_send ( const LRA_regSpec rSpec  ) 

Send register values to the spacecraft.

A request is queued to the LRA task to read the specified registers and send them to the spacecraft via the SSR.

Parameters:
rSpec The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used.
Return values:
LRA_SUCCESS The read and send were successful
LRA_INVCMPT Invalid component number
LRA_INVREG Invalid register number
LRA_INVBLOCK Invalid register block number
LRA_INVTEM Invalid TEM number
LRA_INVCC Invalid cable controller number
LRA_INVRC Invalid readout controller number
LRA_INVFE Invalid front-end number
LCBD_RTOERR Operation timed out
ITC_SENDNID Destination node not reachable
ITC_SENDPRX Proxy task for destination node not started
ITC_SENDQID Destination queue not available
ITC_SENDTID Destination task (LRA) not started

unsigned LRA_sendEsr ( void   ) 

Send the error and status register values to the spacecraft.

A request is queued to the LRA task to read the contents of a pre- determined set of LAT error and status registers and send them to the spacecraft via the SSR.

Return values:
LRA_SUCCESS The read and send were successful
ITC_SENDNID Destination node not reachable
ITC_SENDPRX Proxy task for destination node not started
ITC_SENDQID Destination queue not available
ITC_SENDTID Destination task (LRA) not started

unsigned LRA_sendStats ( void   ) 

Send statistics data to the spacecraft.

A request is queued to the LRA task to send the statistics data block to the spacecraft via the SSR.

Return values:
LRA_SUCCESS The statistics were sent successfully
LRA_NOTINIT LRA not initialized
ITC_SENDNID Destination node not reachable
ITC_SENDPRX Proxy task for destination node not started
ITC_SENDQID Destination queue not available
ITC_SENDTID Destination task not started

void rqstDone ( ITC_QueueItem *  qitem,
unsigned  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned  tx 
) [static]

Local routine called after a request has been completed.

This routine is called by ITC after a request has been completed. It stores the return status and wakes the requesting task via a semaphore.


Generated on Fri Jul 31 15:37:09 2009 by  doxygen 1.5.3