\doxysection{WEthernet\+Communication.\+h}
\hypertarget{a00527_source}{}\label{a00527_source}\index{WEthernetCommunication.h@{WEthernetCommunication.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ \textcolor{comment}{//\#include\ "{}WBaseCommunication.h"{}}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}WEthernetSettings.h"{}}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{a00613}{WCommunication}}\ \{}
\DoxyCodeLine{00006\ \ \ \ \ \textcolor{keyword}{public\ ref\ class}\ \mbox{\hyperlink{a00960}{WEthernetCommunication}}\ :\ \textcolor{keyword}{public}\ WBaseCommunication}
\DoxyCodeLine{00007\ \ \ \ \ \{\ \ \ \ \ \ \ }
\DoxyCodeLine{00008\ \ \ \ \ \textcolor{keyword}{public}:\ \ \ \ \ }
\DoxyCodeLine{00009\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00960_a238cc34719c95bd894f45c53f1ae6ce9}{WEthernetCommunication}}()\ :\ WBaseCommunication()\ \{\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00010\ \ \ \ \ \ \ \ \ \ \ \ \ \_communication\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{a00832}{EthernetCommunication}}(AUTO\_RECONNECT);}
\DoxyCodeLine{00011\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00960_a3f9d8b734ad5e2dda7cc14702f55f800}{\string~WEthernetCommunication}}()\ \{}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete}(\_communication);\ }
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00960_a0e1de5c96b03facfe9fc52f51e9439f5}{WEthernetCommunication}}(\mbox{\hyperlink{a00964}{WEthernetSettings}}\string^\ pEthernetSettings)\ :\ WBaseCommunication()\ \{}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \ \ \ \ Settings\ =\ pEthernetSettings;\ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \ \ \ \ \_communication\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{a00832}{EthernetCommunication}}((\mbox{\hyperlink{a00836}{EthernetSettings}}*)pEthernetSettings-\/>\_\_nativeSettings,\ AUTO\_RECONNECT);}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00948}{WCommunicationStatus}}\string^\ \mbox{\hyperlink{a00960_a56651766702cca0ef08b865b06ef6927}{Connect}}()\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00816}{CommunicationStatus}}\ status\ =\ \_communication-\/>Connect();}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00948}{WCommunicationStatus}}\string^\ toReturn\ =\ gcnew\ \mbox{\hyperlink{a00948}{WCommunicationStatus}}();}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ status.\mbox{\hyperlink{a00816_a87cc1983ca0089337a5f71ad795dcff8}{Channels}}.size();\ i++)\ \{}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a00936}{WChannel}}\string^\ toAdd\ =\ gcnew\ \mbox{\hyperlink{a00936}{WChannel}}();}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ toAdd-\/>RawDataAvailability\ =\ \textcolor{keyword}{static\_cast<}DataAvailabilityEnum\textcolor{keyword}{>}(status.\mbox{\hyperlink{a00816_a87cc1983ca0089337a5f71ad795dcff8}{Channels}}[i].RawDataAvailability);}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ toAdd-\/>\mbox{\hyperlink{a00936_a7cc59dd4b6cab51b0f1155dde4f85a36}{Type}}\ =\ \textcolor{keyword}{static\_cast<}ChannelTypeEnum\textcolor{keyword}{>}(status.\mbox{\hyperlink{a00816_a87cc1983ca0089337a5f71ad795dcff8}{Channels}}[i].Type);}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ toReturn-\/>\mbox{\hyperlink{a00948_a8c45b6f68a51768ba69be0c4fa95c763}{Channels}}-\/>Add(toAdd);}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ toReturn-\/>ErrorCode\ =\ gcnew\ \mbox{\hyperlink{a00940}{WCommunicationErrorCode}}();}
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \ \ \ \ toReturn-\/>ErrorCode-\/>ErrorCode\ =\ status.\mbox{\hyperlink{a00816_aa6728b7808f69b23990630e64d37fbc0}{ErrorCode}}.\mbox{\hyperlink{a00808_af710215988a642bb36b0e93f61341e9a}{ErrorCode}};}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \ \ \ \ toReturn-\/>ErrorCode-\/>ErrorMeaning\ =\ gcnew\ String(status.\mbox{\hyperlink{a00816_aa6728b7808f69b23990630e64d37fbc0}{ErrorCode}}.\mbox{\hyperlink{a00808_a2411f96315b686ae04af6c8ce56432fe}{ErrorMeaning}}.c\_str());}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ toReturn-\/>Status\ =\ \textcolor{keyword}{static\_cast<}ConnectionStatusEnum\textcolor{keyword}{>}(status.\mbox{\hyperlink{a00816_a35b90bc5c1c8a18f59c0118b1181a95a}{Status}});}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ toReturn;}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00960_a73061e74112c2c5609e87b2a6219126c}{Disconnect}}()\textcolor{keyword}{\ override\ }\{}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ \_communication-\/>Disconnect();}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \}\ \ \ }
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00049\ \ \ \ \ \};}
\DoxyCodeLine{00050\ \}}

\end{DoxyCode}
