GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LEM / dev > lem / rad750


Interface   Data Structures   File List   Data Fields   Globals  

encode.h File Reference

Routines for filling the payload of a LATp command. More...

#include <LEM/encode_structs.h>
#include <LEM/defs.h>

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 LATp command 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 LATp command 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 LATp command 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 LATp command 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

Routines for filling the payload of a LATp command.

Author:
James Swain & Owen Saxton
$Id: encode.h,v 1.12 2011/03/25 18:51:52 apw Exp $

Function Documentation

void AEM_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 AEM.

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

References AEM_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the AEM
reg The ID of the target register
payload 64 bits of data to send with the load command

References AEM_ENV_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of ACD_CMD_READ, ACD_CMD_LOAD, ACD_CMD_DATALESS
addr Logical LATp address of the AEM
arc The ID of the target ARC, or BCAST to broadcast to all the ARCs
afe The ID of the target AFE, or BCAST to broadcast to all the AFEs
reg The ID of the target register
payload 16 bits of data to send with a load command

References AFE_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of ACD_CMD_READ, ACD_CMD_LOAD, ACD_CMD_DATALESS
addr Logical LATp address of the AEM
arc The ID of the target ARC, or BCAST to broadcast to all the ARCs
reg The ID of the target register
payload 16 bits of data to send with a load command

References ARC_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
ccc The ID of the target CCC, or BCAST to broadcast to all CCCs
reg The ID of the target register
payload 32 bits of data to send with a load command

References CCC_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
ccc The ID of the target CCC, or BCAST to broadcast to all CCCs
crc The ID of the target CRC, or BCAST to broadcast to all CRCs
cfe The ID of the target CFE, or BCAST to broadcast to all CFEs
reg The ID of the target register
payload 16 bits to send with a load command

References CFE_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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

Create a LATp command targeted at a CRC.

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

References CRC_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
reg The ID of the target register
payload 32 bits of data to send with a load command

References CRU_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the EBM
reg The ID of the target register
payload 32 bits of data to send with a load command

References EBM_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the EBM
reg The ID of the target register
payload 32 bits of data to send with a load command

References EBM_STAT_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the GEM
blk The ID of the register block (one of the GEM_BLK_X from LEM_REG_BLK)
reg The ID of the target register
payload 32 bits of data to send with a load command

References GEM_ENCODE, getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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)

References LEM_ci::header, LAM_ENCODE, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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

References LEM_ci::header, LAM_LCB_ENCODE, LCB_HDR_ENCODE, LEM_ci::payload, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address
reg The ID of the target register
payload 32 bits of data to send with a load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, PDU_ENCODE, and LEM_ci::stall.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr One of LEM_LATP_ADDR
reg The ID of the target register
payload 32 bits of data to send with a load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, PDU_ENV_ENCODE, and LEM_ci::stall.

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

Create a LATp command targeted at a TCC.

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

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TCC_ENCODE.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
tcc The ID of the target TCC, or BCAST to broadcast to all TCCs
trc The ID of the target TRC, or BCAST to broadcast to all TRCs
tfe The ID of the target TFE, or BCAST to broadcast to all TFEs
payload 64 bits of data to send with the load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TDC_ENCODE.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
reg The ID of the target register
payload 32 bits of data to send with a load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TEM_ENCODE.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
tcc The ID of the target TCC, or BCAST to broadcast to all TCCs
trc The ID of the target TRC, or BCAST to broadcast to all TRCs
tfe The ID of the target TFE, or BCAST to broadcast to all TFEs
reg The ID of the target register
payload 64 bits of data to send with the load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TFE_ENCODE.

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 One of CMD_READ, CMD_LOAD, CMD_DATALESS
addr Logical LATp address of the TEM
reg The ID of the target register
payload 32 bits of data to send with a load command

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TIC_ENCODE.

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 LATp command targeted at a TRC.

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

References getWait(), LEM_ci::header, LCB_HDR_ENCODE, LEM_ci::payload, LEM_ci::stall, and TRC_ENCODE.


Generated on Fri Mar 25 12:02:42 2011 by  doxygen 1.5.8