\doxysection{Vio class}
\label{a00052}\index{Vio class@{Vio class}}


This class provides an I/O layer for files/bufferes/pipes/sockets.  


\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ vio.\+h}
\begin{DoxyCompactList}\small\item\em Class Vio\+: virtual $<$SDIO/\+FILE/\+BUFF/\+UNIX/\+INET$>$ I/O layer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ s\+Vio}
\begin{DoxyCompactList}\small\item\em Contains public data members for Vio class. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef enum \textbf{ VIOtype} \textbf{ VIOtype}
\begin{DoxyCompactList}\small\item\em Parameter for I/O type (sdio,buff,file,unix,inet) \end{DoxyCompactList}\item 
typedef enum \textbf{ VIOfrmt} \textbf{ VIOfrmt}
\begin{DoxyCompactList}\small\item\em Parameter for compression type (XDR,ASC) \end{DoxyCompactList}\item 
typedef enum \textbf{ VIOrwkey} \textbf{ VIOrwkey}
\begin{DoxyCompactList}\small\item\em Parameter for rw type (R,RW) \end{DoxyCompactList}\item 
typedef struct \textbf{ s\+Vio} \textbf{ Vio}
\begin{DoxyCompactList}\small\item\em Declaration of the Vio class as the Vio structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ VIOtype} \{ \newline
\textbf{ VIO\+\_\+\+NO\+\_\+\+TYPE}
, \textbf{ VIO\+\_\+\+SDIO}
, \textbf{ VIO\+\_\+\+BUFF}
, \textbf{ VIO\+\_\+\+FILE}
, \newline
\textbf{ VIO\+\_\+\+UNIX}
, \textbf{ VIO\+\_\+\+INET}
 \}
\begin{DoxyCompactList}\small\item\em Parameter for I/O type (sdio,buff,file,unix,inet) \end{DoxyCompactList}\item 
enum \textbf{ VIOfrmt} \{ \textbf{ VIO\+\_\+\+NO\+\_\+\+FRMT}
, \textbf{ VIO\+\_\+\+XDR}
, \textbf{ VIO\+\_\+\+ASC}
 \}
\begin{DoxyCompactList}\small\item\em Parameter for compression type (XDR,ASC) \end{DoxyCompactList}\item 
enum \textbf{ VIOrwkey} \{ \textbf{ VIO\+\_\+\+NO\+\_\+\+RW}
, \textbf{ VIO\+\_\+R}
, \textbf{ VIO\+\_\+W}
 \}
\begin{DoxyCompactList}\small\item\em Parameter for rw type (R,RW) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ Vio\+\_\+start} (void)
\begin{DoxyCompactList}\small\item\em Start Vio communication layer (init internal variables/buffers) \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+stop} (void)
\begin{DoxyCompactList}\small\item\em Shutdown Vio communication layer. \end{DoxyCompactList}\item 
\textbf{ Vio} $\ast$ \textbf{ Vio\+\_\+ctor} (const char $\ast$socktype, const char $\ast$datafrmt, const char $\ast$hostname, const char $\ast$filename, const char $\ast$rwkey)
\begin{DoxyCompactList}\small\item\em Construct the Vio object. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+ctor2} (\textbf{ Vio} $\ast$thee, const char $\ast$socktype, const char $\ast$datafrmt, const char $\ast$hostname, const char $\ast$filename, const char $\ast$rwkey)
\begin{DoxyCompactList}\small\item\em Work routine that Vio\+\_\+ctor calls to do most of the construction. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+dtor} (\textbf{ Vio} $\ast$$\ast$thee)
\begin{DoxyCompactList}\small\item\em Destruct the Vio object. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+dtor2} (\textbf{ Vio} $\ast$thee)
\begin{DoxyCompactList}\small\item\em Work routine that Vio\+\_\+dtor calls to do most of the destruction. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+set\+White\+Chars} (\textbf{ Vio} $\ast$thee, char $\ast$white\+Chars)
\begin{DoxyCompactList}\small\item\em Set the white character set for I/O stream. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+set\+Comm\+Chars} (\textbf{ Vio} $\ast$thee, char $\ast$comm\+Chars)
\begin{DoxyCompactList}\small\item\em Set the comment character set for I/O stream. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+accept} (\textbf{ Vio} $\ast$thee, int nonblock)
\begin{DoxyCompactList}\small\item\em Accept any waiting connect attempt to our socket on our machine. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+accept\+Free} (\textbf{ Vio} $\ast$thee)
\begin{DoxyCompactList}\small\item\em Free the socket child that was used for the last accept. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+connect} (\textbf{ Vio} $\ast$thee, int nonblock)
\begin{DoxyCompactList}\small\item\em Connect to some socket on a remote machine (or on our machine) \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+connect\+Free} (\textbf{ Vio} $\ast$thee)
\begin{DoxyCompactList}\small\item\em Purge any output buffers (for $<$UNIX/\+INET$>$, else a no-\/op) \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+scanf} (\textbf{ Vio} $\ast$thee, char $\ast$parms,...)
\begin{DoxyCompactList}\small\item\em Mimic \char`\"{}scanf\char`\"{} from an arbitrary Vio device. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+printf} (\textbf{ Vio} $\ast$thee, char $\ast$parms,...)
\begin{DoxyCompactList}\small\item\em Mimic \char`\"{}printf\char`\"{} from an arbitrary Vio device. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+read} (\textbf{ Vio} $\ast$thee, char $\ast$buf, int bufsize)
\begin{DoxyCompactList}\small\item\em Read (up to) bufsize characters into buf from input device. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+write} (\textbf{ Vio} $\ast$thee, char $\ast$buf, int bufsize)
\begin{DoxyCompactList}\small\item\em Write bufsize characters from buf to output device. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+buf\+Take} (\textbf{ Vio} $\ast$thee, char $\ast$buf, int bufsize)
\begin{DoxyCompactList}\small\item\em Set the pointer to the internal buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vio\+\_\+buf\+Give} (\textbf{ Vio} $\ast$thee)
\begin{DoxyCompactList}\small\item\em Return the pointer to the internal buffer. \end{DoxyCompactList}\item 
int \textbf{ Vio\+\_\+buf\+Size} (\textbf{ Vio} $\ast$thee)
\begin{DoxyCompactList}\small\item\em Return the length to the internal buffer. \end{DoxyCompactList}\item 
\textbf{ Vio} $\ast$ \textbf{ Vio\+\_\+socket\+Open} (char $\ast$key, const char $\ast$iodev, const char $\ast$iofmt, const char $\ast$iohost, const char $\ast$iofile)
\begin{DoxyCompactList}\small\item\em Socket open for read or write. \end{DoxyCompactList}\item 
void \textbf{ Vio\+\_\+socket\+Close} (\textbf{ Vio} $\ast$$\ast$sock)
\begin{DoxyCompactList}\small\item\em Socket close from read or write. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class provides an I/O layer for files/bufferes/pipes/sockets. 

This class provides an abstraction of I/O to give acess to files, buffers, pipes, UNIX sockets, and INET sockets. 

\doxysubsection{Typedef Documentation}
\mbox{\label{a00052_ga277550356f3dd78c988516b1e172a9c6}} 
\index{Vio class@{Vio class}!Vio@{Vio}}
\index{Vio@{Vio}!Vio class@{Vio class}}
\doxysubsubsection{Vio}
{\footnotesize\ttfamily typedef struct \textbf{ s\+Vio} \textbf{ Vio}}



Declaration of the Vio class as the Vio structure. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\mbox{\label{a00052_ga14b86785b5e4038d0e7981854da5d7d9}} 
\index{Vio class@{Vio class}!VIOfrmt@{VIOfrmt}}
\index{VIOfrmt@{VIOfrmt}!Vio class@{Vio class}}
\doxysubsubsection{VIOfrmt}
{\footnotesize\ttfamily typedef enum \textbf{ VIOfrmt} \textbf{ VIOfrmt}}



Parameter for compression type (XDR,ASC) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\mbox{\label{a00052_ga9fee61f0c383eda86fe6095b2cd97a91}} 
\index{Vio class@{Vio class}!VIOrwkey@{VIOrwkey}}
\index{VIOrwkey@{VIOrwkey}!Vio class@{Vio class}}
\doxysubsubsection{VIOrwkey}
{\footnotesize\ttfamily typedef enum \textbf{ VIOrwkey} \textbf{ VIOrwkey}}



Parameter for rw type (R,RW) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\mbox{\label{a00052_gaf325b686bb0ee8790628ef6fecb62410}} 
\index{Vio class@{Vio class}!VIOtype@{VIOtype}}
\index{VIOtype@{VIOtype}!Vio class@{Vio class}}
\doxysubsubsection{VIOtype}
{\footnotesize\ttfamily typedef enum \textbf{ VIOtype} \textbf{ VIOtype}}



Parameter for I/O type (sdio,buff,file,unix,inet) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}


\doxysubsection{Enumeration Type Documentation}
\mbox{\label{a00052_gabfa72aea464435d52c14c43ebd5e363b}} 
\index{Vio class@{Vio class}!VIOfrmt@{VIOfrmt}}
\index{VIOfrmt@{VIOfrmt}!Vio class@{Vio class}}
\doxysubsubsection{VIOfrmt}
{\footnotesize\ttfamily enum \textbf{ VIOfrmt}}



Parameter for compression type (XDR,ASC) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_NO\_FRMT@{VIO\_NO\_FRMT}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_NO\_FRMT@{VIO\_NO\_FRMT}}}\mbox{\label{a00052_ggabfa72aea464435d52c14c43ebd5e363bade52aaa65f920c341c443993f0898b73}} 
VIO\+\_\+\+NO\+\_\+\+FRMT&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_XDR@{VIO\_XDR}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_XDR@{VIO\_XDR}}}\mbox{\label{a00052_ggabfa72aea464435d52c14c43ebd5e363ba35f912228eb6c27fc632520ae9629924}} 
VIO\+\_\+\+XDR&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_ASC@{VIO\_ASC}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_ASC@{VIO\_ASC}}}\mbox{\label{a00052_ggabfa72aea464435d52c14c43ebd5e363baec02355c47d63dead444522a814209f4}} 
VIO\+\_\+\+ASC&\\
\hline

\end{DoxyEnumFields}

\begin{DoxyCode}{0}
\DoxyCodeLine{76                      \{}
\DoxyCodeLine{77     VIO\_NO\_FRMT,}
\DoxyCodeLine{78     VIO\_XDR,}
\DoxyCodeLine{79     VIO\_ASC}
\DoxyCodeLine{80 \} VIOfrmt;}

\end{DoxyCode}
\mbox{\label{a00052_gaf7330032d12db3359c24f79c9c2d4e24}} 
\index{Vio class@{Vio class}!VIOrwkey@{VIOrwkey}}
\index{VIOrwkey@{VIOrwkey}!Vio class@{Vio class}}
\doxysubsubsection{VIOrwkey}
{\footnotesize\ttfamily enum \textbf{ VIOrwkey}}



Parameter for rw type (R,RW) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_NO\_RW@{VIO\_NO\_RW}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_NO\_RW@{VIO\_NO\_RW}}}\mbox{\label{a00052_ggaf7330032d12db3359c24f79c9c2d4e24a728233ece268770e6c75232bf7da1968}} 
VIO\+\_\+\+NO\+\_\+\+RW&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_R@{VIO\_R}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_R@{VIO\_R}}}\mbox{\label{a00052_ggaf7330032d12db3359c24f79c9c2d4e24af463196c138c83145f7258caf84a6d92}} 
VIO\+\_\+R&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_W@{VIO\_W}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_W@{VIO\_W}}}\mbox{\label{a00052_ggaf7330032d12db3359c24f79c9c2d4e24a89e0bf28fada4387e3440bc18839818a}} 
VIO\+\_\+W&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{a00052_gac54f991a41350084c7880d7f6192eeb9}} 
\index{Vio class@{Vio class}!VIOtype@{VIOtype}}
\index{VIOtype@{VIOtype}!Vio class@{Vio class}}
\doxysubsubsection{VIOtype}
{\footnotesize\ttfamily enum \textbf{ VIOtype}}



Parameter for I/O type (sdio,buff,file,unix,inet) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_NO\_TYPE@{VIO\_NO\_TYPE}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_NO\_TYPE@{VIO\_NO\_TYPE}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9a321010e11ee3142a86236c272b6c60d3}} 
VIO\+\_\+\+NO\+\_\+\+TYPE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_SDIO@{VIO\_SDIO}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_SDIO@{VIO\_SDIO}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9a8684c452cb27082c48dad8424539c82a}} 
VIO\+\_\+\+SDIO&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_BUFF@{VIO\_BUFF}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_BUFF@{VIO\_BUFF}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9a793d30345ee79a61fd19d34d753f550c}} 
VIO\+\_\+\+BUFF&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_FILE@{VIO\_FILE}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_FILE@{VIO\_FILE}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9a52b6b67e03d785a98efc9a9c281450ad}} 
VIO\+\_\+\+FILE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_UNIX@{VIO\_UNIX}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_UNIX@{VIO\_UNIX}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9a732c134da0247d2a77fbbdc58afd56bb}} 
VIO\+\_\+\+UNIX&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{VIO\_INET@{VIO\_INET}!Vio class@{Vio class}}\index{Vio class@{Vio class}!VIO\_INET@{VIO\_INET}}}\mbox{\label{a00052_ggac54f991a41350084c7880d7f6192eeb9ae49b82defa0616162b52540447e5c4ed}} 
VIO\+\_\+\+INET&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{a00052_gac2adcc2e97a7d09b17cb4af91c7fbe9b}} 
\index{Vio class@{Vio class}!Vio\_accept@{Vio\_accept}}
\index{Vio\_accept@{Vio\_accept}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_accept()}
{\footnotesize\ttfamily int Vio\+\_\+accept (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{int}]{nonblock }\end{DoxyParamCaption})}



Accept any waiting connect attempt to our socket on our machine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
1 on success, -\/1 on failure 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em nonblock} & index for a non-\/blocking socket Only for $<$UNIX/\+INET$>$; othewise it is ignored. nonblock==0 ==$>$ block until a connect is attempted nonblock==1 ==$>$ DO NOT block at all \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga3d0cb66ac078c228d2f07bf6f297056c}} 
\index{Vio class@{Vio class}!Vio\_acceptFree@{Vio\_acceptFree}}
\index{Vio\_acceptFree@{Vio\_acceptFree}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_acceptFree()}
{\footnotesize\ttfamily void Vio\+\_\+accept\+Free (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee }\end{DoxyParamCaption})}



Free the socket child that was used for the last accept. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gaf04c660cee5a6b867acb91279af49c91}} 
\index{Vio class@{Vio class}!Vio\_bufGive@{Vio\_bufGive}}
\index{Vio\_bufGive@{Vio\_bufGive}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufGive()}
{\footnotesize\ttfamily char $\ast$ Vio\+\_\+buf\+Give (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee }\end{DoxyParamCaption})}



Return the pointer to the internal buffer. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Poitner to the internal buffer 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga09e5b807b5f961929248d77fefaf6688}} 
\index{Vio class@{Vio class}!Vio\_bufSize@{Vio\_bufSize}}
\index{Vio\_bufSize@{Vio\_bufSize}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufSize()}
{\footnotesize\ttfamily int Vio\+\_\+buf\+Size (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee }\end{DoxyParamCaption})}



Return the length to the internal buffer. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Length of the internal buffer 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gada8bd129766991220da5bc4d6f48fcc6}} 
\index{Vio class@{Vio class}!Vio\_bufTake@{Vio\_bufTake}}
\index{Vio\_bufTake@{Vio\_bufTake}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufTake()}
{\footnotesize\ttfamily void Vio\+\_\+buf\+Take (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{buf,  }\item[{int}]{bufsize }\end{DoxyParamCaption})}



Set the pointer to the internal buffer. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em buf} & buffer containing message \\
\hline
{\em bufsize} & number of items (of declared type) in buffer \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gab8edee60b958634290e52b7b8fb00cb2}} 
\index{Vio class@{Vio class}!Vio\_connect@{Vio\_connect}}
\index{Vio\_connect@{Vio\_connect}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_connect()}
{\footnotesize\ttfamily int Vio\+\_\+connect (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{int}]{nonblock }\end{DoxyParamCaption})}



Connect to some socket on a remote machine (or on our machine) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
1 on success, -\/1 on failure 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em nonblock} & index for a non-\/blocking socket Only for $<$UNIX/\+INET$>$; othewise it is ignored. nonblock==0 ==$>$ block until a connect is attempted nonblock==1 ==$>$ DO NOT block at all \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gae7a8b6640b82ff581aa183890efa118e}} 
\index{Vio class@{Vio class}!Vio\_connectFree@{Vio\_connectFree}}
\index{Vio\_connectFree@{Vio\_connectFree}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_connectFree()}
{\footnotesize\ttfamily void Vio\+\_\+connect\+Free (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee }\end{DoxyParamCaption})}



Purge any output buffers (for $<$UNIX/\+INET$>$, else a no-\/op) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gac48ba5d670d2c69ec2c1ac4ae022482d}} 
\index{Vio class@{Vio class}!Vio\_ctor@{Vio\_ctor}}
\index{Vio\_ctor@{Vio\_ctor}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_ctor()}
{\footnotesize\ttfamily \textbf{ Vio} $\ast$ Vio\+\_\+ctor (\begin{DoxyParamCaption}\item[{const char $\ast$}]{socktype,  }\item[{const char $\ast$}]{datafrmt,  }\item[{const char $\ast$}]{hostname,  }\item[{const char $\ast$}]{filename,  }\item[{const char $\ast$}]{rwkey }\end{DoxyParamCaption})}



Construct the Vio object. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Pointer to newly constructed Vio object 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em socktype} & Pointer to the socket type \\
\hline
{\em datafrmt} & Pointer to the data format \\
\hline
{\em hostname} & Pointer to network address of port \\
\hline
{\em filename} & Pointer to the i/o file name \\
\hline
{\em rwkey} & Pointer to the read/write options \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gafd5263d2ea59f8a27b514a9a6c8db49e}} 
\index{Vio class@{Vio class}!Vio\_ctor2@{Vio\_ctor2}}
\index{Vio\_ctor2@{Vio\_ctor2}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_ctor2()}
{\footnotesize\ttfamily int Vio\+\_\+ctor2 (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{const char $\ast$}]{socktype,  }\item[{const char $\ast$}]{datafrmt,  }\item[{const char $\ast$}]{hostname,  }\item[{const char $\ast$}]{filename,  }\item[{const char $\ast$}]{rwkey }\end{DoxyParamCaption})}



Work routine that Vio\+\_\+ctor calls to do most of the construction. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
1 on success, 0 on failure 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em socktype} & Pointer to the socket type \\
\hline
{\em datafrmt} & Pointer to the data format \\
\hline
{\em hostname} & Pointer to network address of port \\
\hline
{\em filename} & Pointer to the i/o file name \\
\hline
{\em rwkey} & Pointer to the read/write options \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gac921320d3a6d380ae518deabbdba8d15}} 
\index{Vio class@{Vio class}!Vio\_dtor@{Vio\_dtor}}
\index{Vio\_dtor@{Vio\_dtor}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_dtor()}
{\footnotesize\ttfamily void Vio\+\_\+dtor (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$$\ast$}]{thee }\end{DoxyParamCaption})}



Destruct the Vio object. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gaf80adb2dd398b2c9ffc62b484762fb46}} 
\index{Vio class@{Vio class}!Vio\_dtor2@{Vio\_dtor2}}
\index{Vio\_dtor2@{Vio\_dtor2}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_dtor2()}
{\footnotesize\ttfamily void Vio\+\_\+dtor2 (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee }\end{DoxyParamCaption})}



Work routine that Vio\+\_\+dtor calls to do most of the destruction. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga543579d701d74aa482d3f4b7fd5016ad}} 
\index{Vio class@{Vio class}!Vio\_printf@{Vio\_printf}}
\index{Vio\_printf@{Vio\_printf}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_printf()}
{\footnotesize\ttfamily int Vio\+\_\+printf (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{parms,  }\item[{}]{... }\end{DoxyParamCaption})}



Mimic \char`\"{}printf\char`\"{} from an arbitrary Vio device. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Number of tokens printed 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em parms} & Pointer to output parameters \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gad81dab769683e00f090efae7a1919d39}} 
\index{Vio class@{Vio class}!Vio\_read@{Vio\_read}}
\index{Vio\_read@{Vio\_read}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_read()}
{\footnotesize\ttfamily int Vio\+\_\+read (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{buf,  }\item[{int}]{bufsize }\end{DoxyParamCaption})}



Read (up to) bufsize characters into buf from input device. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Number of bytes read 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em buf} & buffer containing message \\
\hline
{\em bufsize} & number of items (of declared type) in buffer \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga23748303f6c1cd02d37502d47cc58e6b}} 
\index{Vio class@{Vio class}!Vio\_scanf@{Vio\_scanf}}
\index{Vio\_scanf@{Vio\_scanf}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_scanf()}
{\footnotesize\ttfamily int Vio\+\_\+scanf (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{parms,  }\item[{}]{... }\end{DoxyParamCaption})}



Mimic \char`\"{}scanf\char`\"{} from an arbitrary Vio device. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Number of tokens read 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em parms} & Pointer to input parameters \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gaed8691f0b14a8aa79e7901076b002eec}} 
\index{Vio class@{Vio class}!Vio\_setCommChars@{Vio\_setCommChars}}
\index{Vio\_setCommChars@{Vio\_setCommChars}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_setCommChars()}
{\footnotesize\ttfamily void Vio\+\_\+set\+Comm\+Chars (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{comm\+Chars }\end{DoxyParamCaption})}



Set the comment character set for I/O stream. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em comm\+Chars} & comment character set \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga6761d827942a815176f9e9b8703cfc22}} 
\index{Vio class@{Vio class}!Vio\_setWhiteChars@{Vio\_setWhiteChars}}
\index{Vio\_setWhiteChars@{Vio\_setWhiteChars}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_setWhiteChars()}
{\footnotesize\ttfamily void Vio\+\_\+set\+White\+Chars (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{white\+Chars }\end{DoxyParamCaption})}



Set the white character set for I/O stream. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em white\+Chars} & white space character set \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_gab3e67e6f96c64086035a5f1016c099fb}} 
\index{Vio class@{Vio class}!Vio\_socketClose@{Vio\_socketClose}}
\index{Vio\_socketClose@{Vio\_socketClose}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_socketClose()}
{\footnotesize\ttfamily void Vio\+\_\+socket\+Close (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$$\ast$}]{sock }\end{DoxyParamCaption})}



Socket close from read or write. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em sock} & Socket for reading/writing the external data \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga6033f2f3ca511071d8167018638b42c7}} 
\index{Vio class@{Vio class}!Vio\_socketOpen@{Vio\_socketOpen}}
\index{Vio\_socketOpen@{Vio\_socketOpen}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_socketOpen()}
{\footnotesize\ttfamily \textbf{ Vio} $\ast$ Vio\+\_\+socket\+Open (\begin{DoxyParamCaption}\item[{char $\ast$}]{key,  }\item[{const char $\ast$}]{iodev,  }\item[{const char $\ast$}]{iofmt,  }\item[{const char $\ast$}]{iohost,  }\item[{const char $\ast$}]{iofile }\end{DoxyParamCaption})}



Socket open for read or write. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Socket for reading/writing the external data 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em key} & Pointer to the read/write option \\
\hline
{\em iodev} & Pointer to open device for read/write \\
\hline
{\em iofmt} & Pointer to i/o data format \\
\hline
{\em iohost} & Pointer to i/o address of port \\
\hline
{\em iofile} & Pointer to the i/o file name \\
\hline
\end{DoxyParams}
\mbox{\label{a00052_ga48241911c5133cb2babc4d31238a6cc9}} 
\index{Vio class@{Vio class}!Vio\_start@{Vio\_start}}
\index{Vio\_start@{Vio\_start}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_start()}
{\footnotesize\ttfamily void Vio\+\_\+start (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Start Vio communication layer (init internal variables/buffers) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\mbox{\label{a00052_ga165fe2e09fba533be74f5303ed3e6f8e}} 
\index{Vio class@{Vio class}!Vio\_stop@{Vio\_stop}}
\index{Vio\_stop@{Vio\_stop}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_stop()}
{\footnotesize\ttfamily void Vio\+\_\+stop (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Shutdown Vio communication layer. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\mbox{\label{a00052_ga1940252cd404f068da25e0dc8867837f}} 
\index{Vio class@{Vio class}!Vio\_write@{Vio\_write}}
\index{Vio\_write@{Vio\_write}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_write()}
{\footnotesize\ttfamily int Vio\+\_\+write (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee,  }\item[{char $\ast$}]{buf,  }\item[{int}]{bufsize }\end{DoxyParamCaption})}



Write bufsize characters from buf to output device. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Class Vio\+: Non-\/\+Inlineable methods (vio.\+c) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Number of bytes writen 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em thee} & Pointer to the Vio object \\
\hline
{\em buf} & buffer containing message \\
\hline
{\em bufsize} & number of items (of declared type) in buffer \\
\hline
\end{DoxyParams}
