\doxysection{lookup.\+hpp}
\hypertarget{lookup_8hpp_source}{}\label{lookup_8hpp_source}\index{/Users/lvhao/ws/pnd/sdk/pnd-\/cpp/src/lookup.hpp@{/Users/lvhao/ws/pnd/sdk/pnd-\/cpp/src/lookup.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}aios.h"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}group.hpp"{}}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}util.hpp"{}}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ \textcolor{keyword}{namespace\ }Pnd\ \{}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00016\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_pnd_1_1_lookup}{Lookup}}\ final\ \{}
\DoxyCodeLine{00017\ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00026\ \ \ \mbox{\hyperlink{class_pnd_1_1_lookup}{Lookup}}(std::string\ *addr\ =\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00032\ \ \ \mbox{\hyperlink{class_pnd_1_1_lookup_a5b50ec7662d214c6a2628ea5234e3e61}{\string~Lookup}}()\ \textcolor{keyword}{noexcept};}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00040\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_pnd_1_1_lookup_af58298b7c70665c68e1a787ef2186fa1}{setNetWorks}}(std::string\ networks);}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00045\ \ \ std::string\ \mbox{\hyperlink{class_pnd_1_1_lookup_aa4bfb7f47e2698fd5198ff3c2f6cfcc7}{getCtrlBoxIP}}();}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00055\ \ \ std::shared\_ptr<Group>\ \mbox{\hyperlink{class_pnd_1_1_lookup_a03aaa8155c032e38e0cd78a825abf47d}{getGroupFromFamily}}(\textcolor{keyword}{const}\ std::string\ \&family,\ int32\_t\ timeout\_ms\ =\ DEFAULT\_TIMEOUT);}
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00057\ \ \ std::shared\_ptr<Group>\ getGroupFromIps(\textcolor{keyword}{const}\ std::vector<std::string>\ \&ips);}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00064\ \ \ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{class_pnd_1_1_lookup_add8ee6074c8a0fafd6cd277637e36cc0}{getLookupFrequencyHz}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00074\ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_pnd_1_1_lookup_ac899bc53f1e7213d16d429bd03371d6f}{setLookupFrequencyHz}}(\textcolor{keywordtype}{float}\ frequency);}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{EntryList}}\ final\ \{}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{struct\ }Entry\ final\ \{}
\DoxyCodeLine{00078\ \ \ \ \ \ \ std::string\ name\_;}
\DoxyCodeLine{00079\ \ \ \ \ \ \ std::string\ family\_;}
\DoxyCodeLine{00080\ \ \ \ \ \ \ std::string\ serial\_number\_;}
\DoxyCodeLine{00081\ \ \ \ \ \};}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00087\ \ \ \ \ PndLookupEntryListPtr\ lookup\_list\_;}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keyword}{class\ }Iterator\ final\ \{}
\DoxyCodeLine{00094\ \ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \textcolor{comment}{//\ Iterator\ traits\ (not\ from\ std::iterator\ to\ be\ C++17\ compliant)}}
\DoxyCodeLine{00096\ \ \ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ Entry;}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \textcolor{keyword}{using\ }difference\_type\ =\ int;}
\DoxyCodeLine{00098\ \ \ \ \ \ \ \textcolor{keyword}{using\ }pointer\ =\ Entry\ *;}
\DoxyCodeLine{00099\ \ \ \ \ \ \ \textcolor{keyword}{using\ }reference\ =\ Entry;}
\DoxyCodeLine{00100\ \ \ \ \ \ \ \textcolor{keyword}{using\ }iterator\_category\ =\ std::bidirectional\_iterator\_tag;}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ \ \ Iterator()\ =\ \textcolor{keyword}{delete};}
\DoxyCodeLine{00103\ \ \ \ \ \ \ \textcolor{keyword}{explicit}\ Iterator(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{EntryList}}\ \&list,\ \textcolor{keywordtype}{size\_t}\ current);}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \ \ \ \ \ \ reference\ operator*()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00107\ \ \ \ \ \ \ Iterator\ \&operator++();}
\DoxyCodeLine{00108\ \ \ \ \ \ \ Iterator\ operator++(\textcolor{keywordtype}{int});}
\DoxyCodeLine{00109\ \ \ \ \ \ \ Iterator\ \&operator-\/-\/();}
\DoxyCodeLine{00110\ \ \ \ \ \ \ Iterator\ operator-\/-\/(\textcolor{keywordtype}{int});}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00112\ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ operator==(\textcolor{keyword}{const}\ Iterator\ \&rhs)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00113\ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ operator!=(\textcolor{keyword}{const}\ Iterator\ \&rhs)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00115\ \ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00116\ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{EntryList}}\ \&list\_;}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ current\_\{0\};}
\DoxyCodeLine{00118\ \ \ \ \ \};}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00124\ \ \ \ \ \mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{EntryList}}(PndLookupEntryListPtr\ lookup\_list)\ :\ lookup\_list\_(lookup\_list)\ \{\}}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ \ \ \ \ \mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{\string~EntryList}}()\ \textcolor{keyword}{noexcept};}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00128\ \ \ \ \ Entry\ operator[](\textcolor{keywordtype}{size\_t}\ index)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ size()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00132\ \ \ \ \ Iterator\ begin()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00133\ \ \ \ \ Iterator\ end()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00134\ }
\DoxyCodeLine{00135\ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00139\ \ \ \ \ PND\_DISABLE\_COPY\_MOVE(\mbox{\hyperlink{class_pnd_1_1_lookup_1_1_entry_list}{EntryList}})}
\DoxyCodeLine{00140\ \ \ \};}
\DoxyCodeLine{00141\ }
\DoxyCodeLine{00142\ \ \ std::shared\_ptr<EntryList>\ getEntryList();}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00144\ \ \ DeviceList\ *getDeviceList();}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00150\ \ \ PndLookupPtr\ lookup\_;}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ int32\_t\ DEFAULT\_TIMEOUT\ =\ 500;}
\DoxyCodeLine{00153\ \};}
\DoxyCodeLine{00154\ }
\DoxyCodeLine{00155\ \}\ \ \textcolor{comment}{//\ namespace\ Pnd}}

\end{DoxyCode}
