GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LMC / V0-9-1

Constituent: lmc     Tag: mv2304


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 "LEM/list_structs.h"
#include "ITC/ITC_pubdefs.h"
#include "IMM/RBM_pubdefs.h"
#include "PBS/RW.ih"
#include "PBS/WUT_tmr.h"
#include "PBS/WCT.h"
#include "PBS/SEM.h"
#include "PBS/FPA.h"

Include dependency graph for LMC_prvdefs.h:

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


Data Structures

struct  _LMC_Counter
 Structure to hold an LMC counter control block. More...
struct  _LMC_Control
 Structure to hold the LMC main control block. More...

Typedefs

typedef enum _LMC_ControlState LMC_ControlState
 LMC control states.
typedef enum _LMC_CmdOpcode LMC_CmdOpcode
 LMC telecommand opcodes.
typedef _LMC_Control LMC_Control
 Forward definition of main control block.
typedef _LMC_Counter LMC_Counter
 Forward definition of counter control block.
typedef unsigned int LMC_DecodeFn (LMC_Counter *cnt)
 Register read decode function.

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_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.8 2007/07/20 21:48:58 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.

enum _LMC_CmdOpcode
 

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.

enum _LMC_ControlState
 

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  ) 
 

ACD tile data decode routine.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

unsigned int LMC_decodeCal LMC_Counter cnt  ) 
 

CAL data decode routine.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

unsigned int LMC_decodeDead LMC_Counter cnt  ) 
 

TEM deadtime data decode routine.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

unsigned int LMC_decodeTkr LMC_Counter cnt  ) 
 

TKR data decode routine.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

unsigned int LMC_freeBuffer LMC_Counter cnt  ) 
 

Free a telemetry data buffer.

Parameters:
cnt Counter control handle
Return values:
LMC_SUCCESS Success

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

LMC_Control* LMC_getCtrl void   ) 
 

Get the control block address.

Returns:
The address of the control block

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


Generated on Tue Jul 1 01:18:22 2008 by  doxygen 1.4.4