\hypertarget{SSRSIM_8h}{
\section{SSRSIM.h File Reference}
\label{SSRSIM_8h}\index{SSRSIM.h@{SSRSIM.h}}
}
Module to simulated SSR data output from ISIS.  


{\tt \#include $<$LCBT/TDATA.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{SSRSIM_8h_a97a731cc2de8321550b190e9c15a126}{SSRSIM\_\-init} (LCBD lcb, int sendTaskPri, int latpAddr, int appId)
\begin{CompactList}\small\item\em init the SSR simulate module \item\end{CompactList}\item 
void \hyperlink{SSRSIM_8h_9daa5822a0c30ae506d2f4c4f5e1ea84}{SSRSIM\_\-release} ()
\begin{CompactList}\small\item\em shutdown the SSR simulate module \item\end{CompactList}\item 
int \hyperlink{SSRSIM_8h_69a5c824600e74ee27315416f27f56c2}{SSRSIM\_\-setParm} (\hyperlink{TDATA_8h_fafb1ba1ffdfa0f77e907069435b6f43}{TDATA\_\-DTEST} dataType, int dataParm, int tDuration, int reqPacketSize, int evtPeriod, int $\ast$actualPacketSize)
\begin{CompactList}\small\item\em Setup and start data simulated SSR data from ISIS. \item\end{CompactList}\item 
void \hyperlink{SSRSIM_8h_b76c5ed829115d343c191e427849504f}{SSRSIM\_\-stop} ()
\begin{CompactList}\small\item\em stop SSR simulate data output \item\end{CompactList}\item 
void \hyperlink{SSRSIM_8h_0e45d77182f8dffc58b1f02fbb326dc1}{SSRSIM\_\-stats} ()
\begin{CompactList}\small\item\em print stats \item\end{CompactList}\item 
void \hyperlink{SSRSIM_8h_84ab4ce83207289ffd847ec8fdb8fc3d}{SSRSIM\_\-statsGetErrors} (int $\ast$timerMiss, int $\ast$dmaErrs, int $\ast$itemErrs, int $\ast$backPresErrs)
\begin{CompactList}\small\item\em get error stats \item\end{CompactList}\item 
void \hyperlink{SSRSIM_8h_2fa6d4d7a193c9c5465a0ad790cb1a03}{SSRSIM\_\-statsReset} ()
\begin{CompactList}\small\item\em reset stats for printing \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Module to simulated SSR data output from ISIS. 

\begin{Desc}
\item[Author:]Ed Bacho - \href{mailto:ebacho@slac.stanford.edu}{\tt ebacho@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}


\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{SSRSIM_8h_a97a731cc2de8321550b190e9c15a126}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-init@{SSRSIM\_\-init}}
\index{SSRSIM\_\-init@{SSRSIM\_\-init}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-init (LCBD {\em lcb}, \/  int {\em sendTaskPri}, \/  int {\em latpAddr}, \/  int {\em appId})}}
\label{SSRSIM_8h_a97a731cc2de8321550b190e9c15a126}


init the SSR simulate module 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lcb}]LCB handle \item[{\em sendTaskPri}]priority of task created to send data to LCB, 0=default of 60 \item[{\em latpAddr}]address of unit to send data to \item[{\em appId}]appId to be used within the CCSDS header \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}


References RND\_\-lc0\_\-init(), SSRSIM\_\-statsReset(), and TDATA\_\-setCcsdsParms().\hypertarget{SSRSIM_8h_9daa5822a0c30ae506d2f4c4f5e1ea84}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-release@{SSRSIM\_\-release}}
\index{SSRSIM\_\-release@{SSRSIM\_\-release}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-release}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-release ()}}
\label{SSRSIM_8h_9daa5822a0c30ae506d2f4c4f5e1ea84}


shutdown the SSR simulate module 

\begin{Desc}
\item[Returns:]none \end{Desc}


References SSRSIM\_\-stop().\hypertarget{SSRSIM_8h_69a5c824600e74ee27315416f27f56c2}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-setParm@{SSRSIM\_\-setParm}}
\index{SSRSIM\_\-setParm@{SSRSIM\_\-setParm}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-setParm}]{\setlength{\rightskip}{0pt plus 5cm}int SSRSIM\_\-setParm ({\bf TDATA\_\-DTEST} {\em dataType}, \/  int {\em dataParm}, \/  int {\em tDuration}, \/  int {\em reqPacketSize32}, \/  int {\em evtPeriod}, \/  int $\ast$ {\em actualPacketSize32})}}
\label{SSRSIM_8h_69a5c824600e74ee27315416f27f56c2}


Setup and start data simulated SSR data from ISIS. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dataType}]data pattern to load into buffer \item[{\em dataParm}]parameter associated with given dataType \item[{\em tDuration}]time in secs to output data, -1=forever \item[{\em reqPacketSize32}]desired packet size, 8 to 1020, 0=random size \item[{\em evtPeriod}]time in microSec between events, 100 (10KHz) to 30000000 (1/30 Hz) \item[{\em actualPacketSize32}]returned packet size adjusted down if needed to achieve given evtPeriod within LCB bandwidth constraints, max size is returned if reqPacketSIze=0 for random \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]status 0=sucess \end{Desc}


References SSRSIM\_\-stop(), and TDATA\_\-DTEST\_\-RANDOM.\hypertarget{SSRSIM_8h_0e45d77182f8dffc58b1f02fbb326dc1}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-stats@{SSRSIM\_\-stats}}
\index{SSRSIM\_\-stats@{SSRSIM\_\-stats}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-stats}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-stats ()}}
\label{SSRSIM_8h_0e45d77182f8dffc58b1f02fbb326dc1}


print stats 

\begin{Desc}
\item[Returns:]none \end{Desc}


References PRINTF.\hypertarget{SSRSIM_8h_84ab4ce83207289ffd847ec8fdb8fc3d}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-statsGetErrors@{SSRSIM\_\-statsGetErrors}}
\index{SSRSIM\_\-statsGetErrors@{SSRSIM\_\-statsGetErrors}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-statsGetErrors}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-statsGetErrors (int $\ast$ {\em timerMiss}, \/  int $\ast$ {\em dmaErrs}, \/  int $\ast$ {\em itemErrs}, \/  int $\ast$ {\em backPresErrs})}}
\label{SSRSIM_8h_84ab4ce83207289ffd847ec8fdb8fc3d}


get error stats 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timerMiss}]if not NULL, return timer misses which indicates no buffer to send to LCB \item[{\em dmaErrs}]if not NULL, return dma errs which indicate LCB did not process a list so list is probably incorrect or LCB problems \item[{\em itemErrs}]if not NULL, return item error which are errors on one item in list, probably indicate cannot talk to destination of item \item[{\em backPresErrs}]if not NULL, return backpressure errors which indicate timeout due to pause line from EBM being set \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]none \end{Desc}
\hypertarget{SSRSIM_8h_2fa6d4d7a193c9c5465a0ad790cb1a03}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-statsReset@{SSRSIM\_\-statsReset}}
\index{SSRSIM\_\-statsReset@{SSRSIM\_\-statsReset}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-statsReset}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-statsReset ()}}
\label{SSRSIM_8h_2fa6d4d7a193c9c5465a0ad790cb1a03}


reset stats for printing 

\begin{Desc}
\item[Returns:]none \end{Desc}


Referenced by SSRSIM\_\-init().\hypertarget{SSRSIM_8h_b76c5ed829115d343c191e427849504f}{
\index{SSRSIM.h@{SSRSIM.h}!SSRSIM\_\-stop@{SSRSIM\_\-stop}}
\index{SSRSIM\_\-stop@{SSRSIM\_\-stop}!SSRSIM.h@{SSRSIM.h}}
\subsubsection[{SSRSIM\_\-stop}]{\setlength{\rightskip}{0pt plus 5cm}void SSRSIM\_\-stop ()}}
\label{SSRSIM_8h_b76c5ed829115d343c191e427849504f}


stop SSR simulate data output 

\begin{Desc}
\item[Returns:]none \end{Desc}


Referenced by SSRSIM\_\-release(), and SSRSIM\_\-setParm().