\hypertarget{encode_8h}{
\section{encode.h File Reference}
\label{encode_8h}\index{encode.h@{encode.h}}
}
Routines for filling the payload of a LATp command.  


{\tt \#include $<$LEM/encode\_\-structs.h$>$}\par
{\tt \#include $<$LEM/defs.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{encode_8h_f353ea5ea2afc860967e92ff747c9dc4}{LEM\_\-set\_\-load\_\-to} (unsigned timeout)
\begin{CompactList}\small\item\em Retained for backward compatibility. \item\end{CompactList}\item 
void \hyperlink{encode_8h_5cc4d4abf6c53eb68eb8343fe9edf0d0}{LEM\_\-set\_\-read\_\-to} (unsigned timeout)
\begin{CompactList}\small\item\em Retained for backward compatibility. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8h_341b21cea019829640a1e1e1f7b45a8e}{LEM\_\-get\_\-load\_\-to} (void)
\begin{CompactList}\small\item\em Retained for backward compatibility. \item\end{CompactList}\item 
unsigned \hyperlink{encode_8h_687f4fb7b1eb0c2c9fbd99c1795b44f1}{LEM\_\-get\_\-read\_\-to} (void)
\begin{CompactList}\small\item\em Retained for backward compatibility. \item\end{CompactList}\item 
void \hyperlink{encode_8h_cb4df8451e64ab2c18d099c10cb168a2}{TEM\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the common controller block of a TEM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_edc9ffa8bfe7b2b909b5072b36712ff2}{TIC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the TIC block of a TEM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_2f1131c1f1791ae42786fa17d56deac0}{CCC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned ccc, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a CCC. \item\end{CompactList}\item 
void \hyperlink{encode_8h_d890e743b8f34ce6e1bbd6adf91a98c0}{CRC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned ccc, unsigned crc, unsigned reg, unsigned short payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a CRC. \item\end{CompactList}\item 
void \hyperlink{encode_8h_2a32bb12ee55728d4a4f2d51fb7c22ab}{CFE\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned ccc, unsigned crc, unsigned cfe, unsigned reg, unsigned short payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a CFE. \item\end{CompactList}\item 
void \hyperlink{encode_8h_22561a364f708b7c5129f17438137d98}{TCC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned tcc, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a TCC. \item\end{CompactList}\item 
void \hyperlink{encode_8h_9e5384b0a4f715434b56a29f50b5a6fc}{TRC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned tcc, unsigned trc, unsigned reg, unsigned long long payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a TRC. \item\end{CompactList}\item 
void \hyperlink{encode_8h_693943a422ca6c5acd7ec226fe44e295}{TFE\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned tcc, unsigned trc, unsigned tfe, unsigned reg, unsigned long long payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at a TFE. \item\end{CompactList}\item 
void \hyperlink{encode_8h_4d224407869c9ff9993f8739ed5b352b}{TDC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned tcc, unsigned trc, unsigned tfe, unsigned long long payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the DAC register of a TFE. \item\end{CompactList}\item 
void \hyperlink{encode_8h_6d34ba143bb7c3d19e0a635644d52172}{AEM\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the common controller block of the AEM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_a19d2b93fdfedd8c7915e8b08ef13f7a}{AEM\_\-ENV\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned long long payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the Environment block of the AEM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_07f182ca0cfc1f83139a444758fd5faf}{ARC\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned arc, unsigned reg, unsigned short payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at an ARC. \item\end{CompactList}\item 
void \hyperlink{encode_8h_9aed5f142e32fef3b127b5c118624497}{AFE\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned arc, unsigned afe, unsigned reg, unsigned short payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at an AFE. \item\end{CompactList}\item 
void \hyperlink{encode_8h_dd4b0d9082de0a085699b1a42a0d1e47}{PDU\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the common controller of the PDU. \item\end{CompactList}\item 
void \hyperlink{encode_8h_5946e32ddbdc7e6034951b51b34a4ad4}{PDU\_\-ENV\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the environment block of the PDU. \item\end{CompactList}\item 
void \hyperlink{encode_8h_21f9e48a9daf33a8c18d413a1f50d3b8}{CRU\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the CRU. \item\end{CompactList}\item 
void \hyperlink{encode_8h_c5851f33d9fa91eafa34dd2796b903e5}{EBM\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the common controller block of the EBM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_945882e702fdcd99e306514646971b40}{EBM\_\-STAT\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the statistics block of the EBM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_d48ffe73bee8c492ecff92a14b03b36e}{GEM\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_cde73769388f45437c894984ee9c217e}{LEM\_\-FUNCTION} function, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, \hyperlink{defs_8h_f40e115a64f47c64591efbbb643e5203}{LEM\_\-REG\_\-BLK} blk, unsigned reg, unsigned payload)
\begin{CompactList}\small\item\em Create a LATp command targeted at the GEM. \item\end{CompactList}\item 
void \hyperlink{encode_8h_9af980351e470040bbf7acacb3bffbf5}{LAM\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr)
\begin{CompactList}\small\item\em Create a look-at-me command. \item\end{CompactList}\item 
void \hyperlink{encode_8h_85e2481e2f6922b7a85bad5d1acc6306}{LAM\_\-LCB\_\-encode} (\hyperlink{structLEM__ci}{LEM\_\-ci} $\ast$cmd, \hyperlink{defs_8h_0f0f839d6e640f99e1fcfe0a4c548dff}{LEM\_\-LATP\_\-ADDR} addr, unsigned value, unsigned enable\_\-mask)
\begin{CompactList}\small\item\em Create a look-at-me command targetted at an LCB. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Routines for filling the payload of a LATp command. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
{\bf \$Id:} \hyperlink{encode_8h}{encode.h},v 1.12 2011/03/25 18:51:52 apw Exp \$ 

\subsection{Function Documentation}
\hypertarget{encode_8h_6d34ba143bb7c3d19e0a635644d52172}{
\index{encode.h@{encode.h}!AEM\_\-encode@{AEM\_\-encode}}
\index{AEM\_\-encode@{AEM\_\-encode}!encode.h@{encode.h}}
\subsubsection[{AEM\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_6d34ba143bb7c3d19e0a635644d52172}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical address of the AEM\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with the load command \end{description}
\end{Desc}


References AEM\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_a19d2b93fdfedd8c7915e8b08ef13f7a}{
\index{encode.h@{encode.h}!AEM\_\-ENV\_\-encode@{AEM\_\-ENV\_\-encode}}
\index{AEM\_\-ENV\_\-encode@{AEM\_\-ENV\_\-encode}!encode.h@{encode.h}}
\subsubsection[{AEM\_\-ENV\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void AEM\_\-ENV\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned long long {\em payload})}}
\label{encode_8h_a19d2b93fdfedd8c7915e8b08ef13f7a}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the AEM\item[{\em reg}]The ID of the target register\item[{\em payload}]64 bits of data to send with the load command \end{description}
\end{Desc}


References AEM\_\-ENV\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_9aed5f142e32fef3b127b5c118624497}{
\index{encode.h@{encode.h}!AFE\_\-encode@{AFE\_\-encode}}
\index{AFE\_\-encode@{AFE\_\-encode}!encode.h@{encode.h}}
\subsubsection[{AFE\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void AFE\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em arc}, \/  unsigned {\em afe}, \/  unsigned {\em reg}, \/  unsigned short {\em payload})}}
\label{encode_8h_9aed5f142e32fef3b127b5c118624497}


Create a LATp command targeted at an AFE. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of ACD\_\-CMD\_\-READ, ACD\_\-CMD\_\-LOAD, ACD\_\-CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the AEM\item[{\em arc}]The ID of the target ARC, or BCAST to broadcast to all the ARCs\item[{\em afe}]The ID of the target AFE, or BCAST to broadcast to all the AFEs\item[{\em reg}]The ID of the target register\item[{\em payload}]16 bits of data to send with a load command \end{description}
\end{Desc}


References AFE\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_07f182ca0cfc1f83139a444758fd5faf}{
\index{encode.h@{encode.h}!ARC\_\-encode@{ARC\_\-encode}}
\index{ARC\_\-encode@{ARC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{ARC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void ARC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em arc}, \/  unsigned {\em reg}, \/  unsigned short {\em payload})}}
\label{encode_8h_07f182ca0cfc1f83139a444758fd5faf}


Create a LATp command targeted at an ARC. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of ACD\_\-CMD\_\-READ, ACD\_\-CMD\_\-LOAD, ACD\_\-CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the AEM\item[{\em arc}]The ID of the target ARC, or BCAST to broadcast to all the ARCs\item[{\em reg}]The ID of the target register\item[{\em payload}]16 bits of data to send with a load command \end{description}
\end{Desc}


References ARC\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_2f1131c1f1791ae42786fa17d56deac0}{
\index{encode.h@{encode.h}!CCC\_\-encode@{CCC\_\-encode}}
\index{CCC\_\-encode@{CCC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{CCC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void CCC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em ccc}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_2f1131c1f1791ae42786fa17d56deac0}


Create a LATp command targeted at a CCC. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em ccc}]The ID of the target CCC, or BCAST to broadcast to all CCCs\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References CCC\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_2a32bb12ee55728d4a4f2d51fb7c22ab}{
\index{encode.h@{encode.h}!CFE\_\-encode@{CFE\_\-encode}}
\index{CFE\_\-encode@{CFE\_\-encode}!encode.h@{encode.h}}
\subsubsection[{CFE\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void CFE\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em ccc}, \/  unsigned {\em crc}, \/  unsigned {\em cfe}, \/  unsigned {\em reg}, \/  unsigned short {\em payload})}}
\label{encode_8h_2a32bb12ee55728d4a4f2d51fb7c22ab}


Create a LATp command targeted at a CFE. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to packe\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em ccc}]The ID of the target CCC, or BCAST to broadcast to all CCCs\item[{\em crc}]The ID of the target CRC, or BCAST to broadcast to all CRCs\item[{\em cfe}]The ID of the target CFE, or BCAST to broadcast to all CFEs\item[{\em reg}]The ID of the target register\item[{\em payload}]16 bits to send with a load command \end{description}
\end{Desc}


References CFE\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_d890e743b8f34ce6e1bbd6adf91a98c0}{
\index{encode.h@{encode.h}!CRC\_\-encode@{CRC\_\-encode}}
\index{CRC\_\-encode@{CRC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{CRC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void CRC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em ccc}, \/  unsigned {\em crc}, \/  unsigned {\em reg}, \/  unsigned short {\em payload})}}
\label{encode_8h_d890e743b8f34ce6e1bbd6adf91a98c0}


Create a LATp command targeted at a CRC. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em ccc}]The ID of the target CCC, or BCAST to broadcast to all CCCs\item[{\em crc}]The ID of the target CRC, or BCAST to broadcast to all CRCs\item[{\em reg}]The ID of the target register\item[{\em payload}]16 bits to send with a load command \end{description}
\end{Desc}


References CRC\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_21f9e48a9daf33a8c18d413a1f50d3b8}{
\index{encode.h@{encode.h}!CRU\_\-encode@{CRU\_\-encode}}
\index{CRU\_\-encode@{CRU\_\-encode}!encode.h@{encode.h}}
\subsubsection[{CRU\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void CRU\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_21f9e48a9daf33a8c18d413a1f50d3b8}


Create a LATp command targeted at the CRU. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References CRU\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_c5851f33d9fa91eafa34dd2796b903e5}{
\index{encode.h@{encode.h}!EBM\_\-encode@{EBM\_\-encode}}
\index{EBM\_\-encode@{EBM\_\-encode}!encode.h@{encode.h}}
\subsubsection[{EBM\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void EBM\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_c5851f33d9fa91eafa34dd2796b903e5}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the EBM\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References EBM\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_945882e702fdcd99e306514646971b40}{
\index{encode.h@{encode.h}!EBM\_\-STAT\_\-encode@{EBM\_\-STAT\_\-encode}}
\index{EBM\_\-STAT\_\-encode@{EBM\_\-STAT\_\-encode}!encode.h@{encode.h}}
\subsubsection[{EBM\_\-STAT\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void EBM\_\-STAT\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_945882e702fdcd99e306514646971b40}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the EBM\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References EBM\_\-STAT\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_d48ffe73bee8c492ecff92a14b03b36e}{
\index{encode.h@{encode.h}!GEM\_\-encode@{GEM\_\-encode}}
\index{GEM\_\-encode@{GEM\_\-encode}!encode.h@{encode.h}}
\subsubsection[{GEM\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void GEM\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  {\bf LEM\_\-REG\_\-BLK} {\em blk}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_d48ffe73bee8c492ecff92a14b03b36e}


Create a LATp command targeted at the GEM. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the GEM\item[{\em blk}]The ID of the register block (one of the GEM\_\-BLK\_\-X from LEM\_\-REG\_\-BLK)\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References GEM\_\-ENCODE, getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_9af980351e470040bbf7acacb3bffbf5}{
\index{encode.h@{encode.h}!LAM\_\-encode@{LAM\_\-encode}}
\index{LAM\_\-encode@{LAM\_\-encode}!encode.h@{encode.h}}
\subsubsection[{LAM\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void LAM\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr})}}
\label{encode_8h_9af980351e470040bbf7acacb3bffbf5}


Create a look-at-me command. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em addr}]Logical LATp address of the target (usually the BCAST address) \end{description}
\end{Desc}


References LEM\_\-ci::header, LAM\_\-ENCODE, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_85e2481e2f6922b7a85bad5d1acc6306}{
\index{encode.h@{encode.h}!LAM\_\-LCB\_\-encode@{LAM\_\-LCB\_\-encode}}
\index{LAM\_\-LCB\_\-encode@{LAM\_\-LCB\_\-encode}!encode.h@{encode.h}}
\subsubsection[{LAM\_\-LCB\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void LAM\_\-LCB\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em value}, \/  unsigned {\em enable\_\-mask})}}
\label{encode_8h_85e2481e2f6922b7a85bad5d1acc6306}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em addr}]Logical LATp address of the target (usually the BCAST address)\item[{\em value}]Value to set the LATp CSR register to\item[{\em enable\_\-mask}]Enable mask for the register write \end{description}
\end{Desc}


References LEM\_\-ci::header, LAM\_\-LCB\_\-ENCODE, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, and LEM\_\-ci::stall.\hypertarget{encode_8h_341b21cea019829640a1e1e1f7b45a8e}{
\index{encode.h@{encode.h}!LEM\_\-get\_\-load\_\-to@{LEM\_\-get\_\-load\_\-to}}
\index{LEM\_\-get\_\-load\_\-to@{LEM\_\-get\_\-load\_\-to}!encode.h@{encode.h}}
\subsubsection[{LEM\_\-get\_\-load\_\-to}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LEM\_\-get\_\-load\_\-to (void)}}
\label{encode_8h_341b21cea019829640a1e1e1f7b45a8e}


Retained for backward compatibility. 

\begin{Desc}
\item[Returns:]0\end{Desc}
\begin{Desc}
\item[Warning:]Function reports the error LCI\_\-NOIMPL and returns 0 \end{Desc}
\hypertarget{encode_8h_687f4fb7b1eb0c2c9fbd99c1795b44f1}{
\index{encode.h@{encode.h}!LEM\_\-get\_\-read\_\-to@{LEM\_\-get\_\-read\_\-to}}
\index{LEM\_\-get\_\-read\_\-to@{LEM\_\-get\_\-read\_\-to}!encode.h@{encode.h}}
\subsubsection[{LEM\_\-get\_\-read\_\-to}]{\setlength{\rightskip}{0pt plus 5cm}unsigned LEM\_\-get\_\-read\_\-to (void)}}
\label{encode_8h_687f4fb7b1eb0c2c9fbd99c1795b44f1}


Retained for backward compatibility. 

\begin{Desc}
\item[Returns:]0\end{Desc}
\begin{Desc}
\item[Warning:]Function reports the error LCI\_\-NOIMPL and returns 0 \end{Desc}
\hypertarget{encode_8h_f353ea5ea2afc860967e92ff747c9dc4}{
\index{encode.h@{encode.h}!LEM\_\-set\_\-load\_\-to@{LEM\_\-set\_\-load\_\-to}}
\index{LEM\_\-set\_\-load\_\-to@{LEM\_\-set\_\-load\_\-to}!encode.h@{encode.h}}
\subsubsection[{LEM\_\-set\_\-load\_\-to}]{\setlength{\rightskip}{0pt plus 5cm}void LEM\_\-set\_\-load\_\-to (unsigned {\em timeout})}}
\label{encode_8h_f353ea5ea2afc860967e92ff747c9dc4}


Retained for backward compatibility. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timeout}]Ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]Function just reports the error LCI\_\-NOIMPL \end{Desc}
\hypertarget{encode_8h_5cc4d4abf6c53eb68eb8343fe9edf0d0}{
\index{encode.h@{encode.h}!LEM\_\-set\_\-read\_\-to@{LEM\_\-set\_\-read\_\-to}}
\index{LEM\_\-set\_\-read\_\-to@{LEM\_\-set\_\-read\_\-to}!encode.h@{encode.h}}
\subsubsection[{LEM\_\-set\_\-read\_\-to}]{\setlength{\rightskip}{0pt plus 5cm}void LEM\_\-set\_\-read\_\-to (unsigned {\em timeout})}}
\label{encode_8h_5cc4d4abf6c53eb68eb8343fe9edf0d0}


Retained for backward compatibility. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timeout}]Ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]Function just reports the error LCI\_\-NOIMPL \end{Desc}
\hypertarget{encode_8h_dd4b0d9082de0a085699b1a42a0d1e47}{
\index{encode.h@{encode.h}!PDU\_\-encode@{PDU\_\-encode}}
\index{PDU\_\-encode@{PDU\_\-encode}!encode.h@{encode.h}}
\subsubsection[{PDU\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_dd4b0d9082de0a085699b1a42a0d1e47}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, PDU\_\-ENCODE, and LEM\_\-ci::stall.\hypertarget{encode_8h_5946e32ddbdc7e6034951b51b34a4ad4}{
\index{encode.h@{encode.h}!PDU\_\-ENV\_\-encode@{PDU\_\-ENV\_\-encode}}
\index{PDU\_\-ENV\_\-encode@{PDU\_\-ENV\_\-encode}!encode.h@{encode.h}}
\subsubsection[{PDU\_\-ENV\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void PDU\_\-ENV\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_5946e32ddbdc7e6034951b51b34a4ad4}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]One of LEM\_\-LATP\_\-ADDR\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, PDU\_\-ENV\_\-ENCODE, and LEM\_\-ci::stall.\hypertarget{encode_8h_22561a364f708b7c5129f17438137d98}{
\index{encode.h@{encode.h}!TCC\_\-encode@{TCC\_\-encode}}
\index{TCC\_\-encode@{TCC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TCC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TCC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em tcc}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_22561a364f708b7c5129f17438137d98}


Create a LATp command targeted at a TCC. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical address of the TEM\item[{\em tcc}]The ID of the target TCC, or BCAST to broadcast to all TCCs\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TCC\_\-ENCODE.\hypertarget{encode_8h_4d224407869c9ff9993f8739ed5b352b}{
\index{encode.h@{encode.h}!TDC\_\-encode@{TDC\_\-encode}}
\index{TDC\_\-encode@{TDC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TDC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TDC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em tcc}, \/  unsigned {\em trc}, \/  unsigned {\em tfe}, \/  unsigned long long {\em payload})}}
\label{encode_8h_4d224407869c9ff9993f8739ed5b352b}


Create a LATp command targeted at the DAC register of a TFE. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em tcc}]The ID of the target TCC, or BCAST to broadcast to all TCCs\item[{\em trc}]The ID of the target TRC, or BCAST to broadcast to all TRCs\item[{\em tfe}]The ID of the target TFE, or BCAST to broadcast to all TFEs\item[{\em payload}]64 bits of data to send with the load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TDC\_\-ENCODE.\hypertarget{encode_8h_cb4df8451e64ab2c18d099c10cb168a2}{
\index{encode.h@{encode.h}!TEM\_\-encode@{TEM\_\-encode}}
\index{TEM\_\-encode@{TEM\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TEM\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TEM\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_cb4df8451e64ab2c18d099c10cb168a2}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TEM\_\-ENCODE.\hypertarget{encode_8h_693943a422ca6c5acd7ec226fe44e295}{
\index{encode.h@{encode.h}!TFE\_\-encode@{TFE\_\-encode}}
\index{TFE\_\-encode@{TFE\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TFE\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TFE\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em tcc}, \/  unsigned {\em trc}, \/  unsigned {\em tfe}, \/  unsigned {\em reg}, \/  unsigned long long {\em payload})}}
\label{encode_8h_693943a422ca6c5acd7ec226fe44e295}


Create a LATp command targeted at a TFE. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em tcc}]The ID of the target TCC, or BCAST to broadcast to all TCCs\item[{\em trc}]The ID of the target TRC, or BCAST to broadcast to all TRCs\item[{\em tfe}]The ID of the target TFE, or BCAST to broadcast to all TFEs\item[{\em reg}]The ID of the target register\item[{\em payload}]64 bits of data to send with the load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TFE\_\-ENCODE.\hypertarget{encode_8h_edc9ffa8bfe7b2b909b5072b36712ff2}{
\index{encode.h@{encode.h}!TIC\_\-encode@{TIC\_\-encode}}
\index{TIC\_\-encode@{TIC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TIC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TIC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em reg}, \/  unsigned {\em payload})}}
\label{encode_8h_edc9ffa8bfe7b2b909b5072b36712ff2}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Ptr to \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em reg}]The ID of the target register\item[{\em payload}]32 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TIC\_\-ENCODE.\hypertarget{encode_8h_9e5384b0a4f715434b56a29f50b5a6fc}{
\index{encode.h@{encode.h}!TRC\_\-encode@{TRC\_\-encode}}
\index{TRC\_\-encode@{TRC\_\-encode}!encode.h@{encode.h}}
\subsubsection[{TRC\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void TRC\_\-encode ({\bf LEM\_\-ci} $\ast$ {\em cmd}, \/  {\bf LEM\_\-FUNCTION} {\em function}, \/  {\bf LEM\_\-LATP\_\-ADDR} {\em addr}, \/  unsigned {\em tcc}, \/  unsigned {\em trc}, \/  unsigned {\em reg}, \/  unsigned long long {\em payload})}}
\label{encode_8h_9e5384b0a4f715434b56a29f50b5a6fc}


Create a LATp command targeted at a TRC. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd}]Pointer to the \hyperlink{structLEM__ci}{LEM\_\-ci} to pack\item[{\em function}]One of CMD\_\-READ, CMD\_\-LOAD, CMD\_\-DATALESS\item[{\em addr}]Logical LATp address of the TEM\item[{\em tcc}]The ID of the target TCC, or BCAST to broadcast to all TCCs\item[{\em trc}]The ID of the target TRC, or BCAST to broadcast to all TRCs\item[{\em reg}]The ID of the target register\item[{\em payload}]64 bits of data to send with a load command \end{description}
\end{Desc}


References getWait(), LEM\_\-ci::header, LCB\_\-HDR\_\-ENCODE, LEM\_\-ci::payload, LEM\_\-ci::stall, and TRC\_\-ENCODE.