GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LEM / V4-8-0 > lem / sun-gcc
#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 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. |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
unsigned LEM_get_read_to | ( | void | ) |
Retained for backward compatibility.
void LEM_set_load_to | ( | unsigned | timeout | ) |
Retained for backward compatibility.
timeout | Ignored |
void LEM_set_read_to | ( | unsigned | timeout | ) |
Retained for backward compatibility.
timeout | Ignored |
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.
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.
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.
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.
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.
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.
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.
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.
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 |