\section{com.cpp File Reference}
\label{com_8cpp}\index{com.cpp@{com.cpp}}
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include \char`\"{}liblnp.h\char`\"{}}\par
{\tt \#include \char`\"{}wx/wx.h\char`\"{}}\par
{\tt \#include \char`\"{}com.h\char`\"{}}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
class {\bf Read\-From\-Ir\-Thread}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
wx\-Semaphore {\bf sem\_\-com} (1, 1)
\item 
wx\-Semaphore {\bf sem\_\-data} (0, 1)
\item 
int {\bf own\_\-atoi} (char s[$\,$])
\item 
void {\bf own\_\-reverse} (char s[$\,$])
\item 
void {\bf own\_\-itoa} (int n, char s[$\,$])
\item 
int {\bf com\_\-send} (int id\_\-sender\_\-int, int id\_\-receiver\_\-int, int message\_\-type\_\-int, int $\ast$message\_\-send\_\-int)
\item 
int {\bf init\_\-com} (int id)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
int {\bf TRIGGER1} = 0
\item 
int {\bf TRIGGER2} = 0
\item 
int {\bf TRIGGER3} = 0
\item 
int {\bf TRIGGER4} = 0
\item 
int {\bf TRIGGER5} = 0
\item 
int {\bf TEMPERATURE} = 0
\item 
int {\bf COORDINATES} [9] = \{0,0,0,0,0,0,0,0,0\}
\item 
int {\bf COM\_\-ID} = 0
\item 
char {\bf received\_\-message} [40]
\item 
char {\bf received\_\-header} [3]
\item 
int {\bf received\_\-message\_\-len} = 0
\end{CompactItemize}


\subsection{Function Documentation}
\index{com.cpp@{com.cpp}!com_send@{com\_\-send}}
\index{com_send@{com\_\-send}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int com\_\-send (int {\em id\_\-sender\_\-int}, int {\em id\_\-receiver\_\-int}, int {\em message\_\-type\_\-int}, int $\ast$ {\em message\_\-send\_\-int})}\label{com_8cpp_9be62e5def06f4a942e3e9e34b94a3b2}




Definition at line 263 of file com.cpp.

References own\_\-itoa().

Referenced by My\-App::On\-Run().\index{com.cpp@{com.cpp}!init_com@{init\_\-com}}
\index{init_com@{init\_\-com}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int init\_\-com (int {\em id})}\label{com_8cpp_93d78520cbadf22ec0325bf97ca11e6f}




Definition at line 343 of file com.cpp.

References COM\_\-ID, lnp\_\-init(), and lnp\_\-integrity\_\-set\_\-handler().

Referenced by My\-App::On\-Init().\index{com.cpp@{com.cpp}!own_atoi@{own\_\-atoi}}
\index{own_atoi@{own\_\-atoi}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int own\_\-atoi (char {\em s}[$\,$])}\label{com_8cpp_a7114a67aefdd8ced7ab109f17308c3b}




Definition at line 61 of file com.cpp.

Referenced by Read\-From\-Ir\-Thread::Entry().\index{com.cpp@{com.cpp}!own_itoa@{own\_\-itoa}}
\index{own_itoa@{own\_\-itoa}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void own\_\-itoa (int {\em n}, char {\em s}[$\,$])}\label{com_8cpp_7667b557d995132f958751027a1ffb57}




Definition at line 99 of file com.cpp.

References own\_\-reverse().

Referenced by com\_\-send().\index{com.cpp@{com.cpp}!own_reverse@{own\_\-reverse}}
\index{own_reverse@{own\_\-reverse}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void own\_\-reverse (char {\em s}[$\,$])}\label{com_8cpp_241df9921085df43e877aec69744c448}




Definition at line 82 of file com.cpp.

Referenced by own\_\-itoa().\index{com.cpp@{com.cpp}!sem_com@{sem\_\-com}}
\index{sem_com@{sem\_\-com}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}wx\-Semaphore sem\_\-com (1, 1)}\label{com_8cpp_b120e91c29ff7896fb8c94a759e9b51e}


\index{com.cpp@{com.cpp}!sem_data@{sem\_\-data}}
\index{sem_data@{sem\_\-data}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}wx\-Semaphore sem\_\-data (0, 1)}\label{com_8cpp_67702ba576240a3771fd32cbd0709019}




Referenced by Read\-From\-Ir\-Thread::Entry().

\subsection{Variable Documentation}
\index{com.cpp@{com.cpp}!COM_ID@{COM\_\-ID}}
\index{COM_ID@{COM\_\-ID}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf COM\_\-ID} = 0}\label{com_8cpp_0cc328ae4aaa6da327309ed1263c3776}




Definition at line 45 of file com.cpp.

Referenced by init\_\-com().\index{com.cpp@{com.cpp}!COORDINATES@{COORDINATES}}
\index{COORDINATES@{COORDINATES}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf COORDINATES}[9] = \{0,0,0,0,0,0,0,0,0\}}\label{com_8cpp_fbc3fc95b2f7f879ec3a26f309c21feb}




Definition at line 34 of file com.cpp.\index{com.cpp@{com.cpp}!received_header@{received\_\-header}}
\index{received_header@{received\_\-header}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf received\_\-header}[3]}\label{com_8cpp_488466688b430f801d447d626f6d6f62}




Definition at line 50 of file com.cpp.

Referenced by Read\-From\-Ir\-Thread::Entry().\index{com.cpp@{com.cpp}!received_message@{received\_\-message}}
\index{received_message@{received\_\-message}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf received\_\-message}[40]}\label{com_8cpp_ba691beb8ebc64fd2e74e9fcc769dfda}




Definition at line 48 of file com.cpp.

Referenced by Read\-From\-Ir\-Thread::Entry().\index{com.cpp@{com.cpp}!received_message_len@{received\_\-message\_\-len}}
\index{received_message_len@{received\_\-message\_\-len}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf received\_\-message\_\-len} = 0}\label{com_8cpp_a47014cf84b9d81203bb1c4bb15356da}




Definition at line 52 of file com.cpp.

Referenced by Read\-From\-Ir\-Thread::Entry().\index{com.cpp@{com.cpp}!TEMPERATURE@{TEMPERATURE}}
\index{TEMPERATURE@{TEMPERATURE}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TEMPERATURE} = 0}\label{com_8cpp_082d135b7f94f62fb055cbc9e042aaf2}




Definition at line 32 of file com.cpp.

Referenced by My\-App::On\-Run().\index{com.cpp@{com.cpp}!TRIGGER1@{TRIGGER1}}
\index{TRIGGER1@{TRIGGER1}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TRIGGER1} = 0}\label{com_8cpp_a3162ce10e5ef10f65051db14ebc0434}




Definition at line 22 of file com.cpp.

Referenced by My\-App::On\-Run().\index{com.cpp@{com.cpp}!TRIGGER2@{TRIGGER2}}
\index{TRIGGER2@{TRIGGER2}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TRIGGER2} = 0}\label{com_8cpp_f25ca3f9c12f9695c1b2c26648ad899f}




Definition at line 24 of file com.cpp.\index{com.cpp@{com.cpp}!TRIGGER3@{TRIGGER3}}
\index{TRIGGER3@{TRIGGER3}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TRIGGER3} = 0}\label{com_8cpp_c84387dbf973f5878a4470334b47e64c}




Definition at line 26 of file com.cpp.\index{com.cpp@{com.cpp}!TRIGGER4@{TRIGGER4}}
\index{TRIGGER4@{TRIGGER4}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TRIGGER4} = 0}\label{com_8cpp_b7f42a5a588be6b15d6120fd5988bb2b}




Definition at line 28 of file com.cpp.\index{com.cpp@{com.cpp}!TRIGGER5@{TRIGGER5}}
\index{TRIGGER5@{TRIGGER5}!com.cpp@{com.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf TRIGGER5} = 0}\label{com_8cpp_d624b82cc43ba9990fc07fcabcbc0bd1}




Definition at line 30 of file com.cpp.