\doxysection{Usb\+Communication Class Reference}
\hypertarget{a00862}{}\label{a00862}\index{UsbCommunication@{UsbCommunication}}


This class handles the USB communication.  




{\ttfamily \#include $<$Usb\+Communication.\+h$>$}

Inheritance diagram for Usb\+Communication\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a00862}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00862_aa2e4bc5f7c1d0abc95a60182d53ee4df}{Usb\+Communication}} ()
\begin{DoxyCompactList}\small\item\em Base constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00862_aa371a8933c69e0213da6fdecbffbeddb}{Usb\+Communication}} (MONITORING\+\_\+\+MODE monitoring)
\item 
\mbox{\hyperlink{a00862_a516112faf69ef8109a631188cd51aa2b}{Usb\+Communication}} (\mbox{\hyperlink{a00870}{Usb\+Settings}} \texorpdfstring{$\ast$}{*}settings)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00862_a628df8dba283d0a6df25688d9fb93044}{Usb\+Communication}} (\mbox{\hyperlink{a00870}{Usb\+Settings}} \texorpdfstring{$\ast$}{*}settings, MONITORING\+\_\+\+MODE monitoring)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00862_afb74ca4a7978c17e58e6b8cfe5056947}{\texorpdfstring{$\sim$}{\string~}\+Usb\+Communication}} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00778}{Communication\+Status}} \mbox{\hyperlink{a00862_a095a939211ae0f4e590c41bef1e4aed5}{Connect}} ()
\begin{DoxyCompactList}\small\item\em Connects to the USB Device. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00778}{Communication\+Status}} \mbox{\hyperlink{a00862_ae338b1d4c1524b7ef6416847c0879785}{Connect}} (bool reconnecting)
\begin{DoxyCompactList}\small\item\em Connects to the USB Device. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{a00862_ae446da55d8b4e86bd08f121f3ae13525}{Disconnect}} ()
\begin{DoxyCompactList}\small\item\em Disconnect from the USB device. \end{DoxyCompactList}\item 
string \mbox{\hyperlink{a00862_a6a8c0af6e706c2bc5daf568f7004c41b}{Send\+Command}} (string command\+To\+Send)
\begin{DoxyCompactList}\small\item\em Send a string command on the appropriate communication channel media. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a00842}{Raw\+Data}} \mbox{\hyperlink{a00862_ab27b014f593af4414de1904d0286356f}{Wait\+For\+Raw\+Data}} (int wait\+Timeout, unsigned long \texorpdfstring{$\ast$}{*}sem\+Status)
\begin{DoxyCompactList}\small\item\em Wait the callback to produce a RAW DATA. This method will wait on the appropriate semaphore to produce a data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static vector$<$ \mbox{\hyperlink{a00866}{Usb\+Information}} $>$ \mbox{\hyperlink{a00862_ad3fad861589b3b90cbaca811a55c0d0c}{Get\+Device\+List}} ()
\begin{DoxyCompactList}\small\item\em A static method that retrieve the devices wired to the computer throug USB. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
const int \mbox{\hyperlink{a00862_adf5af1683ed1ddd58def1f873e75dd38}{COMMAND\+\_\+\+ACK\+\_\+\+TIMEOUT}} = 20000
\item 
const int \mbox{\hyperlink{a00862_aa89716014f0896b9a5b5056d0c1df393}{MAX\+\_\+\+SIZE\+\_\+\+TO\+\_\+\+READ}} = 40000
\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00778}{Communication\+Status}} \mbox{\hyperlink{a00862_a618e17c1f0624be68f9aed3192808ea2}{Get\+Connection\+Status}} ()
\begin{DoxyCompactList}\small\item\em Returns the comminication status (NOT IMPLEMENTED FOR USB) -\/\texorpdfstring{$>$}{>} Always return 0. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class handles the USB communication. 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{a00862_aa2e4bc5f7c1d0abc95a60182d53ee4df}\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{UsbCommunication()}{UsbCommunication()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \label{a00862_aa2e4bc5f7c1d0abc95a60182d53ee4df} 
Usb\+Communication\+::\+Usb\+Communication (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}



Base constructor. 

\Hypertarget{a00862_aa371a8933c69e0213da6fdecbffbeddb}\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{UsbCommunication()}{UsbCommunication()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \label{a00862_aa371a8933c69e0213da6fdecbffbeddb} 
Usb\+Communication\+::\+Usb\+Communication (\begin{DoxyParamCaption}\item[{MONITORING\+\_\+\+MODE}]{monitoring}{}\end{DoxyParamCaption})}

\Hypertarget{a00862_a516112faf69ef8109a631188cd51aa2b}\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{UsbCommunication()}{UsbCommunication()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \label{a00862_a516112faf69ef8109a631188cd51aa2b} 
Usb\+Communication\+::\+Usb\+Communication (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{a00870}{Usb\+Settings}} \texorpdfstring{$\ast$}{*}}]{settings}{}\end{DoxyParamCaption})}



Copy constructor. 

\Hypertarget{a00862_a628df8dba283d0a6df25688d9fb93044}\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\index{UsbCommunication@{UsbCommunication}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{UsbCommunication()}{UsbCommunication()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \label{a00862_a628df8dba283d0a6df25688d9fb93044} 
Usb\+Communication\+::\+Usb\+Communication (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{a00870}{Usb\+Settings}} \texorpdfstring{$\ast$}{*}}]{settings}{, }\item[{MONITORING\+\_\+\+MODE}]{monitoring}{}\end{DoxyParamCaption})}



Copy constructor. 

\Hypertarget{a00862_afb74ca4a7978c17e58e6b8cfe5056947}\index{UsbCommunication@{UsbCommunication}!````~UsbCommunication@{\texorpdfstring{$\sim$}{\string~}UsbCommunication}}
\index{````~UsbCommunication@{\texorpdfstring{$\sim$}{\string~}UsbCommunication}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}UsbCommunication()}{\string~UsbCommunication()}}
{\footnotesize\ttfamily \label{a00862_afb74ca4a7978c17e58e6b8cfe5056947} 
Usb\+Communication\+::\texorpdfstring{$\sim$}{\string~}\+Usb\+Communication (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}



Destructor. 



\doxysubsection{Member Function Documentation}
\Hypertarget{a00862_a095a939211ae0f4e590c41bef1e4aed5}\index{UsbCommunication@{UsbCommunication}!Connect@{Connect}}
\index{Connect@{Connect}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{Connect()}{Connect()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{a00862_a095a939211ae0f4e590c41bef1e4aed5} 
\mbox{\hyperlink{a00778}{Communication\+Status}} Usb\+Communication\+::\+Connect (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}



Connects to the USB Device. 

\Hypertarget{a00862_ae338b1d4c1524b7ef6416847c0879785}\index{UsbCommunication@{UsbCommunication}!Connect@{Connect}}
\index{Connect@{Connect}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{Connect()}{Connect()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{a00862_ae338b1d4c1524b7ef6416847c0879785} 
\mbox{\hyperlink{a00778}{Communication\+Status}} Usb\+Communication\+::\+Connect (\begin{DoxyParamCaption}\item[{bool}]{reconnecting}{}\end{DoxyParamCaption})}



Connects to the USB Device. 

Connects to the USB Device \Hypertarget{a00862_ae446da55d8b4e86bd08f121f3ae13525}\index{UsbCommunication@{UsbCommunication}!Disconnect@{Disconnect}}
\index{Disconnect@{Disconnect}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{Disconnect()}{Disconnect()}}
{\footnotesize\ttfamily \label{a00862_ae446da55d8b4e86bd08f121f3ae13525} 
void Usb\+Communication\+::\+Disconnect (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}



Disconnect from the USB device. 

\Hypertarget{a00862_a618e17c1f0624be68f9aed3192808ea2}\index{UsbCommunication@{UsbCommunication}!GetConnectionStatus@{GetConnectionStatus}}
\index{GetConnectionStatus@{GetConnectionStatus}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{GetConnectionStatus()}{GetConnectionStatus()}}
{\footnotesize\ttfamily \label{a00862_a618e17c1f0624be68f9aed3192808ea2} 
\mbox{\hyperlink{a00778}{Communication\+Status}} Usb\+Communication\+::\+Get\+Connection\+Status (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Returns the comminication status (NOT IMPLEMENTED FOR USB) -\/\texorpdfstring{$>$}{>} Always return 0. 

\begin{DoxyReturn}{Returns}
Success = 0, -\/1 for failure
\end{DoxyReturn}


\begin{DoxyReturn}{Returns}
Encapsulated result
\end{DoxyReturn}
\Hypertarget{a00862_ad3fad861589b3b90cbaca811a55c0d0c}\index{UsbCommunication@{UsbCommunication}!GetDeviceList@{GetDeviceList}}
\index{GetDeviceList@{GetDeviceList}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{GetDeviceList()}{GetDeviceList()}}
{\footnotesize\ttfamily \label{a00862_ad3fad861589b3b90cbaca811a55c0d0c} 
vector$<$ \mbox{\hyperlink{a00866}{Usb\+Information}} $>$ Usb\+Communication\+::\+Get\+Device\+List (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



A static method that retrieve the devices wired to the computer throug USB. 

\begin{DoxyReturn}{Returns}
A detailed list of conected devices
\end{DoxyReturn}
\Hypertarget{a00862_a6a8c0af6e706c2bc5daf568f7004c41b}\index{UsbCommunication@{UsbCommunication}!SendCommand@{SendCommand}}
\index{SendCommand@{SendCommand}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{SendCommand()}{SendCommand()}}
{\footnotesize\ttfamily \label{a00862_a6a8c0af6e706c2bc5daf568f7004c41b} 
string Usb\+Communication\+::\+Send\+Command (\begin{DoxyParamCaption}\item[{string}]{command\+To\+Send}{}\end{DoxyParamCaption})}



Send a string command on the appropriate communication channel media. 


\begin{DoxyParams}{Parameters}
{\em command\+To\+Send} & The command to send as a string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A string representing the command replied on the communication channel media
\end{DoxyReturn}
\Hypertarget{a00862_ab27b014f593af4414de1904d0286356f}\index{UsbCommunication@{UsbCommunication}!WaitForRawData@{WaitForRawData}}
\index{WaitForRawData@{WaitForRawData}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{WaitForRawData()}{WaitForRawData()}}
{\footnotesize\ttfamily \label{a00862_ab27b014f593af4414de1904d0286356f} 
\mbox{\hyperlink{a00842}{Raw\+Data}} Usb\+Communication\+::\+Wait\+For\+Raw\+Data (\begin{DoxyParamCaption}\item[{int}]{wait\+Timeout}{, }\item[{unsigned long \texorpdfstring{$\ast$}{*}}]{sem\+Status}{}\end{DoxyParamCaption})}



Wait the callback to produce a RAW DATA. This method will wait on the appropriate semaphore to produce a data. 


\begin{DoxyParams}{Parameters}
{\em wait\+Timeout} & The amount of miliseconds the process has to wait befor being released\\
\hline
{\em sem\+Status} & The status of the semaphore (updated by reference)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the RAW Data
\end{DoxyReturn}



\begin{DoxyParams}{Parameters}
{\em wait\+Timeout} & The amount of miliseconds the process has to wait befor being released\\
\hline
{\em sem\+Status} & The status of the semaphore (updated by reference)\\
\hline
\end{DoxyParams}
~\newline
 \begin{DoxyReturn}{Returns}
A pointer to the RAW Data
\end{DoxyReturn}


\doxysubsection{Member Data Documentation}
\Hypertarget{a00862_adf5af1683ed1ddd58def1f873e75dd38}\index{UsbCommunication@{UsbCommunication}!COMMAND\_ACK\_TIMEOUT@{COMMAND\_ACK\_TIMEOUT}}
\index{COMMAND\_ACK\_TIMEOUT@{COMMAND\_ACK\_TIMEOUT}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{COMMAND\_ACK\_TIMEOUT}{COMMAND\_ACK\_TIMEOUT}}
{\footnotesize\ttfamily \label{a00862_adf5af1683ed1ddd58def1f873e75dd38} 
const int Usb\+Communication\+::\+COMMAND\+\_\+\+ACK\+\_\+\+TIMEOUT = 20000}

\Hypertarget{a00862_aa89716014f0896b9a5b5056d0c1df393}\index{UsbCommunication@{UsbCommunication}!MAX\_SIZE\_TO\_READ@{MAX\_SIZE\_TO\_READ}}
\index{MAX\_SIZE\_TO\_READ@{MAX\_SIZE\_TO\_READ}!UsbCommunication@{UsbCommunication}}
\doxysubsubsection{\texorpdfstring{MAX\_SIZE\_TO\_READ}{MAX\_SIZE\_TO\_READ}}
{\footnotesize\ttfamily \label{a00862_aa89716014f0896b9a5b5056d0c1df393} 
const int Usb\+Communication\+::\+MAX\+\_\+\+SIZE\+\_\+\+TO\+\_\+\+READ = 40000}



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Usb\+Communication.\+h\item 
Usb\+Communication.\+cpp\end{DoxyCompactItemize}
