\hypertarget{classcpphlib_1_1PPKMREHANDLER}{\section{cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R \-Class \-Reference}
\label{classcpphlib_1_1PPKMREHANDLER}\index{cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
}


\-Rotary encoder and matrix keyboard handler.  


\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_a105f662d8fe07583e6588098773cf7d1}{\-\_\-\-\_\-init\-\_\-\-\_\-}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_a545260a0905ad824c91eeeecc193f989}{stop}
\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_acc97f71f70fc017f0e795bd5aa9ac62e}{clearstatevalues}
\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_aa81493c682d610778dccc2ce584f4412}{chekinchannelschanges}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_a3e9cb668e8824693a1d371046d824c81}{inputevent}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\item 
def \hyperlink{classcpphlib_1_1PPKMREHANDLER_a3ff0a8036040198e93dc87c5d2d2b250}{getvalue}
\begin{DoxyCompactList}\small\item\em \-Documentation for method. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Public \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_afd5b70d56943f43e09b9c98e400eaf53}{{\bfseries \-C\-A\-E\-I\-F}}\label{classcpphlib_1_1PPKMREHANDLER_afd5b70d56943f43e09b9c98e400eaf53}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_aa9eac6707aef9dd1c855216824855ddd}{{\bfseries \-I\-O\-I\-F}}\label{classcpphlib_1_1PPKMREHANDLER_aa9eac6707aef9dd1c855216824855ddd}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_ac56c0b3b336a69bb32b0ab2481c42d8e}{{\bfseries \-Addr}}\label{classcpphlib_1_1PPKMREHANDLER_ac56c0b3b336a69bb32b0ab2481c42d8e}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a57008aec873078a84f2badd6760d2858}{{\bfseries \-Prev\-Data}}\label{classcpphlib_1_1PPKMREHANDLER_a57008aec873078a84f2badd6760d2858}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a1a408e32b36a5975cb3ad88ed142e07d}{{\bfseries \-Pre\-R\-E\-O\-V}}\label{classcpphlib_1_1PPKMREHANDLER_a1a408e32b36a5975cb3ad88ed142e07d}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a85762fc0ea587e913d290518110e3554}{{\bfseries \-Event\-Action}}\label{classcpphlib_1_1PPKMREHANDLER_a85762fc0ea587e913d290518110e3554}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a16fe192778e82722307e6d4efec3b845}{{\bfseries \-Event\-Data}}\label{classcpphlib_1_1PPKMREHANDLER_a16fe192778e82722307e6d4efec3b845}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_ada6c2f5d2838b497cb60b671fb33baf8}{{\bfseries \-B\-M}}\label{classcpphlib_1_1PPKMREHANDLER_ada6c2f5d2838b497cb60b671fb33baf8}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a8aeabe282af032337dc9d5c493b76780}{{\bfseries \-I\-O\-C\-G}}\label{classcpphlib_1_1PPKMREHANDLER_a8aeabe282af032337dc9d5c493b76780}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_ab1f3597c11b7acaced5e922e4b729bcc}{{\bfseries \-O\-A}}\label{classcpphlib_1_1PPKMREHANDLER_ab1f3597c11b7acaced5e922e4b729bcc}

\item 
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a8c43fb1e8619e7dcf8da82685287f158}{{\bfseries \-S\-M}}\label{classcpphlib_1_1PPKMREHANDLER_a8c43fb1e8619e7dcf8da82685287f158}

\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Rotary encoder and matrix keyboard handler. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-This class helps to make reading rotary encoder, and matrix keyboard easyer. \-It's eventhandler reminds if rotary encoder is turning, button of the encoder is being pushed, or released, or any key is being pushed on the matrix keyboard. \-A statemachine is handling the rotary encoder. \-The statemachine is running in a standalone thread, so if you create an instance from this class, you need to call the {\bfseries stop} method before quitting the control program, otherwise the main thread dies, and the state machine stucks in. 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a105f662d8fe07583e6588098773cf7d1}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!\-\_\-\-\_\-init\-\_\-\-\_\-@{\-\_\-\-\_\-init\-\_\-\-\_\-}}
\index{\-\_\-\-\_\-init\-\_\-\-\_\-@{\-\_\-\-\_\-init\-\_\-\-\_\-}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{\-\_\-\-\_\-init\-\_\-\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-\_\-\-\_\-init\-\_\-\-\_\-} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-C\-A\-E\-I\-F, }
\item[{}]{\-I\-O\-I\-F, }
\item[{}]{\-Card\-Address}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_a105f662d8fe07583e6588098773cf7d1}


\-Documentation for method. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-Constructs \hyperlink{classcpphlib_1_1PPKMREHANDLER}{\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R} class. 
\begin{DoxyParams}{\-Parameters}
{\em \-C\-A\-E\-I\-F} & \-C\-A\-E interface instance is already connected to ppds. \\
\hline
{\em \-I\-O\-I\-F} & \-I\-O interface instance is already connected to ppds. \\
\hline
{\em \-Card\-Address} & \-Address of the keymatrix and rotary encoder driver card. \par
\par
 \begin{DoxyVerb}Short description: Constructs PPKMREHANDLER class\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classcpphlib_1_1PPKMREHANDLER_aa81493c682d610778dccc2ce584f4412}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!chekinchannelschanges@{chekinchannelschanges}}
\index{chekinchannelschanges@{chekinchannelschanges}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{chekinchannelschanges}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-chekinchannelschanges} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-Master\-Or\-Fwd\-Data}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_aa81493c682d610778dccc2ce584f4412}


\-Documentation for method. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-It checks input channel changes. \-All \-P\-P eventhandler classes has method like this. \-Only one reading method can handle incoming data, because only one clientsocket can be connected to the ppds \-I\-O interface. \-Due to this, a master one, which reads out the receive queue in the working loop, and the processes incoming data is required to have in the case of using more than one eventhandler. \-After processing the master passes raw data to the next eventhandlers. \-This way all data will be processed. \-If the {\bfseries chekinchannelschanges} method is called as master, then it always reads out the receivequeue of the \-I\-O interface. \-The master {\bfseries checkinchannelschanges} must run first. \-All the other eventhandlers must receive the data read by the first after each-\/other, in consequence. 
\begin{DoxyParams}{\-Parameters}
{\em \-Master\-Or\-Fwd\-Data} & \-It can be the \char`\"{}\-M\-A\-S\-T\-E\-R\char`\"{}, or forwarded input data. \par
\par
 \begin{DoxyVerb}Short description: 052\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}
\hypertarget{classcpphlib_1_1PPKMREHANDLER_acc97f71f70fc017f0e795bd5aa9ac62e}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!clearstatevalues@{clearstatevalues}}
\index{clearstatevalues@{clearstatevalues}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{clearstatevalues}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-clearstatevalues} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_acc97f71f70fc017f0e795bd5aa9ac62e}
\begin{DoxyVerb}Short description: Setting variables describing the state of the rotary encoder to default state\end{DoxyVerb}
 \hypertarget{classcpphlib_1_1PPKMREHANDLER_a3ff0a8036040198e93dc87c5d2d2b250}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!getvalue@{getvalue}}
\index{getvalue@{getvalue}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{getvalue}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-getvalue} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-Event\-Data\-Name}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_a3ff0a8036040198e93dc87c5d2d2b250}


\-Documentation for method. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-It reads the actual value belonging to the defined event 
\begin{DoxyParams}{\-Parameters}
{\em \-Event\-Data\-Name} & \-The name of the data belonging to the certain event. \-Its value can be {\itshape \char`\"{}\-K\-E\-Y\-C\-O\-D\-E\char`\"{}\/} or {\itshape \char`\"{}\-R\-E\-V\-A\-L\-U\-E\char`\"{}\/}. \begin{DoxyVerb}Short description: It reads the actual value belonging to the defined event\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a3e9cb668e8824693a1d371046d824c81}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!inputevent@{inputevent}}
\index{inputevent@{inputevent}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{inputevent}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-inputevent} (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{\-Event\-Name}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_a3e9cb668e8824693a1d371046d824c81}


\-Documentation for method. 

{\bfseries } {\itshape \/} {\bfseries {\itshape \/}} \-It is eventhandler of \hyperlink{classcpphlib_1_1PPKMREHANDLER}{\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}. \-Its return value is {\bfseries {\itshape \-True\/}} in following event cases \-: {\itshape \char`\"{}\-M\-X\-K\-E\-Y\-B\-D\-C\-L\-I\-C\-K\char`\"{}\/} if key is pushed on the keyboard, {\itshape \char`\"{}\-R\-E\-B\-T\-N\-P\-U\-S\-H\char`\"{}\/} if rotary encoder's butthon is pushed, {\itshape \char`\"{}\-R\-E\-B\-T\-N\-R\-E\-L\-E\-A\-S\-E\char`\"{}\/} if rotary endoder's button is released, {\itshape \char`\"{}\-R\-E\-V\-A\-L\-U\-E\-C\-H\-A\-N\-G\-E\char`\"{}\/} if position value of the rotary endoder is changed. \-In case of \char`\"{}\-M\-X\-K\-E\-Y\-B\-D\-C\-L\-I\-C\-K\char`\"{} and \char`\"{}\-R\-E\-V\-A\-L\-U\-E\-C\-H\-A\-N\-G\-E\char`\"{} the {\bfseries getvalue} method is to get the actual value. 
\begin{DoxyParams}{\-Parameters}
{\em \-Event\-Name} & \-The name of the event \par
\par
 \begin{DoxyVerb}Short description: Returns true if any event happened\end{DoxyVerb}
 \\
\hline
\end{DoxyParams}
\hypertarget{classcpphlib_1_1PPKMREHANDLER_a545260a0905ad824c91eeeecc193f989}{\index{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}!stop@{stop}}
\index{stop@{stop}!cpphlib::PPKMREHANDLER@{cpphlib\-::\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R}}
\subsubsection[{stop}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf cpphlib.\-P\-P\-K\-M\-R\-E\-H\-A\-N\-D\-L\-E\-R.\-stop} (
\begin{DoxyParamCaption}
\item[{}]{self}
\end{DoxyParamCaption}
)}}\label{classcpphlib_1_1PPKMREHANDLER_a545260a0905ad824c91eeeecc193f989}
\begin{DoxyVerb}Short description: Stopping the statemachine of the class\end{DoxyVerb}
 

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