GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LMC / V0-10-1 > lmc / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LMC_prvdefs.h File Reference

LAT Multiplexed Counters private control structures. More...

#include <LMC_macro_p.h>
#include <LMC_lem_p.h>
#include <LMC/LMC_pubdefs.h>
#include <LMC/LMC_cmddefs.h>
#include <LEM/list_structs.h>
#include <ITC/ITC_pubdefs.h>
#include <IMM/FPM_pubdefs.h>
#include <PBS/RW.ih>
#include <PBS/WUT_tmr.h>
#include <PBS/WCT.h>
#include <PBS/SEM.h>
#include <PBS/FPA.h>
#include <TRD/TRD_pubdefs.h>

Classes

struct  _LMC_reset_valid_bf
 Bitfield definition of turbo-reset command validity. More...
union  _LMC_reset_valid
 Union for turbo-reset command validity. More...
struct  _LMC_Reset_Row
 Structure to hold the LMC reset cache block. More...
struct  _LMC_Reset
 Structure to hold LMC Turbo reset miscelany. More...
struct  _LMC_Counter
 Structure to hold an LMC counter control block. More...
struct  _LMC_Control
 Structure to hold the LMC main control block. More...

Defines

#define LMC_K_RESET_FORMAT_0   (0)
 Turbo Reset Database format version number.

Typedefs

typedef enum _LMC_ControlState LMC_ControlState
 LMC control states.
typedef enum _LMC_CmdOpcode LMC_CmdOpcode
 LMC telecommand opcodes.
typedef struct _LMC_Control LMC_Control
 Forward definition of main control block.
typedef struct _LMC_Counter LMC_Counter
 Forward definition of counter control block.
typedef unsigned int LMC_DecodeFn (LMC_Counter *cnt)
 Register read decode function.
typedef struct _LMC_reset_valid_bf LMC_reset_valid_bf
 Bitfield definition of turbo-reset command validity.
typedef union _LMC_reset_valid LMC_reset_valid
 Union for turbo-reset command validity.
typedef struct _LMC_Reset_Row LMC_Reset_Row
 Structure to hold the LMC reset cache block.
typedef struct _LMC_Reset LMC_Reset
 Structure to hold LMC Turbo reset miscelany.

Enumerations

enum  {
  N_TICK_USEC = 20,
  N_NSEC_TICK = 50,
  TICK_LIMIT = 0x01000000,
  TICK_MASK = TICK_LIMIT - 1,
  LMC_CNT_FOREVER = -1,
  LMC_MIN_INTERVAL = 50,
  LMC_STOP_TIMEOUT = 2,
  LMC_NUM_PKTS = 20,
  LMC_PKT_SIZE = 480,
  LMC_NUM_DGMS = 8
}
 Miscellaneous constants. More...
enum  {
  LMC_K_NUM_RCMDS = 5,
  LMC_K_RCMD_CAL = 0,
  LMC_K_RCMD_TKR = 1,
  LMC_K_RCMD_ACDP = 2,
  LMC_K_RCMD_ACDA = 3,
  LMC_K_RCMD_DT = 4,
  LMC_K_RCMD_DELAY = 5
}
 Constants used for Turbo-reset. More...
enum  _LMC_ControlState {
  LMC_CTL_UNINITIALIZED = 0,
  LMC_CTL_INITIALIZING = 1,
  LMC_CTL_DEINITIALIZING = 2,
  LMC_CTL_INITIALIZED = 3,
  LMC_CTL_STARTING = 4,
  LMC_CTL_STARTED = 5,
  LMC_CTL_STOPPING = 6,
  LMC_CTL_BROKEN = 7
}
 LMC control states. More...
enum  _LMC_CmdOpcode {
  LMC_OP_ALL = 0,
  LMC_OP_CAL = 1,
  LMC_OP_TKR = 2,
  LMC_OP_TILE_PAIR = 3,
  LMC_OP_TILE_ALL = 4,
  LMC_OP_DEAD = 5
}
 LMC telecommand opcodes. More...

Functions

unsigned int LMC_decodeAcd (LMC_Counter *cnt)
 ACD tile data decode routine.
unsigned int LMC_decodeCal (LMC_Counter *cnt)
 CAL data decode routine.
unsigned int LMC_decodeDead (LMC_Counter *cnt)
 TEM deadtime data decode routine.
unsigned int LMC_decodeTkr (LMC_Counter *cnt)
 TKR data decode routine.
unsigned int LMC_freeBuffer (LMC_Counter *cnt)
 Free a telemetry data buffer.
unsigned int LMC_getBuffer (LMC_Counter *cnt)
 Get a buffer for telemetry data.
LMC_ControlLMC_getCtrl (void)
 Get the control block address.
void LMC_sendLastPkt (LMC_Counter *cnt)
 Send the last packet of a set of data.


Detailed Description

LAT Multiplexed Counters private control structures.

Author:
S.Maldonado & Owen Saxton
Id
LMC_prvdefs.h,v 1.11 2011/03/28 18:04:56 saxton Exp

Enumeration Type Documentation

anonymous enum

Miscellaneous constants.

Enumerator:
N_TICK_USEC  Number of ticks in a microsecond.
N_NSEC_TICK  Number of nanoseconds in a tick.
TICK_LIMIT  Tick counter limit (2 ** 24).
TICK_MASK  Mask for tick counter.
LMC_CNT_FOREVER  Count forever.
LMC_MIN_INTERVAL  Minimum sample interval in milliseconds.
LMC_STOP_TIMEOUT  Counter stop timeout in seconds.
LMC_NUM_PKTS  Number of diagnostic packets in pool.
LMC_PKT_SIZE  Maximum diagnostic packet size.
LMC_NUM_DGMS  Number of science datagrams in pool.

anonymous enum

Constants used for Turbo-reset.

Enumerator:
LMC_K_NUM_RCMDS  Maximum number of TRD commands.
LMC_K_RCMD_CAL  Index used for CAL LRS command.
LMC_K_RCMD_TKR  Index used for TKR LRS command.
LMC_K_RCMD_ACDP  Index used for ACD Pair LRS command.
LMC_K_RCMD_ACDA  Index used for ACD All LRS command.
LMC_K_RCMD_DT  Index used for Deadtime LRS command.
LMC_K_RCMD_DELAY  Delay for turbo reset commands.

LMC telecommand opcodes.

Enumerator:
LMC_OP_ALL  All counters.
LMC_OP_CAL  CAL low rate science.
LMC_OP_TKR  TKR low rate science.
LMC_OP_TILE_PAIR  ACD tile pair counters.
LMC_OP_TILE_ALL  ACD all tile counters.
LMC_OP_DEAD  TEM deadtime counters.

LMC control states.

Enumerator:
LMC_CTL_UNINITIALIZED  Uninitialized.
LMC_CTL_INITIALIZING  Initializing.
LMC_CTL_DEINITIALIZING  De-initializing.
LMC_CTL_INITIALIZED  Initialized.
LMC_CTL_STARTING  Starting.
LMC_CTL_STARTED  Running.
LMC_CTL_STOPPING  Stopping.
LMC_CTL_BROKEN  Broken (irrecoverable).


Function Documentation

unsigned int LMC_decodeAcd ( LMC_Counter cnt  ) 

unsigned int LMC_decodeCal ( LMC_Counter cnt  ) 

unsigned int LMC_decodeDead ( LMC_Counter cnt  ) 

unsigned int LMC_decodeTkr ( LMC_Counter cnt  ) 

unsigned int LMC_freeBuffer ( LMC_Counter cnt  ) 

Free a telemetry data buffer.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

References _LMC_Counter::ctrl, _LMC_Control::dtx_fcb, _LMC_Control::stx_fcb, _LMC_Counter::tlm_buff, and _LMC_Counter::use_ssr.

Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_sendLastPkt(), LMC_tem_deadtime(), and LMC_tkr_lrs().

unsigned int LMC_getBuffer ( LMC_Counter cnt  ) 

Get a buffer for telemetry data.

This routine allocates either a packet buffer or a datagram buffer depending on whether the diagnostic or science data stream is being used.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success
LMC_NODGPKT If diagnostic packet not available
LMC_NOSCIPKT If science datagram not available

References _LMC_Counter::ctrl, _LMC_Control::dtx_fcb, _LMC_Control::hdr_size, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_end, _LMC_Counter::pkt_size, _LMC_Counter::pkt_strt, _LMC_Control::stx_fcb, _LMC_Counter::tlm_buff, and _LMC_Counter::use_ssr.

Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_tem_deadtime(), and LMC_tkr_lrs().

LMC_Control* LMC_getCtrl ( void   ) 

Get the control block address.

Returns:
The address of the control block

Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_stop_count(), LMC_tem_deadtime(), and LMC_tkr_lrs().

void LMC_sendLastPkt ( LMC_Counter cnt  ) 

Send the last packet of a set of data.

This routine sends the last packet of an accumulated set of counter data, if there is a non-empty incomplete one. In addition, If the science stream is being used, the datagram is sent if it is non-empty. Finally, any remaining packet or datagram buffer is freed.

Parameters:
cnt Counter control handle

References LMC_freeBuffer(), and _LMC_Counter::tlm_buff.


Generated on Wed Nov 21 21:32:41 2012 by  doxygen 1.5.8