\section{CTCPIPComm Klassenreferenz}
\label{classCTCPIPComm}\index{CTCPIPComm@{CTCPIPComm}}
Class of CTCPIPComm.  


{\tt \#include $<$TCPIPComm.h$>$}

Klassendiagramm f\"{u}r CTCPIPComm::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=5cm]{classCTCPIPComm}
\end{center}
\end{figure}
\subsection*{\"{O}ffentliche Methoden}
\begin{CompactItemize}
\item 
{\bf CTCPIPComm} (const short TCPport, const char $\ast$p\-IPAddress, const bool Passive\-Connection, const long Max\-Send\-Data\-Len, const long Max\-Recv\-Data\-Len)
\begin{CompactList}\small\item\em Conctuctor creates a new object of CTCPIPComm. \item\end{CompactList}\item 
virtual {\bf $\sim$CTCPIPComm} ()\label{classCTCPIPComm_a1}

\begin{CompactList}\small\item\em destructor \item\end{CompactList}\item 
int {\bf Get\-Last\-Socket\-Error} (void) const
\begin{CompactList}\small\item\em Get\-Last\-Socket\-Error returns the last socket error occured. \item\end{CompactList}\item 
bool {\bf Is\-Connected} (void) const
\begin{CompactList}\small\item\em Is\-Connected returns the connection state of the connection. \item\end{CompactList}\item 
bool {\bf Connect\-Request} (void)
\begin{CompactList}\small\item\em Connect\-Request Tries to connect to the communication partner. \item\end{CompactList}\item 
bool {\bf Send} (const void $\ast$p\-Data, const long Data\-Len)
\begin{CompactList}\small\item\em Send Transmits the given data to the communication partner. \item\end{CompactList}\end{CompactItemize}
\subsection*{Gesch\"{u}tzte Methoden}
\begin{CompactItemize}
\item 
virtual void {\bf Connect\-Indication} (void)=0
\begin{CompactList}\small\item\em Connect\-Indication Indicates that the TCP/IP connection is established, pure virtual function. \item\end{CompactList}\item 
virtual void {\bf Disconnect\-Indication} (void)=0
\begin{CompactList}\small\item\em Disconnect\-Indication Indicates that the TCP/IP connection was broken down. \item\end{CompactList}\item 
{\bf CTCPIPComm} (void)
\begin{CompactList}\small\item\em Conctuctor. \item\end{CompactList}\item 
void {\bf Initialize} (const short TCPport, const char $\ast$p\-IPAddress, const bool Passive\-Connection, const long Max\-Send\-Data\-Len, const long Max\-Recv\-Data\-Len)
\begin{CompactList}\small\item\em Conctuctor Initializes a object of CTCPIPComm. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Methoden}
\begin{CompactItemize}
\item 
void {\bf Con\-Ind} (void)
\begin{CompactList}\small\item\em Con\-Ind Will be called from {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})} indicating estalished connection. \item\end{CompactList}\item 
void {\bf Dis\-Ind} (void)
\begin{CompactList}\small\item\em Dis\-Ind Will be called from {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})} indicating a broken connection. \item\end{CompactList}\item 
void {\bf Recv\-Dis\-Ind} (void)
\begin{CompactList}\small\item\em Recv\-Dis\-Ind Will be called from CTCPIPComm\-Recv indicating a broken connection. \item\end{CompactList}\item 
void {\bf Send\-Dis\-Ind} (void)
\begin{CompactList}\small\item\em Send\-Dis\-Ind Will be called from {\bf CTCPIPComm\-Send}{\rm (S.\,\pageref{classCTCPIPCommSend})} indicating a broken connection. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attribute}
\begin{CompactItemize}
\item 
int {\bf m\_\-Last\-Socket\-Error}\label{classCTCPIPComm_r0}

\item 
bool {\bf m\_\-Passive\-Connection}\label{classCTCPIPComm_r1}

\item 
bool {\bf m\_\-Line\-Connected}\label{classCTCPIPComm_r2}

\item 
SOCKADDR\_\-IN {\bf m\_\-Remote\-Addr}\label{classCTCPIPComm_r3}

\item 
SOCKET {\bf m\_\-Passive\-Socket}\label{classCTCPIPComm_r4}

\item 
bool {\bf m\_\-b\-Initialized}\label{classCTCPIPComm_r5}

\item 
bool {\bf m\_\-b\-Terminating}\label{classCTCPIPComm_r6}

\end{CompactItemize}
\subsection*{Statische private Attribute}
\begin{CompactItemize}
\item 
int {\bf m\_\-Num\-Of\-Instances} = 0\label{classCTCPIPComm_v0}

\item 
bool {\bf m\_\-b\-Array\-Used} [MAX\_\-DIF\_\-ADDR] = \{ false, false \}\label{classCTCPIPComm_v1}

\item 
SOCKADDR\_\-IN {\bf m\_\-Array\-Remote\-Addr} [MAX\_\-DIF\_\-ADDR] = \{ 0, 0 \}\label{classCTCPIPComm_v2}

\item 
SOCKET {\bf m\_\-Array\-Passive\-Socket} [MAX\_\-DIF\_\-ADDR] = \{ INVALID\_\-SOCKET, INVALID\_\-SOCKET \}\label{classCTCPIPComm_v3}

\end{CompactItemize}


\subsection{Ausf\"{u}hrliche Beschreibung}
Class of CTCPIPComm. 

\begin{Desc}
\item[Version:]1.1 \end{Desc}
\begin{Desc}
\item[Autor:]Udo Weber \end{Desc}




\subsection{Beschreibung der Konstruktoren und Destruktoren}
\index{CTCPIPComm@{CTCPIPComm}!CTCPIPComm@{CTCPIPComm}}
\index{CTCPIPComm@{CTCPIPComm}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}CTCPIPComm::CTCPIPComm (const short {\em TCPport}, const char $\ast$ {\em p\-IPAddress}, const bool {\em Passive\-Connection}, const long {\em Max\-Send\-Data\-Len}, const long {\em Max\-Recv\-Data\-Len})}\label{classCTCPIPComm_a0}


Conctuctor creates a new object of CTCPIPComm. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em TCPport}]Port number to be used for communication \item[{\em p\-IPAddress}]NULL terminated string containing IP Address or Name \item[{\em Passive\-Connection}]true if awaiting the connection from partner \item[{\em Max\-Send\-Data\-Len}]Maximum length for sending messages \item[{\em Max\-Recv\-Data\-Len}]Maximum length for receiving messages \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPComm@{CTCPIPComm}!CTCPIPComm@{CTCPIPComm}}
\index{CTCPIPComm@{CTCPIPComm}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}CTCPIPComm::CTCPIPComm (void)\hspace{0.3cm}{\tt  [protected]}}\label{classCTCPIPComm_b2}


Conctuctor. 

Initialize-Funktion has to be used when this constructor is used. 

\subsection{Dokumentation der Elementfunktionen}
\index{CTCPIPComm@{CTCPIPComm}!ConInd@{ConInd}}
\index{ConInd@{ConInd}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm::Con\-Ind (void)\hspace{0.3cm}{\tt  [private, virtual]}}\label{classCTCPIPComm_d0}


Con\-Ind Will be called from {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})} indicating estalished connection. 

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


Implementiert {\bf CTCPIPComm\-Connect} {\rm (S.\,\pageref{classCTCPIPCommConnect_b0})}.\index{CTCPIPComm@{CTCPIPComm}!ConnectIndication@{ConnectIndication}}
\index{ConnectIndication@{ConnectIndication}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void CTCPIPComm::Connect\-Indication (void)\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{classCTCPIPComm_b0}


Connect\-Indication Indicates that the TCP/IP connection is established, pure virtual function. 

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


Implementiert in {\bf Cfps} {\rm (S.\,\pageref{classCfps_d19})}.\index{CTCPIPComm@{CTCPIPComm}!ConnectRequest@{ConnectRequest}}
\index{ConnectRequest@{ConnectRequest}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CTCPIPComm::Connect\-Request (void)}\label{classCTCPIPComm_a4}


Connect\-Request Tries to connect to the communication partner. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]true if function call successful (does not mean that the connection was connected --$>$ Connect\-Indication \end{Desc}
\index{CTCPIPComm@{CTCPIPComm}!DisconnectIndication@{DisconnectIndication}}
\index{DisconnectIndication@{DisconnectIndication}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void CTCPIPComm::Disconnect\-Indication (void)\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{classCTCPIPComm_b1}


Disconnect\-Indication Indicates that the TCP/IP connection was broken down. 

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


Implementiert in {\bf Cfps} {\rm (S.\,\pageref{classCfps_d20})}.\index{CTCPIPComm@{CTCPIPComm}!DisInd@{DisInd}}
\index{DisInd@{DisInd}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm::Dis\-Ind (void)\hspace{0.3cm}{\tt  [private, virtual]}}\label{classCTCPIPComm_d1}


Dis\-Ind Will be called from {\bf CTCPIPComm\-Connect}{\rm (S.\,\pageref{classCTCPIPCommConnect})} indicating a broken connection. 

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


Implementiert {\bf CTCPIPComm\-Connect} {\rm (S.\,\pageref{classCTCPIPCommConnect_b1})}.\index{CTCPIPComm@{CTCPIPComm}!GetLastSocketError@{GetLastSocketError}}
\index{GetLastSocketError@{GetLastSocketError}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int CTCPIPComm::Get\-Last\-Socket\-Error (void) const\hspace{0.3cm}{\tt  [inline]}}\label{classCTCPIPComm_a2}


Get\-Last\-Socket\-Error returns the last socket error occured. 

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


Erneute Implementation von {\bf CTCPIPComm\-Connect} {\rm (S.\,\pageref{classCTCPIPCommConnect_a5})}.\index{CTCPIPComm@{CTCPIPComm}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm::Initialize (const short {\em TCPport}, const char $\ast$ {\em p\-IPAddress}, const bool {\em Passive\-Connection}, const long {\em Max\-Send\-Data\-Len}, const long {\em Max\-Recv\-Data\-Len})\hspace{0.3cm}{\tt  [protected]}}\label{classCTCPIPComm_b3}


Conctuctor Initializes a object of CTCPIPComm. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em TCPport}]Port number to be used for communication \item[{\em p\-IPAddress}]NULL terminated string containing IP Address or Name \item[{\em Passive\-Connection}]true if awaiting the connection from partner \item[{\em Max\-Send\-Data\-Len}]Maximum length for sending messages \item[{\em Max\-Recv\-Data\-Len}]Maximum length for receiving messages \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]- \end{Desc}
\index{CTCPIPComm@{CTCPIPComm}!IsConnected@{IsConnected}}
\index{IsConnected@{IsConnected}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CTCPIPComm::Is\-Connected (void) const\hspace{0.3cm}{\tt  [inline]}}\label{classCTCPIPComm_a3}


Is\-Connected returns the connection state of the connection. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em -}]\end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]true if connection established, otherwise false \end{Desc}


Erneute Implementation in {\bf CTCPIPConnector} {\rm (S.\,\pageref{classCTCPIPConnector_a19})}.\index{CTCPIPComm@{CTCPIPComm}!RecvDisInd@{RecvDisInd}}
\index{RecvDisInd@{RecvDisInd}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm::Recv\-Dis\-Ind (void)\hspace{0.3cm}{\tt  [private, virtual]}}\label{classCTCPIPComm_d2}


Recv\-Dis\-Ind Will be called from CTCPIPComm\-Recv indicating a broken connection. 

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


Implementiert {\bf CTCPIPComm\-Receive} {\rm (S.\,\pageref{classCTCPIPCommReceive_b1})}.\index{CTCPIPComm@{CTCPIPComm}!Send@{Send}}
\index{Send@{Send}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool CTCPIPComm::Send (const void $\ast$ {\em p\-Data}, const long {\em Data\-Len})}\label{classCTCPIPComm_a5}


Send Transmits the given data to the communication partner. 

\begin{Desc}
\item[Parameter:]
\begin{description}
\item[{\em p\-Data}]Pointer to the data to be sent \item[{\em Data\-Len}]Length of the data \end{description}
\end{Desc}
\begin{Desc}
\item[R\"{u}ckgabe:]true if function call successful \end{Desc}


Erneute Implementation von {\bf CTCPIPComm\-Send} {\rm (S.\,\pageref{classCTCPIPCommSend_a3})}.\index{CTCPIPComm@{CTCPIPComm}!SendDisInd@{SendDisInd}}
\index{SendDisInd@{SendDisInd}!CTCPIPComm@{CTCPIPComm}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CTCPIPComm::Send\-Dis\-Ind (void)\hspace{0.3cm}{\tt  [private, virtual]}}\label{classCTCPIPComm_d3}


Send\-Dis\-Ind Will be called from {\bf CTCPIPComm\-Send}{\rm (S.\,\pageref{classCTCPIPCommSend})} indicating a broken connection. 

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


Implementiert {\bf CTCPIPComm\-Send} {\rm (S.\,\pageref{classCTCPIPCommSend_b0})}.

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