GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LEM / V4-5-1

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:

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


Functions

void LEM_set_load_to (unsigned timeout)
 Retained for backward compatibility.
void LEM_set_read_to (unsigned timeout)
 Retained for backward compatibility.
unsigned LEM_get_load_to (void)
 Retained for backward compatibility.
unsigned LEM_get_read_to (void)
 Retained for backward compatibility.
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 TDC_encode (LEM_ci *cmd, LEM_FUNCTION function, LEM_LATP_ADDR addr, unsigned tcc, unsigned trc, unsigned tfe, unsigned long long payload)
 Create a LATp Command targeted at the DAC register of 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

Function Documentation

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

void 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

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.

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

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.

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

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.

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

void 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)

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.

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   ) 
 

Retained for backward compatibility.

Returns:
0
Warning:
Function reports the error LCI_NOIMPL and returns 0

unsigned LEM_get_read_to void   ) 
 

Retained for backward compatibility.

Returns:
0
Warning:
Function reports the error LCI_NOIMPL and returns 0

void LEM_set_load_to unsigned  timeout  ) 
 

Retained for backward compatibility.

Parameters:
timeout Ignored
Warning:
Function just reports the error LCI_NOIMPL

void LEM_set_read_to unsigned  timeout  ) 
 

Retained for backward compatibility.

Parameters:
timeout Ignored
Warning:
Function just reports the error LCI_NOIMPL

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.

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

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.

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

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.

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

void TDC_encode LEM_ci cmd,
LEM_FUNCTION  function,
LEM_LATP_ADDR  addr,
unsigned  tcc,
unsigned  trc,
unsigned  tfe,
unsigned long long  payload
 

Create a LATp Command targeted at the DAC register of 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
payload 64 bits of data to send with the load command

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.

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

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.

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

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.

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

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.

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 Thu Nov 10 21:21:37 2005 by  doxygen 1.4.4