\section{CCommandstring Klassenreferenz}
\label{classCCommandstring}\index{CCommandstring@{CCommandstring}}
buildung of a single command block send to fps  


{\tt \#include $<$commandstring.hpp$>$}

\subsection*{\"{O}ffentliche Typen}
\begin{CompactItemize}
\item 
enum {\bf Cmd\-Code} \{ \par
{\bf READ\_\-EEPROM\_\-DATA\_\-REQ} =  0x01, 
{\bf READ\_\-PROGRAM\_\-DATA\_\-REQ} =  0x02, 
{\bf READ\_\-RAM\_\-DATA\_\-REQ} =  0x03, 
{\bf WRITE\_\-EEPROM\_\-DATA\_\-REQ} =  0x04, 
\par
{\bf WRITE\_\-PROGRAM\_\-DATA\_\-REQ} =  0x05, 
{\bf WRITE\_\-RAM\_\-DATA\_\-REQ} =  0x06, 
{\bf READ\_\-EEPROM\_\-DATA\_\-CNF} =  0x81, 
{\bf READ\_\-PROGRAM\_\-DATA\_\-CNF} =  0x82, 
\par
{\bf READ\_\-RAM\_\-DATA\_\-CNF} =  0x83, 
{\bf WRITE\_\-EEPROM\_\-DATA\_\-CNF} =  0x84, 
{\bf WRITE\_\-PROGRAM\_\-DATA\_\-CNF} =  0x85, 
{\bf WRITE\_\-RAM\_\-DATA\_\-CNF} =  0x86, 
\par
{\bf STATUS\_\-INFO} =  0xff
 \}
\begin{CompactList}\small\item\em all possible commandtypes the memory refers always to the build in memory of the fps device \item\end{CompactList}\end{CompactItemize}
\subsection*{\"{O}ffentliche Methoden}
\begin{CompactItemize}
\item 
{\bf CCommandstring} ()
\item 
void {\bf Set\-Use\-Crc\-Check} (bool b\-Use\-Crc)
\begin{CompactList}\small\item\em tells the api to use ( or not ) the crc check when receiving data \item\end{CompactList}\item 
{\bf Cmd\-Code} {\bf Get\-Command} (void) const
\begin{CompactList}\small\item\em delivers the current command \item\end{CompactList}\item 
WORD {\bf Get\-Address} (void) const
\begin{CompactList}\small\item\em delivers the address the current command is pointing to \item\end{CompactList}\item 
unsigned int {\bf Get\-Length} (void) const
\begin{CompactList}\small\item\em delivers the length of the data being send or received \item\end{CompactList}\item 
std::vector$<$ unsigned char $>$ {\bf Get\-Data} (void) const
\begin{CompactList}\small\item\em Delivers the data being send or received. \item\end{CompactList}\item 
const std::vector$<$ unsigned char $>$ \& {\bf Get\-Command\-String} (void) const
\begin{CompactList}\small\item\em Delivers the hole commandstring. \item\end{CompactList}\item 
void {\bf Set\-Command} (const {\bf Cmd\-Code} n\-Command)
\begin{CompactList}\small\item\em set the current command \item\end{CompactList}\item 
void {\bf Set\-Address} (const ADDRESS\_\-TYPE n\-New\-Adress)
\begin{CompactList}\small\item\em sets the address the current command is pointing to \item\end{CompactList}\item 
void {\bf Set\-Length} (const unsigned int ui\-Length)
\begin{CompactList}\small\item\em sets the length of the data being send or received \item\end{CompactList}\item 
void {\bf Set\-Data} (const std::vector$<$ unsigned char $>$ \&auc\-Data)
\begin{CompactList}\small\item\em Set the data to be send. \item\end{CompactList}\item 
bool {\bf Set\-Command\-String} (const std::vector$<$ unsigned char $>$ \&auc\-New\-Commandstring)
\begin{CompactList}\small\item\em Sets the commandstring as a hole. \item\end{CompactList}\item 
bool {\bf Check\-Data} (void)
\begin{CompactList}\small\item\em do the check if the data was transfered correctly \item\end{CompactList}\item 
void {\bf Build\-String} (void)
\begin{CompactList}\small\item\em build the string from the information store in the variables \item\end{CompactList}\end{CompactItemize}
\subsection*{\"{O}ffentliche, statische Methoden}
\begin{CompactItemize}
\item 
void {\bf Debug\-Print\-Routine} (const char const $\ast$pc\-Name, const ADDRESS\_\-TYPE n\-Address, const unsigned int ui\-Length)
\begin{CompactList}\small\item\em for debug reasons : prints out typical function parameter \item\end{CompactList}\item 
void {\bf Debug\-Print\-Routine} (const char const $\ast$pc\-Name, const ADDRESS\_\-TYPE n\-Address, const unsigned int ui\-Length, const std::vector$<$ unsigned char $>$ \&auc\-Data)
\begin{CompactList}\small\item\em for debug reasons : prints out typical function parameter \item\end{CompactList}\item 
void {\bf Debug\-Print\-Vector} (const std::vector$<$ unsigned char $>$ \&auc\-Data)
\begin{CompactList}\small\item\em prints out the overgiven vector \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attribute}
\begin{CompactItemize}
\item 
unsigned int {\bf m\_\-ui\-Length}\label{classCCommandstring_r0}

\item 
{\bf CChecksum} {\bf m\_\-c\-Checksum}\label{classCCommandstring_r1}

\begin{CompactList}\small\item\em Length of the data transfered. \item\end{CompactList}\item 
CHECKSUM\_\-TYPE {\bf m\_\-n\-Checksum}\label{classCCommandstring_r2}

\begin{CompactList}\small\item\em Class used for calculating the checksum. \item\end{CompactList}\item 
std::vector$<$ unsigned char $>$ {\bf m\_\-auc\-Bytes}\label{classCCommandstring_r3}

\begin{CompactList}\small\item\em checksum store in datablock \item\end{CompactList}\item 
{\bf Cmd\-Code} {\bf m\_\-n\-Command}\label{classCCommandstring_r4}

\begin{CompactList}\small\item\em Bytes tranfered to the fps. \item\end{CompactList}\item 
ADDRESS\_\-TYPE {\bf m\_\-n\-Address}\label{classCCommandstring_r5}

\begin{CompactList}\small\item\em Commandcode ( see upove for deatils ). \item\end{CompactList}\item 
bool {\bf m\_\-b\-Use\-Crc\-Check}\label{classCCommandstring_r6}

\begin{CompactList}\small\item\em Address ( of the fps ) for datatranfer ( targetadress ). \item\end{CompactList}\item 
std::vector$<$ unsigned char $>$ {\bf m\_\-auc\-Commandstring}\label{classCCommandstring_r7}

\begin{CompactList}\small\item\em use crc check \item\end{CompactList}\end{CompactItemize}


\subsection{Ausf\"{u}hrliche Beschreibung}
buildung of a single command block send to fps 

\begin{Desc}
\item[Version:]1.0 \end{Desc}
\begin{Desc}
\item[Autor:]Ingo Fr\"{o}hlich \end{Desc}




\subsection{Dokumentation der Aufz\"{a}hlungstypen}
\index{CCommandstring@{CCommandstring}!CmdCode@{CmdCode}}
\index{CmdCode@{CmdCode}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf CCommandstring::Cmd\-Code}}\label{classCCommandstring_w13}


all possible commandtypes the memory refers always to the build in memory of the fps device 

\begin{Desc}
\item[Aufz\"{a}hlungswerte: ]\par
\begin{description}
\index{READ_PROGRAM_DATA_REQ@{READ\_\-PROGRAM\_\-DATA\_\-REQ}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!READ_PROGRAM_DATA_REQ@{READ\_\-PROGRAM\_\-DATA\_\-REQ}}\item[{\em 
READ\_\-PROGRAM\_\-DATA\_\-REQ\label{classCCommandstring_w13w1}
}]read data from eeprom request \index{READ_RAM_DATA_REQ@{READ\_\-RAM\_\-DATA\_\-REQ}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!READ_RAM_DATA_REQ@{READ\_\-RAM\_\-DATA\_\-REQ}}\item[{\em 
READ\_\-RAM\_\-DATA\_\-REQ\label{classCCommandstring_w13w2}
}]read data from program memory request \index{WRITE_EEPROM_DATA_REQ@{WRITE\_\-EEPROM\_\-DATA\_\-REQ}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_EEPROM_DATA_REQ@{WRITE\_\-EEPROM\_\-DATA\_\-REQ}}\item[{\em 
WRITE\_\-EEPROM\_\-DATA\_\-REQ\label{classCCommandstring_w13w3}
}]read data from ram request \index{WRITE_PROGRAM_DATA_REQ@{WRITE\_\-PROGRAM\_\-DATA\_\-REQ}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_PROGRAM_DATA_REQ@{WRITE\_\-PROGRAM\_\-DATA\_\-REQ}}\item[{\em 
WRITE\_\-PROGRAM\_\-DATA\_\-REQ\label{classCCommandstring_w13w4}
}]write data to eeprom request \index{WRITE_RAM_DATA_REQ@{WRITE\_\-RAM\_\-DATA\_\-REQ}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_RAM_DATA_REQ@{WRITE\_\-RAM\_\-DATA\_\-REQ}}\item[{\em 
WRITE\_\-RAM\_\-DATA\_\-REQ\label{classCCommandstring_w13w5}
}]write data to program memory request \index{READ_EEPROM_DATA_CNF@{READ\_\-EEPROM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!READ_EEPROM_DATA_CNF@{READ\_\-EEPROM\_\-DATA\_\-CNF}}\item[{\em 
READ\_\-EEPROM\_\-DATA\_\-CNF\label{classCCommandstring_w13w6}
}]write data to ram request \index{READ_PROGRAM_DATA_CNF@{READ\_\-PROGRAM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!READ_PROGRAM_DATA_CNF@{READ\_\-PROGRAM\_\-DATA\_\-CNF}}\item[{\em 
READ\_\-PROGRAM\_\-DATA\_\-CNF\label{classCCommandstring_w13w7}
}]read confirmation for reading data from eeprom \index{READ_RAM_DATA_CNF@{READ\_\-RAM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!READ_RAM_DATA_CNF@{READ\_\-RAM\_\-DATA\_\-CNF}}\item[{\em 
READ\_\-RAM\_\-DATA\_\-CNF\label{classCCommandstring_w13w8}
}]read confirmation for reading data from program memory \index{WRITE_EEPROM_DATA_CNF@{WRITE\_\-EEPROM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_EEPROM_DATA_CNF@{WRITE\_\-EEPROM\_\-DATA\_\-CNF}}\item[{\em 
WRITE\_\-EEPROM\_\-DATA\_\-CNF\label{classCCommandstring_w13w9}
}]read confirmation for reading data from ram \index{WRITE_PROGRAM_DATA_CNF@{WRITE\_\-PROGRAM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_PROGRAM_DATA_CNF@{WRITE\_\-PROGRAM\_\-DATA\_\-CNF}}\item[{\em 
WRITE\_\-PROGRAM\_\-DATA\_\-CNF\label{classCCommandstring_w13w10}
}]write confirmation for writing data to eeprom \index{WRITE_RAM_DATA_CNF@{WRITE\_\-RAM\_\-DATA\_\-CNF}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!WRITE_RAM_DATA_CNF@{WRITE\_\-RAM\_\-DATA\_\-CNF}}\item[{\em 
WRITE\_\-RAM\_\-DATA\_\-CNF\label{classCCommandstring_w13w11}
}]write confirmation for writing data to program memory \index{STATUS_INFO@{STATUS\_\-INFO}!CCommandstring@{CCommandstring}}\index{CCommandstring@{CCommandstring}!STATUS_INFO@{STATUS\_\-INFO}}\item[{\em 
STATUS\_\-INFO\label{classCCommandstring_w13w12}
}]write confirmation for writing data to ram \end{description}
\end{Desc}



\subsection{Beschreibung der Konstruktoren und Destruktoren}
\index{CCommandstring@{CCommandstring}!CCommandstring@{CCommandstring}}
\index{CCommandstring@{CCommandstring}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}CCommandstring::CCommandstring ()\hspace{0.3cm}{\tt  [inline]}}\label{classCCommandstring_a0}


\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}


\subsection{Dokumentation der Elementfunktionen}
\index{CCommandstring@{CCommandstring}!BuildString@{BuildString}}
\index{BuildString@{BuildString}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Build\-String (void)}\label{classCCommandstring_a14}


build the string from the information store in the variables 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!CheckData@{CheckData}}
\index{CheckData@{CheckData}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CCommandstring::Check\-Data (void)}\label{classCCommandstring_a13}


do the check if the data was transfered correctly 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]true data is ok 

false data is corrupt \end{Desc}
\index{CCommandstring@{CCommandstring}!DebugPrintRoutine@{DebugPrintRoutine}}
\index{DebugPrintRoutine@{DebugPrintRoutine}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Debug\-Print\-Routine (const char const $\ast$ {\em pc\-Name}, const ADDRESS\_\-TYPE {\em n\-Address}, const unsigned int {\em ui\-Length}, const std::vector$<$ unsigned char $>$ \& {\em auc\-Data})\hspace{0.3cm}{\tt  [static]}}\label{classCCommandstring_e1}


for debug reasons : prints out typical function parameter 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Name}]of the routine ( function ) \item[{\em Address}]in the fps \item[{\em Length}]of the range in the fps \item[{\em vector}]( unsigned char ) ( overgiven data ) \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!DebugPrintRoutine@{DebugPrintRoutine}}
\index{DebugPrintRoutine@{DebugPrintRoutine}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Debug\-Print\-Routine (const char const $\ast$ {\em pc\-Name}, const ADDRESS\_\-TYPE {\em n\-Address}, const unsigned int {\em ui\-Length})\hspace{0.3cm}{\tt  [static]}}\label{classCCommandstring_e0}


for debug reasons : prints out typical function parameter 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em Name}]of the routine ( function ) \item[{\em Address}]in the fps \item[{\em Length}]of the range in the fps \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!DebugPrintVector@{DebugPrintVector}}
\index{DebugPrintVector@{DebugPrintVector}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Debug\-Print\-Vector (const std::vector$<$ unsigned char $>$ \& {\em auc\-Data})\hspace{0.3cm}{\tt  [static]}}\label{classCCommandstring_e2}


prints out the overgiven vector 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em vector}]( unsigned char ) \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!GetAddress@{GetAddress}}
\index{GetAddress@{GetAddress}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ADDRESS\_\-TYPE CCommandstring::Get\-Address (void) const}\label{classCCommandstring_a4}


delivers the address the current command is pointing to 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]address \end{Desc}
\index{CCommandstring@{CCommandstring}!GetCommand@{GetCommand}}
\index{GetCommand@{GetCommand}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf CCommandstring::Cmd\-Code} CCommandstring::Get\-Command (void) const}\label{classCCommandstring_a3}


delivers the current command 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]commandcode \end{Desc}
\index{CCommandstring@{CCommandstring}!GetCommandString@{GetCommandString}}
\index{GetCommandString@{GetCommandString}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const std::vector$<$ unsigned char $>$ \& CCommandstring::Get\-Command\-String (void) const}\label{classCCommandstring_a7}


Delivers the hole commandstring. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]vector with the commandstring \end{Desc}
\index{CCommandstring@{CCommandstring}!GetData@{GetData}}
\index{GetData@{GetData}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ unsigned char $>$ CCommandstring::Get\-Data (void) const}\label{classCCommandstring_a6}


Delivers the data being send or received. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]vector with the current data \end{Desc}
\index{CCommandstring@{CCommandstring}!GetLength@{GetLength}}
\index{GetLength@{GetLength}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned int CCommandstring::Get\-Length (void) const}\label{classCCommandstring_a5}


delivers the length of the data being send or received 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em ---}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]length \end{Desc}
\index{CCommandstring@{CCommandstring}!SetAddress@{SetAddress}}
\index{SetAddress@{SetAddress}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Set\-Address (const ADDRESS\_\-TYPE {\em n\-New\-Adress})}\label{classCCommandstring_a9}


sets the address the current command is pointing to 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em the}]new address \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!SetCommand@{SetCommand}}
\index{SetCommand@{SetCommand}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Set\-Command (const {\bf Cmd\-Code} {\em n\-Command})}\label{classCCommandstring_a8}


set the current command 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em commandcode}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!SetCommandString@{SetCommandString}}
\index{SetCommandString@{SetCommandString}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CCommandstring::Set\-Command\-String (const std::vector$<$ unsigned char $>$ \& {\em auc\-New\-Commandstring})}\label{classCCommandstring_a12}


Sets the commandstring as a hole. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em vector}]with the new Commandstring \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]bool true =$>$ commandstring seems to be valid 

bool false =$>$ commandstring is invalid \end{Desc}
\index{CCommandstring@{CCommandstring}!SetData@{SetData}}
\index{SetData@{SetData}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Set\-Data (const std::vector$<$ unsigned char $>$ \& {\em auc\-Data})}\label{classCCommandstring_a11}


Set the data to be send. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em vector}]with the data to be set \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!SetLength@{SetLength}}
\index{SetLength@{SetLength}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Set\-Length (const unsigned int {\em ui\-Length})}\label{classCCommandstring_a10}


sets the length of the data being send or received 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em length}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}
\index{CCommandstring@{CCommandstring}!SetUseCrcCheck@{SetUseCrcCheck}}
\index{SetUseCrcCheck@{SetUseCrcCheck}!CCommandstring@{CCommandstring}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CCommandstring::Set\-Use\-Crc\-Check (bool {\em b\-Use\-Crc})}\label{classCCommandstring_a2}


tells the api to use ( or not ) the crc check when receiving data 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em true}]: use Check \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]--- \end{Desc}


Die Dokumentation f\"{u}r diese Klasse wurde erzeugt aufgrund der Dateien:\begin{CompactItemize}
\item 
commandstring.hpp\item 
commandstring.cpp\end{CompactItemize}
