GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LEM / V4-4-0

Constituent: lem     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

encode.h File Reference

Fill the payload of a command item with a LATp command. More...

#include "LEM/encode_structs.h"
#include "LEM/defs.h"

Include dependency graph for encode.h:

Include dependency graph

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

Included by dependency graph

Functions

void LEM_set_load_to (unsigned timeout)
 Set the load timout.

void LEM_set_read_to (unsigned timeout)
 Set the read timout.

unsigned LEM_get_load_to (void)
 Get the load timout.

unsigned LEM_get_read_to (void)
 Get the read timout.

void TEM_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp command targeted at the common controller block of a TEM.

void TIC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp command targeted at the TIC block of a TEM.

void CCC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned ccc, unsigned reg, unsigned payload)
 Create a LATp command targeted at a CCC.

void CRC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned ccc, unsigned crc, unsigned reg, unsigned short payload)
 Create a LEM_ci targeted at a CRC.

void CFE_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned ccc, unsigned crc, unsigned cfe, unsigned reg, unsigned short payload)
 Create a LATp command targeted at a CFE.

void TCC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned tcc, unsigned reg, unsigned payload)
 Create a LEM_ci targeted at a TCC.

void TRC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned tcc, unsigned trc, unsigned reg, unsigned long long payload)
 Create a LEM_ci targeted at a TRC.

void TFE_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned tcc, unsigned trc, unsigned tfe, unsigned reg, unsigned long long payload)
 Create a LATp Command targeted at a TFE.

void AEM_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LEM_ci targeted at the common controller block of the AEM.

void AEM_ENV_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned long long payload)
 Create a LATp Command targeted at the Environment block of the AEM.

void ARC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned arc, unsigned reg, unsigned short payload)
 Create a LATp Command targeted at an ARC.

void AFE_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned arc, unsigned afe, unsigned reg, unsigned short payload)
 Create a LATp Command targeted at an AFE.

void PDU_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp Command targeted at the common controller of the PDU.

void PDU_ENV_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp command targeted at the environment block of the PDU.

void CRU_encode (LEM_ci *cmd, LEM_FUNCTION function, unsigned reg, unsigned payload)
 Create a LATp command targeted at the CRU.

void EBM_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp command targeted at the common controller block of the EBM.

void EBM_STAT_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned reg, unsigned payload)
 Create a LATp command targeted at the statistics block of the EBM.

void GEM_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, LEM_REG_BLK blk, unsigned reg, unsigned payload)
 Create a LATp command targeted at the GEM.

void LAM_encode (LEM_ci *cmd, LEM_LATP_ADDR addr)
 Create a look-at-me command.

void LAM_LCB_encode (LEM_ci *cmd, LEM_LATP_ADDR addr, unsigned value, unsigned enable_mask)
 Create a look-at-me command targetted at an LCB.


Detailed Description

Fill the payload of a command item with a LATp command.

Author:
James Swain - jswain@slac.stanford.edu
history 08 Oct 2004: Prepare for first public release. Add history block 13 Oct 2004: Changed #include from list_items to encode_structs

Function Documentation

AEM_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LEM_ci targeted at the common controller block of the AEM.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical address of the AEM
reg should be the ID of the target register
payload 32 bits of data to send with the load command

AEM_ENV_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned long long  payload
 

Create a LATp Command targeted at the Environment block of the AEM.

Parameters:
cmd pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the AEM
reg should be the ID of the target register
payload 64 bits of data to send with the load command

AFE_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  arc,
unsigned  afe,
unsigned  reg,
unsigned short  payload
 

Create a LATp Command targeted at an AFE.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of ACD_CMD_READ, ACD_CMD_LOAD, ACD_CMD_DATALESS
addr Logical LATp address of the AEM
arc should be the ID of the target ARC, or BCAST to broadcast to all the ARCs
afe should be the ID of the target AFE, or BCAST to broadcast to all the AFEs
reg should be the ID of the target register
payload 16 bits of data to send with a load command

ARC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  arc,
unsigned  reg,
unsigned short  payload
 

Create a LATp Command targeted at an ARC.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of ACD_CMD_READ, ACD_CMD_LOAD, ACD_CMD_DATALESS
addr Logical LATp address of the AEM
arc should be the ID of the target ARC, or BCAST to broadcast to all the ARCs
reg should be the ID of the target register
payload 16 bits of data to send with a load command

CCC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  ccc,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at a CCC.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
ccc should be the ID of the target CCC, or BCAST to broadcast to all CCCs
reg should be the ID of the target register
payload 32 bits of data to send with a load command

CFE_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  ccc,
unsigned  crc,
unsigned  cfe,
unsigned  reg,
unsigned short  payload
 

Create a LATp command targeted at a CFE.

Parameters:
cmd Pointer to the LEM_ci to packe
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
ccc should be the ID of the target CCC, or BCAST to broadcast to all CCCs
crc should be the ID of the target CRC, or BCAST to broadcast to all CRCs
cfe should be the ID of the target CFE, or BCAST to broadcast to all CFEs
reg should be the ID of the target register
payload 16 bits to send with a load command

CRC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  ccc,
unsigned  crc,
unsigned  reg,
unsigned short  payload
 

Create a LEM_ci targeted at a CRC.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
ccc should be the ID of the target CCC, or BCAST to broadcast to all CCCs
crc should be the ID of the target CRC, or BCAST to broadcast to all CRCs
reg should be the ID of the target register
payload 16 bits to send with a load command

CRU_encode LEM_ci cmd,
LEM_FUNCTION  function,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the CRU.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
reg should be the ID of the target register
payload 32 bits of data to send with a load command

EBM_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the common controller block of the EBM.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the EBM
reg should be the ID of the target register
payload 32 bits of data to send with a load command

EBM_STAT_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the statistics block of the EBM.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the EBM
reg should be the ID of the target register
payload 32 bits of data to send with a load command

GEM_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
LEM_REG_BLK  blk,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the GEM.

Parameters:
cmd Ptr to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the GEM
blk should be the ID of the register block (one of the GEM_BLK_X from LEM_REG_BLK)
reg should be the ID of the target register
payload 32 bits of data to send with a load command

LAM_encode LEM_ci cmd,
LEM_LATP_ADDR  addr
 

Create a look-at-me command.

Parameters:
cmd Ptr to the LEM_ci to pack
addr Logical LATp address of the target (usually the BCAST address)

LAM_LCB_encode LEM_ci cmd,
LEM_LATP_ADDR  addr,
unsigned  value,
unsigned  enable_mask
 

Create a look-at-me command targetted at an LCB.

Parameters:
cmd Ptr to the LEM_ci to pack
addr Logical LATp address of the target (usually the BCAST address)
value Value to set the LATp CSR register to
enable_mask Enable mask for the register write

unsigned LEM_get_load_to void   ) 
 

Get the load timout.

Returns:
timeout

unsigned LEM_get_read_to void   ) 
 

Get the read timout.

Returns:
timeout

void LEM_set_load_to unsigned  timeout  ) 
 

Set the load timout.

Parameters:
timeout Timeout

void LEM_set_read_to unsigned  timeout  ) 
 

Set the read timout.

Parameters:
timeout Timeout

PDU_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp Command targeted at the common controller of the PDU.

Parameters:
cmd Ptr to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address
reg should be the ID of the target register
payload 32 bits of data to send with a load command

PDU_ENV_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the environment block of the PDU.

Parameters:
cmd Ptr to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr should be one of LEM_LATP_ADDR
reg should be the ID of the target register
payload 32 bits of data to send with a load command

TCC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  tcc,
unsigned  reg,
unsigned  payload
 

Create a LEM_ci targeted at a TCC.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical address of the TEM
tcc should be the ID of the target TCC, or BCAST to broadcast to all TCCs
reg should be the ID of the target register
payload 32 bits of data to send with a load command

TEM_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the common controller block of a TEM.

Parameters:
cmd Ptr to LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
reg should be the ID of the target register
payload 32 bits of data to send with a load command

TFE_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  tcc,
unsigned  trc,
unsigned  tfe,
unsigned  reg,
unsigned long long  payload
 

Create a LATp Command targeted at a TFE.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
tcc should be the ID of the target TCC, or BCAST to broadcast to all TCCs
trc should be the ID of the target TRC, or BCAST to broadcast to all TRCs
tfe should be the ID of the target TFE, or BCAST to broadcast to all TFEs
reg should be the ID of the target register
payload 64 bits of data to send with the load command

TIC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  reg,
unsigned  payload
 

Create a LATp command targeted at the TIC block of a TEM.

Parameters:
cmd Ptr to LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
reg should be the ID of the target register
payload 32 bits of data to send with a load command

TRC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  tcc,
unsigned  trc,
unsigned  reg,
unsigned long long  payload
 

Create a LEM_ci targeted at a TRC.

Parameters:
cmd Pointer to the LEM_ci to pack
function should be one of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
tcc should be the ID of the target TCC, or BCAST to broadcast to all TCCs
trc should be the ID of the target TRC, or BCAST to broadcast to all TRCs
reg should be the ID of the target register
payload 64 bits of data to send with a load command


Generated on Fri Aug 26 20:48:54 2005 by doxygen 1.3.3