GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LPA / V6-2-1 > lpa_siu / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LPA_siu.c File Reference

LAT Physics Acquisition SIU command and control functions. More...

#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include "PBS/MBA.h"
#include "PBS/WUT.h"
#include "PBS/WCT.h"
#include "PBS/TOV.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "IMM/FPM_pubdefs.h"
#include "LCBD/LCBD.h"
#include "LCS/LCS_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "LPA/LPA_cmdxtrn.h"
#include "LPA/LPA_cmddefs.h"
#include "LPA/LPA_tlmdefs.h"
#include "LPA/LPA_msgs.h"
#include "LPA/LPA_siu.h"
#include "LPA_prvdefs.h"
#include "LPA_siu_p.h"
#include "LPA_inline.ih"
#include "LPA_utils.h"
#include "LPA_DB/LPA_DB_modes.h"
#include "LEM/list.h"
#include "LEM/list_structs.h"
#include "LEM/decode.h"
#include "LCFG/LCFG.h"

Functions

static unsigned int LPA_proc_ctl (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process raw task messages from the ctl queue.
static unsigned int LPA_proc_bulk (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process raw task messages from the bulk queue.
static unsigned int LPA_send_cpus (unsigned short fcode, unsigned int cpus, ITC_TaskID tid, ITC_QueueID qid, void *pay, unsigned int size, unsigned int ack)
 Send a message to cpus.
static unsigned int LPA_send_lim (unsigned int fcode, unsigned int epu_stat)
 Send a message to LIM.
static unsigned int LPA_cpu_response (ITC_NodeID node, LPA_MsgHdr *mhdr)
 Gather cpu response messages and send LIM ack.
static unsigned int LPA_cpu_complete (void)
 Process a cpu response completion.
static unsigned int LPA_cpu_error (void)
 Process a cpu response failure from timeout or error status.
static WUT_cb_status LPA_wut_cb (void *ptr, WUT_tmr *wut)
 The cpu response timeout callback routine.
static unsigned int LPA_cfg_ebm (void)
 Configure the EBM destination enables register.
static unsigned int LPA_latc (unsigned int file, unsigned int ignore, unsigned int consign, unsigned int *key)
 Configure the instrument with LATC (LCFG).
static unsigned int LPA_proc_start (void *pay)
 Process a start run command.
static unsigned int LPA_set_default (void *pay)
 Set start run parameter defaults.
static unsigned int LPA_set_grb (void *pay)
 Set GRB processing parameters.
static unsigned int LPA_start_run (void)
 Start physics run.
static unsigned int LPA_stop_run (void)
 Stop physics run.
static unsigned int LPA_stop_complete (void)
 Stop completion of physics run.
static unsigned int LPA_send_siu_tlm (void)
 Send diagnostic telemetry packet.
unsigned int LPA_siu_init (void)
 Initialize the LPA system on the SIU.
unsigned int LPA_siu_start (void)
 Start the LPA system.
unsigned int LPA_proc_cmd (unsigned short fcode, void *pay)
 Process and dispatch commands.
unsigned int LPA_set_mode (unsigned int mode)
 Set current mode.
void LPA_get_siu_tlm (LPA_SIUCFG_Tlm *pkt)
 Get current telemetry packet data.
unsigned int LPA_gbm_int (void)
 Notify LPA of a GBM interrupt.
void LPA_cb_siu_reset (unsigned short fmt, unsigned short len, const void *dat)
 Restore LPA siu operation after turbo reset.

Variables

LPA_Siu Lpa_siu
 The static instance of the LPA task control structure.


Detailed Description

LAT Physics Acquisition SIU command and control functions.

Author:
S.Maldonado - smaldona@slac.stanford.edu
    CVS $Id: LPA_siu.c,v 1.37 2010/05/21 17:50:47 saxton Exp $
   

Function Documentation

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

Restore LPA siu operation after turbo reset.

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

static unsigned int LPA_cfg_ebm ( void   )  [static]

Configure the EBM destination enables register.

Return values:
LPA_GENERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_cpu_complete ( void   )  [static]

Process a cpu response completion.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_cpu_error ( void   )  [static]

Process a cpu response failure from timeout or error status.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_cpu_response ( ITC_NodeID  node,
LPA_MsgHdr mhdr 
) [static]

Gather cpu response messages and send LIM ack.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_gbm_int ( void   ) 

Notify LPA of a GBM interrupt.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

void LPA_get_siu_tlm ( LPA_SIUCFG_Tlm pkt  ) 

Get current telemetry packet data.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_latc ( unsigned int  file,
unsigned int  ignore,
unsigned int  consign,
unsigned int *  key 
) [static]

Configure the instrument with LATC (LCFG).

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

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

Process raw task messages from the bulk queue.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_proc_cmd ( unsigned short  fcode,
void *  pay 
)

Process and dispatch commands.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

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

Process raw task messages from the ctl queue.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

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

Process a start run command.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_send_cpus ( unsigned short  fcode,
unsigned int  cpus,
ITC_TaskID  tid,
ITC_QueueID  qid,
void *  pay,
unsigned int  size,
unsigned int  ack 
) [static]

Send a message to cpus.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_send_lim ( unsigned int  fcode,
unsigned int  lim_stat 
) [static]

Send a message to LIM.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_send_siu_tlm ( void   )  [static]

Send diagnostic telemetry packet.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

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

Set start run parameter defaults.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

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

Set GRB processing parameters.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_set_mode ( unsigned int  mode  ) 

Set current mode.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_siu_init ( void   ) 

Initialize the LPA system on the SIU.

Return values:
LPA_SUCCESS Success

unsigned int LPA_siu_start ( void   ) 

Start the LPA system.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_start_run ( void   )  [static]

Start physics run.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_stop_complete ( void   )  [static]

Stop completion of physics run.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_stop_run ( void   )  [static]

Stop physics run.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static WUT_cb_status LPA_wut_cb ( void *  prm,
WUT_tmr *  wut 
) [static]

The cpu response timeout callback routine.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success


Generated on Fri May 21 10:56:29 2010 by  doxygen 1.5.3