\hypertarget{classcpphlib_1_1PPDCommThread}{\section{cpphlib.\-P\-P\-D\-Comm\-Thread \-Class \-Reference}
\label{classcpphlib_1_1PPDCommThread}\index{cpphlib.\-P\-P\-D\-Comm\-Thread@{cpphlib.\-P\-P\-D\-Comm\-Thread}}
}


\-The basic communication with any socket.  


\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a0fc6d71f26b93c973e961223c3c663dd}{\-\_\-\-\_\-init\-\_\-\-\_\-}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a82d453cfba00d9fde045a6f26d7a45ad}{connect}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_af0436bdd55e806614149a54444fa92c5}{disconnect}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_ae9da3f74021bef90ab7a442f62ca16b3}{run}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a2dc1348a62a739b9baca2d41d8a61b61}{stop}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_aac8a6a520fc22fd25cf9761461b50494}{send}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a8076be1f15bad9c759f6eadb42695232}{getinputflag}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a26a479718a25cadb74e4316a57c38f22}{getinputdata}
\item 
def \hyperlink{classcpphlib_1_1PPDCommThread_a0661bc1d57c69b89947dc66fe13cace2}{commandstatemachine}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Public \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a8b02a3c6591139410dee00208914fc1f}{{\bfseries \-Run\-Flag}}\label{classcpphlib_1_1PPDCommThread_a8b02a3c6591139410dee00208914fc1f}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a6d3c20e6222076d0e8e57d8dcbdc86a3}{{\bfseries \-Input\-Flag}}\label{classcpphlib_1_1PPDCommThread_a6d3c20e6222076d0e8e57d8dcbdc86a3}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a6883231c91642767044b2e96133720b9}{{\bfseries \-I\-P\-Addr}}\label{classcpphlib_1_1PPDCommThread_a6883231c91642767044b2e96133720b9}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a8366c5df8f5b83a11dc8b418a82a542a}{{\bfseries \-I\-Pport}}\label{classcpphlib_1_1PPDCommThread_a8366c5df8f5b83a11dc8b418a82a542a}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a7748481b5dfa09d0942cdb3dbcb0c3ca}{{\bfseries \-Identfy\-Text}}\label{classcpphlib_1_1PPDCommThread_a7748481b5dfa09d0942cdb3dbcb0c3ca}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_ad3fdba999eac72bf48487d70c7981bfa}{{\bfseries \-Silent\-Mode}}\label{classcpphlib_1_1PPDCommThread_ad3fdba999eac72bf48487d70c7981bfa}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a2dcab9fec7a1af34fd68ceb39ae9a8f7}{{\bfseries \-R\-C\-V\-Q}}\label{classcpphlib_1_1PPDCommThread_a2dcab9fec7a1af34fd68ceb39ae9a8f7}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_a07b268bc4b65fb01fdaba65060199a73}{{\bfseries \-Comm}}\label{classcpphlib_1_1PPDCommThread_a07b268bc4b65fb01fdaba65060199a73}

\item 
\hypertarget{classcpphlib_1_1PPDCommThread_ade2c496dd0acbbf7430e4de6dc71fcf9}{{\bfseries \-Input}}\label{classcpphlib_1_1PPDCommThread_ade2c496dd0acbbf7430e4de6dc71fcf9}

\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-The basic communication with any socket. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-This class deals with the main socket communication. \-It connects to the specified computers specified port. \-Using it's {\bfseries send} method, data can be sent to the specified computer, a stand alone thread ({\bfseries run}) deals with receiving data from a specified computer to load into the receiving queue. \-The {\bfseries getinputflag} method always indicates whether there is received data in the receiving queue, which data can be read using {\bfseries getinputdata} method. {\bfseries disconnect} method disconnects socket connection, {\bfseries stop} method stops receiving thread. \-The {\bfseries commandstatemachine} method can check answers got for sent packages. \begin{DoxyVerb}Short description: Communication interface class\end{DoxyVerb}
 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classcpphlib_1_1PPDCommThread_a0fc6d71f26b93c973e961223c3c663dd}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!\-\_\-\-\_\-init\-\_\-\-\_\-@{\-\_\-\-\_\-init\-\_\-\-\_\-}}
\index{\-\_\-\-\_\-init\-\_\-\-\_\-@{\-\_\-\-\_\-init\-\_\-\-\_\-}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{\-\_\-\-\_\-init\-\_\-\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-\_\-\-\_\-init\-\_\-\-\_\-} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-I\-P\-Addr, }
\item[{}]{\-I\-Pport, }
\item[{}]{\-Identfy\-Text, }
\item[{}]{\-Silent\-Mode = {\ttfamily \-True}}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a0fc6d71f26b93c973e961223c3c663dd}


\-Documentation for method. 


\begin{DoxyParams}{\-Parameters}
{\em \-I\-P\-Addr} & \-I\-P address of the machine which ppds driver is running on \\
\hline
{\em \-I\-P\-Port} & \-The port which ppds driver has opened for the granted interface \\
\hline
{\em \-Identfy\-Text} & \-Identifier text, what interface displays when client is connected \\
\hline
{\em \-Silent\-Mode} & \-Switches silent mode \-O\-N/\-O\-F\-F. \-It can be {\bfseries {\itshape \-True\/}} or {\bfseries {\itshape \-False\/}} \par
\par
 \begin{DoxyVerb}Short description: Constructs PPDCommThread class\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classcpphlib_1_1PPDCommThread_a0661bc1d57c69b89947dc66fe13cace2}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!commandstatemachine@{commandstatemachine}}
\index{commandstatemachine@{commandstatemachine}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{commandstatemachine}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-commandstatemachine} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-Command, }
\item[{}]{\-Exp\-Answer, }
\item[{}]{\-Max\-Time\-Out, }
\item[{}]{\-Print\-Parsable\-Answer = {\ttfamily \-False}}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a0661bc1d57c69b89947dc66fe13cace2}


\-Documentation for method. 

\-Sends {\bfseries \-Command} to the interface, then checks expected answer for the command based on {\bfseries \-Exp\-Answer}. \-The answer must arrive within {\bfseries \-Max\-Time\-Out} milliseconds. \-Ppds gives answer to every commands and there is a prompt ('$>$') at the end of the answer. \-Prompt can always be found after having an answer. \-At the same time you can also digest every details of the whole answer to make sure if driver has done the required things, or the required parameter is set on the card. \-If {\bfseries \-Print\-Parsable\-Answer} is set to {\bfseries {\itshape \-True\/}}, method displays parsable interface answer. \-If expected answer is not equals to interface answer and {\bfseries \-Print\-Parsable\-Answer} is set to {\bfseries {\itshape \-False\/}}, then method displays only {\bfseries {\itshape '\-A\-N\-S\-W\-E\-R \-W\-R\-O\-N\-G'\/}}. 
\begin{DoxyParams}{\-Parameters}
{\em \-Command} & \-Command to interface \\
\hline
{\em \-Exp\-Answer} & \-Expected answer or a part of expected answer for the command \\
\hline
{\em \-Max\-Time\-Out} & \-Maximum timeout of the answer \\
\hline
{\em \-Print\-Parsable\-Answer} & \-If it is set to {\bfseries {\itshape \-True\/}}, it prints the anwer, if it is set to {\bfseries {\itshape \-False\/}}, it does not print the answer. \par
\par
 \begin{DoxyVerb}Short description: Checks answer for the sent command\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}
\hypertarget{classcpphlib_1_1PPDCommThread_a82d453cfba00d9fde045a6f26d7a45ad}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!connect@{connect}}
\index{connect@{connect}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{connect}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-connect} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a82d453cfba00d9fde045a6f26d7a45ad}
\begin{DoxyVerb}Short description: Connects to ppds interface\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPDCommThread_af0436bdd55e806614149a54444fa92c5}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{disconnect}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-disconnect} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_af0436bdd55e806614149a54444fa92c5}
\begin{DoxyVerb}Short description: Disconnects from ppds interface\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPDCommThread_a26a479718a25cadb74e4316a57c38f22}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!getinputdata@{getinputdata}}
\index{getinputdata@{getinputdata}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{getinputdata}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-getinputdata} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a26a479718a25cadb74e4316a57c38f22}
\begin{DoxyVerb}Short description: Gets data from the interface\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPDCommThread_a8076be1f15bad9c759f6eadb42695232}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!getinputflag@{getinputflag}}
\index{getinputflag@{getinputflag}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{getinputflag}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-getinputflag} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a8076be1f15bad9c759f6eadb42695232}
\begin{DoxyVerb}Short description: Flagging when incoming data is coming from the interface\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPDCommThread_ae9da3f74021bef90ab7a442f62ca16b3}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!run@{run}}
\index{run@{run}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{run}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-run} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_ae9da3f74021bef90ab7a442f62ca16b3}
\begin{DoxyVerb}Short description: Class working loop, receives data from the interface\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPDCommThread_aac8a6a520fc22fd25cf9761461b50494}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!send@{send}}
\index{send@{send}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{send}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-send} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-Text}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_aac8a6a520fc22fd25cf9761461b50494}


\-Documentation for method. 

\-Sends {\bfseries \-Text} to interface. 
\begin{DoxyParams}{\-Parameters}
{\em \-Text} & text to be sent to the interface \par
\par
 \begin{DoxyVerb}Short description: Sends data to the interface\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}
\hypertarget{classcpphlib_1_1PPDCommThread_a2dc1348a62a739b9baca2d41d8a61b61}{\index{cpphlib\-::\-P\-P\-D\-Comm\-Thread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}!stop@{stop}}
\index{stop@{stop}!cpphlib::PPDCommThread@{cpphlib\-::\-P\-P\-D\-Comm\-Thread}}
\subsubsection[{stop}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-D\-Comm\-Thread.\-stop} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPDCommThread_a2dc1348a62a739b9baca2d41d8a61b61}
\begin{DoxyVerb}Short description: Stops working loop\end{DoxyVerb}
 

\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
cpphlib.\-py\end{DoxyCompactItemize}
