GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LPA / V6-2-0 > lpa_epu / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LPA_epu.c File Reference

LAT Physics Acquisition EPU command and control. More...

#include <string.h>
#include <stdio.h>
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "ITC/ITC_msgs.h"
#include "IMM/FPM_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "LSF/LSF_reason.h"
#include "LSE/LFR_key.h"
#include "LPA_utils.h"
#include "LPA/LPA_epu.h"
#include "LPA/LPA_siu.h"
#include "LPA/LPA_msgs.h"
#include "LPA/LPA_tlmdefs.h"
#include "LPA_prvdefs.h"
#include "LPA_slvdefs.h"
#include "LPA/LPA_cmddefs.h"
#include "LPA_DB/LPA_DB_schema.h"
#include "LPA_DB/LPA_DB_modes.h"
#include "LPA_inline.ih"
#include "EDS/FFS.h"
#include "CDM/CDM_pubdefs.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "LCBD/LCBD.h"
#include "TRD/TRD_pubdefs.h"

Classes

struct  _LPA_Epu_Reset
 Structure to restore LPA operation after a turbo reset. More...
struct  _LPA_Cfg
 Structure to hold the LPA mode configuration. More...
struct  _LPA_Epu
 Structure to hold the LPA task application control block. More...

Defines

#define LPA_K_EPU_RESET_FORMAT_0   0
 Format of LPA EPU entries in the turbo reset database.

Typedefs

typedef struct
_LPA_Epu_Reset 
LPA_Epu_Reset
 Typedef for struct _LPA_Epu_Reset.
typedef struct _LPA_Cfg LPA_Cfg
 Typedef for struct _LPA_Cfg.
typedef struct _LPA_Epu LPA_Epu
 Typedef for struct _LPA_Epu.

Functions

static unsigned int LPA_epu_proc (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process raw task messages.
static unsigned int LPA_scan_db (CDM_Database *cdb, void *prm)
 Scan for LPA_DB files.
static unsigned int LPA_set_config (void *pay)
 Change the mode handler association.
static unsigned int LPA_set_output (void *pay)
 Change the output stream state.
static unsigned int LPA_set_compress (void *pay)
 Change the data compression level.
static unsigned int LPA_set_grb (void *pay)
 Change the active GRB processor.
static unsigned int LPA_associate (void *pay)
 Associates handler internal configurations with modes.
static unsigned int LPA_start (void *pay, unsigned int time)
 Process start config command.
static unsigned int LPA_stop (void)
 Process stop config command.
static unsigned int LPA_abort (void)
 Process abort command.
static unsigned int LPA_select_mode (unsigned int mode)
 Select the active handler mode.
static unsigned int LPA_swap (unsigned int list)
 Reverse handler list bit order to LSB == bit 0.
static FORK_cb_status LPA_fork_cb (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Process forked task messages.
static unsigned int LPA_fork_msg (unsigned int opcode, void *pay, unsigned int prm)
 Fork a message to the event task.
static unsigned int LPA_send_response (unsigned int opcode, unsigned int siu_stat)
 Send response status message to SIU.
static unsigned int LPA_send_epu_tlm (void)
 Send diagnostic telemetry packet.
unsigned int LPA_epu_init (void)
 Initialize the LPA system.
unsigned int LPA_epu_start (void)
 Start the LPA system.
unsigned int LPA_getRunState ()
 Returns the LPA run state.
void LPA_get_epu_tlm (LPA_EPU0CFG_Tlm *pkt)
 Get current telemetry packet data.
void LPA_cb_epu_reset (unsigned short fmt, unsigned short len, const void *dat)
 Restore LPA epu operation after turbo reset.

Variables

static LPA_Epu Lpa_epu
 The static instance of the LPA task control structure.


Detailed Description

LAT Physics Acquisition EPU command and control.

Author:
S.Maldonado - smaldona@slac.stanford.edu
    CVS $Id: LPA_epu.c,v 1.36 2009/09/15 20:47:35 jgt Exp $
   

Function Documentation

static unsigned int LPA_abort ( void   )  [static]

Process abort command.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_associate ( void *  pay  )  [static]

Associates handler internal configurations with modes.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

void LPA_cb_epu_reset ( unsigned short  fmt,
unsigned short  len,
const void *  dat 
)

Restore LPA epu operation after turbo reset.

Parameters:
fmt (in) Format of global context data
len (in) Length of global context data
dat (in) Global context data

unsigned int LPA_epu_init ( void   ) 

Initialize the LPA system.

Return values:
LPA_SUCCESS Success

static unsigned int LPA_epu_proc ( void *  prm,
const struct _ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len 
) [static]

Process raw task messages.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

unsigned int LPA_epu_start ( void   ) 

Start the LPA system.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static FORK_cb_status LPA_fork_cb ( FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr 
) [static]

Process forked task messages.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_fork_msg ( unsigned int  opcode,
void *  pay,
unsigned int  prm 
) [static]

Fork a message to the event task.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

void LPA_get_epu_tlm ( LPA_EPU0CFG_Tlm pkt  ) 

Get current telemetry packet data.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_getRunState ( void   ) 

Returns the LPA run state.

Return values:
0 No LPA run in progress
1 LPA run in progress

static unsigned int LPA_scan_db ( CDM_Database *  cdb,
void *  prm 
) [static]

Scan for LPA_DB files.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_select_mode ( unsigned int  mode  )  [static]

Select the active handler mode.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_send_epu_tlm ( void   )  [static]

Send diagnostic telemetry packet.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_send_response ( unsigned int  opcode,
unsigned int  siu_stat 
) [static]

Send response status message to SIU.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_set_compress ( void *  pay  )  [static]

Change the data compression level.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_set_config ( void *  pay  )  [static]

Change the mode handler association.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_set_grb ( void *  pay  )  [static]

Change the active GRB processor.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_set_output ( void *  pay  )  [static]

Change the output stream state.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_start ( void *  pay,
unsigned int  time 
) [static]

Process start config command.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_stop ( void   )  [static]

Process stop config command.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_swap ( unsigned int  list  )  [static]

Reverse handler list bit order to LSB == bit 0.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success


Generated on Tue Sep 15 14:09:40 2009 by  doxygen 1.5.3