\hypertarget{isisPrivate_8h}{
\section{isis\-Private.h File Reference}
\label{isisPrivate_8h}\index{isisPrivate.h@{isisPrivate.h}}
}
Private definitions for ISIS package.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include \char`\"{}ISIS/ISIS\_\-cmd.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/TASK.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/WUT.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/FORK.h\char`\"{}}\par
{\tt \#include \char`\"{}LCBD/LCBD\_\-drv.h\char`\"{}}\par
{\tt \#include \char`\"{}CLI/CLI\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}ITC/ITC\_\-pubdefs.h\char`\"{}}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$time.h$>$}\par


Include dependency graph for isis\-Private.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=205pt]{isisPrivate_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=90pt]{isisPrivate_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structISIS__Control}{ISIS\_\-Control}
\begin{CompactList}\small\item\em ISIS variables. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{isisPrivate_8h_a0}{
\#define \hyperlink{isisPrivate_8h_a0}{PRINTF}(\_\-args)}
\label{isisPrivate_8h_a0}

\begin{CompactList}\small\item\em NOPs terminal debug output. \item\end{CompactList}\item 
\#define \hyperlink{isisPrivate_8h_a1}{SLEEP}(\_\-t\-Secs)\ sleep(\_\-t\-Secs)
\begin{CompactList}\small\item\em Sleep for Vx\-Works. \item\end{CompactList}\item 
\hypertarget{isisPrivate_8h_a2}{
\#define \hyperlink{isisPrivate_8h_a2}{ISIS\_\-NUM\_\-CMDS}\ 200}
\label{isisPrivate_8h_a2}

\begin{CompactList}\small\item\em Record for calling function based on APID and function code. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{isisPrivate_8h_a53}{ISIS\_\-State} \{ \par
\hyperlink{isisPrivate_8h_a53a3}{NOT\_\-INIT} = 0, 
\par
\hyperlink{isisPrivate_8h_a53a4}{INIT} = 1, 
\par
\hyperlink{isisPrivate_8h_a53a5}{MAIN\_\-FEED\_\-ON} = 2
 \}
\begin{CompactList}\small\item\em ISIS states. \item\end{CompactList}\item 
enum \hyperlink{isisPrivate_8h_a54}{ISIS\_\-Func\-Code} \{ \par
{\bf ISIS\_\-SC\_\-REPT\_\-FC} =  2, 
\par
{\bf ISIS\_\-LAT\_\-REPT\_\-REPLY\_\-FC} =  0, 
\par
{\bf ISIS\_\-LAT\_\-LDSHED\_\-FC} =  1, 
\par
{\bf ISIS\_\-LAT\_\-HTR\_\-OFFON\_\-FC} =  2, 
\par
{\bf ISIS\_\-LAT\_\-REPT\_\-GEN\_\-FC} =  3, 
\par
{\bf ISIS\_\-LAT\_\-DRV\_\-DISCRETE\_\-FC} =  4, 
\par
{\bf ISIS\_\-LAT\_\-MON\_\-DISCRETE\_\-FC} =  5, 
\par
{\bf ISIS\_\-LAT\_\-SCI\_\-DATA\_\-FC} =  6, 
\par
{\bf ISIS\_\-LAT\_\-STOP\_\-SCI\_\-FC} =  7, 
\par
{\bf ISIS\_\-LAT\_\-SEL\_\-SCI\_\-FC} =  8, 
\par
{\bf ISIS\_\-LAT\_\-NOOP\_\-FC} =  10, 
\par
{\bf ISIS\_\-LAT\_\-REBOOT\_\-FC} =  11, 
\par
{\bf ISIS\_\-LAT\_\-REQ\_\-ALERT\_\-FC} =  12, 
\par
{\bf ISIS\_\-LAT\_\-MAIN\_\-FD\_\-ON\_\-FC} =  16, 
\par
{\bf ISIS\_\-LAT\_\-POWER\_\-ON\_\-FC} =  17, 
\par
{\bf ISIS\_\-LAT\_\-POWER\_\-OFF\_\-FC} =  18, 
\par
{\bf ISIS\_\-LAT\_\-MON\_\-COUNTS\_\-FC} =  19, 
\par
{\bf ISIS\_\-LAT\_\-CLR\_\-SCI\_\-STATS\_\-FC} =  20, 
\par
{\bf ISIS\_\-LAT\_\-GET\_\-SCI\_\-STATS\_\-FC} =  21, 
\par
{\bf ISIS\_\-LAT\_\-GET\_\-HW\_\-CNFG\_\-FC} =  22, 
\par
{\bf ISIS\_\-LAT\_\-GET\_\-SW\_\-CNFG\_\-FC} =  23, 
\par
{\bf ISIS\_\-GBM\_\-CALC\_\-INFO\_\-FC} =  1, 
\par
{\bf ISIS\_\-GBM\_\-REPT\_\-REC\_\-FC} =  2, 
\par
{\bf ISIS\_\-GBM\_\-CLOSE\_\-OUT\_\-FC} =  3, 
\par
{\bf ISIS\_\-SC\_\-ATTITUDE\_\-FC} =  1, 
\par
{\bf ISIS\_\-SC\_\-ANCILLARY\_\-FC} =  2, 
\par
{\bf ISIS\_\-SC\_\-TIMETONE\_\-FC} =  3
 \}
\begin{CompactList}\small\item\em Function codes used by ISIS software. \item\end{CompactList}\item 
enum \hyperlink{isisPrivate_8h_a55}{ISIS\_\-Apid} \{ \par
{\bf ISIS\_\-GBM\_\-CMD\_\-APID} =  0x660, 
\par
{\bf ISIS\_\-LAT\_\-CMD\_\-APID} =  0x688, 
\par
{\bf ISIS\_\-SC\_\-REPT\_\-APID} =  0x600, 
\par
{\bf ISIS\_\-LAT\_\-REPT\_\-REPLY\_\-APID} =  0x661, 
\par
{\bf ISIS\_\-LAT\_\-LDSHED\_\-APID} =  0x688, 
\par
{\bf ISIS\_\-SC\_\-BROADCAST\_\-APID} =  0x701, 
\par
{\bf ISIS\_\-SCI\_\-DATA\_\-APID} =  0x3B6
 \}
\begin{CompactList}\small\item\em APIDs used by ISIS software. \item\end{CompactList}\item 
enum \hyperlink{isisPrivate_8h_a56}{ISIS\_\-Task\-Id} \{ \par
{\bf ISIS\_\-LAT\_\-TASK\_\-ID} =  20, 
\par
{\bf ISIS\_\-SC\_\-TASK\_\-ID} =  25
 \}
\begin{CompactList}\small\item\em Task IDs used by ISIS software. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{isisPrivate_8h_a42}{ISIS\_\-Stop\-Task} ()
\begin{CompactList}\small\item\em Stop and shut down the \char`\"{}ISIS task\char`\"{}. \item\end{CompactList}\item 
void $\ast$ \hyperlink{isisPrivate_8h_a43}{ISIS\_\-Bld\-Cmd\-Pkt} (void $\ast$py\-Ld, int p\-Sz, int app\-Id, int fc)
\begin{CompactList}\small\item\em Build CCSDS telecommand packet with given payload. \item\end{CompactList}\item 
void $\ast$ \hyperlink{isisPrivate_8h_a44}{ISIS\_\-Bld\-Tlm\-Pkt} (void $\ast$py\-Ld, int p\-Sz, int app\-Id)
\begin{CompactList}\small\item\em Build CCSDS telemetry packet with given payload. \item\end{CompactList}\item 
unsigned int \hyperlink{isisPrivate_8h_a45}{ISIS\_\-Send\-Pkt} (unsigned char $\ast$pkt, unsigned qid, unsigned nid, unsigned tid)
\begin{CompactList}\small\item\em Send a CCSDS telecommand packet to the spacecraft. \item\end{CompactList}\item 
unsigned int \hyperlink{isisPrivate_8h_a46}{ISIS\_\-Snd\-Rept} ()
\begin{CompactList}\small\item\em Exercise function to issue repoint command to spacecraft. \item\end{CompactList}\item 
\hypertarget{isisPrivate_8h_a47}{
void \hyperlink{isisPrivate_8h_a47}{ISIS\_\-Start\-Tlm\-Sim} ()}
\label{isisPrivate_8h_a47}

\begin{CompactList}\small\item\em Start simulation for housekeeping telemetry. \item\end{CompactList}\item 
FORK\_\-cb\_\-status \hyperlink{isisPrivate_8h_a48}{ISIS\_\-Start\-Tlm\-Wut} (FORK\_\-cb\_\-prm prm, FORK\_\-msg\_\-hdr $\ast$hdr)
\begin{CompactList}\small\item\em Start WUT for telemetry simulation. \item\end{CompactList}\item 
WUT\_\-cb\_\-status \hyperlink{isisPrivate_8h_a49}{ISIS\_\-Tlm\-Wut} (void $\ast$prm, WUT\_\-tmr $\ast$wut)
\begin{CompactList}\small\item\em Reset WUT for telemetry simulation. \item\end{CompactList}\item 
FORK\_\-cb\_\-status \hyperlink{isisPrivate_8h_a50}{ISIS\_\-Tlm\-Sim} (FORK\_\-cb\_\-prm prm, FORK\_\-msg\_\-hdr $\ast$hdr)
\begin{CompactList}\small\item\em Call LHK to fill telemetry packet and send. \item\end{CompactList}\item 
int \hyperlink{isisPrivate_8h_a51}{ISIS\_\-Start\-Watchdog} (int prd, int v)
\begin{CompactList}\small\item\em Start watchdog timer reset task. \item\end{CompactList}\item 
void \hyperlink{isisPrivate_8h_a52}{ISIS\_\-WDog\-Task} (void $\ast$\hyperlink{ISIS__isis_8c_a0}{isis\-Ctl})
\begin{CompactList}\small\item\em Periodically resets watchdog timer. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Private definitions for ISIS package. 



\subsection{Define Documentation}
\hypertarget{isisPrivate_8h_a1}{
\index{isisPrivate.h@{isis\-Private.h}!SLEEP@{SLEEP}}
\index{SLEEP@{SLEEP}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[SLEEP]{\setlength{\rightskip}{0pt plus 5cm}\#define SLEEP(\_\-t\-Secs)\ sleep(\_\-t\-Secs)}}
\label{isisPrivate_8h_a1}


Sleep for Vx\-Works. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-t\-Secs}]Seconds to sleep. \end{description}
\end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{isisPrivate_8h_a53}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_State@{ISIS\_\-State}}
\index{ISIS_State@{ISIS\_\-State}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-State]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{isisPrivate_8h_a53}{ISIS\_\-State}}}
\label{isisPrivate_8h_a53}


ISIS states. 

\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{NOT_INIT@{NOT\_\-INIT}!isisPrivate.h@{isisPrivate.h}}\index{isisPrivate.h@{isisPrivate.h}!NOT_INIT@{NOT\_\-INIT}}\item[{\em 
\hypertarget{isisPrivate_8h_a53a3}{
{\em NOT\_\-INIT}}
\label{isisPrivate_8h_a53a3}
}]Loaded but LCP\_\-init not called yet \index{INIT@{INIT}!isisPrivate.h@{isisPrivate.h}}\index{isisPrivate.h@{isisPrivate.h}!INIT@{INIT}}\item[{\em 
\hypertarget{isisPrivate_8h_a53a4}{
{\em INIT}}
\label{isisPrivate_8h_a53a4}
}]LCP\_\-init called, but no main feed on (TLM, SCI) \index{MAIN_FEED_ON@{MAIN\_\-FEED\_\-ON}!isisPrivate.h@{isisPrivate.h}}\index{isisPrivate.h@{isisPrivate.h}!MAIN_FEED_ON@{MAIN\_\-FEED\_\-ON}}\item[{\em 
\hypertarget{isisPrivate_8h_a53a5}{
{\em MAIN\_\-FEED\_\-ON}}
\label{isisPrivate_8h_a53a5}
}]Main feed on, telemetry and sci data sim ready \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{isisPrivate_8h_a43}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_BldCmdPkt@{ISIS\_\-BldCmdPkt}}
\index{ISIS_BldCmdPkt@{ISIS\_\-BldCmdPkt}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-BldCmdPkt]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ISIS\_\-Bld\-Cmd\-Pkt (void $\ast$ {\em py\-Ld}, int {\em p\-Sz}, int {\em app\-Id}, int {\em fc})}}
\label{isisPrivate_8h_a43}


Build CCSDS telecommand packet with given payload. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em py\-Ld}]- Command packet paylaod \item[{\em p\-Sz}]- Payload size \item[{\em app\-Id}]- Application ID \item[{\em fc}]- Function code \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Pointer}]to packet or NULL on error. \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a44}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_BldTlmPkt@{ISIS\_\-BldTlmPkt}}
\index{ISIS_BldTlmPkt@{ISIS\_\-BldTlmPkt}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-BldTlmPkt]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ISIS\_\-Bld\-Tlm\-Pkt (void $\ast$ {\em py\-Ld}, int {\em p\-Sz}, int {\em app\-Id})}}
\label{isisPrivate_8h_a44}


Build CCSDS telemetry packet with given payload. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em py\-Ld}]- Command packet paylaod \item[{\em p\-Sz}]- Payload size \item[{\em app\-Id}]- Application ID \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Pointer}]to packet or NULL on error. \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a45}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_SendPkt@{ISIS\_\-SendPkt}}
\index{ISIS_SendPkt@{ISIS\_\-SendPkt}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-SendPkt]{\setlength{\rightskip}{0pt plus 5cm}unsigned int ISIS\_\-Send\-Pkt (unsigned char $\ast$ {\em pkt}, unsigned {\em qid}, unsigned {\em nid}, unsigned {\em tid})}}
\label{isisPrivate_8h_a45}


Send a CCSDS telecommand packet to the spacecraft. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pkt}]- CCSDS packet (memory freed after use). \item[{\em qid}]- Packet queue type \item[{\em nid}]- ITC node id \item[{\em tid}]- ITC task id \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em PBX\_\-GENERROR}]Failure \item[{\em PBX\_\-SUCCESS}]Success \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a46}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_SndRept@{ISIS\_\-SndRept}}
\index{ISIS_SndRept@{ISIS\_\-SndRept}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-SndRept]{\setlength{\rightskip}{0pt plus 5cm}unsigned ISIS\_\-Snd\-Rept ()}}
\label{isisPrivate_8h_a46}


Exercise function to issue repoint command to spacecraft. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em CLI\_\-SUCCESS}]Success \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a48}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_StartTlmWut@{ISIS\_\-StartTlmWut}}
\index{ISIS_StartTlmWut@{ISIS\_\-StartTlmWut}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-StartTlmWut]{\setlength{\rightskip}{0pt plus 5cm}FORK\_\-cb\_\-status ISIS\_\-Start\-Tlm\-Wut (FORK\_\-cb\_\-prm {\em prm}, FORK\_\-msg\_\-hdr $\ast$ {\em hdr})}}
\label{isisPrivate_8h_a48}


Start WUT for telemetry simulation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]- Pointer to callback parameter \item[{\em hdr}]- Pointer to the message \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em FORK\_\-C\_\-CONTINUE}]\end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a51}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_StartWatchdog@{ISIS\_\-StartWatchdog}}
\index{ISIS_StartWatchdog@{ISIS\_\-StartWatchdog}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-StartWatchdog]{\setlength{\rightskip}{0pt plus 5cm}int ISIS\_\-Start\-Watchdog (int {\em prd}, int {\em v})}}
\label{isisPrivate_8h_a51}


Start watchdog timer reset task. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prd}]- Task period in milliseconds. \item[{\em v}]- Reset value for watchdog in milliseconds. \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a42}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_StopTask@{ISIS\_\-StopTask}}
\index{ISIS_StopTask@{ISIS\_\-StopTask}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-StopTask]{\setlength{\rightskip}{0pt plus 5cm}unsigned int ISIS\_\-Stop\-Task ()}}
\label{isisPrivate_8h_a42}


Stop and shut down the \char`\"{}ISIS task\char`\"{}. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em ISIS\_\-GENERROR}]Failure \item[{\em ISIS\_\-SUCCESS}]Success \end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a50}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_TlmSim@{ISIS\_\-TlmSim}}
\index{ISIS_TlmSim@{ISIS\_\-TlmSim}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-TlmSim]{\setlength{\rightskip}{0pt plus 5cm}FORK\_\-cb\_\-status ISIS\_\-Tlm\-Sim (FORK\_\-cb\_\-prm {\em prm}, FORK\_\-msg\_\-hdr $\ast$ {\em hdr})}}
\label{isisPrivate_8h_a50}


Call LHK to fill telemetry packet and send. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]- Callback parameter. \item[{\em hdr}]- Message. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em FORK\_\-C\_\-CONTINUE}]\end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a49}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_TlmWut@{ISIS\_\-TlmWut}}
\index{ISIS_TlmWut@{ISIS\_\-TlmWut}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-TlmWut]{\setlength{\rightskip}{0pt plus 5cm}WUT\_\-cb\_\-status ISIS\_\-Tlm\-Wut (void $\ast$ {\em prm}, WUT\_\-tmr $\ast$ {\em wut})}}
\label{isisPrivate_8h_a49}


Reset WUT for telemetry simulation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]- Callback parameter. \item[{\em wut}]- Timer handle. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em FORK\_\-C\_\-CONTINUE}]\end{description}
\end{Desc}
\hypertarget{isisPrivate_8h_a52}{
\index{isisPrivate.h@{isis\-Private.h}!ISIS_WDogTask@{ISIS\_\-WDogTask}}
\index{ISIS_WDogTask@{ISIS\_\-WDogTask}!isisPrivate.h@{isis\-Private.h}}
\subsubsection[ISIS\_\-WDogTask]{\setlength{\rightskip}{0pt plus 5cm}void ISIS\_\-WDog\-Task (void $\ast$ {\em isis\-Ctl})}}
\label{isisPrivate_8h_a52}


Periodically resets watchdog timer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em isis\-Ctl}]- ISIS control data. \end{description}
\end{Desc}
