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


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


\doxysubsubsection*{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}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ s\+Vio}
\begin{DoxyCompactList}\small\item\em Contains public data members for Vio class. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{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}
\doxysubsubsection*{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}
\doxysubsubsection*{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 "{}scanf"{} 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 "{}printf"{} 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}
\index{Vio class@{Vio class}!Vio@{Vio}}
\index{Vio@{Vio}!Vio class@{Vio class}}
\doxysubsubsection{Vio}
{\footnotesize\ttfamily \label{a00052_ga277550356f3dd78c988516b1e172a9c6} 
typedef struct \textbf{ s\+Vio} \textbf{ Vio}}



Declaration of the Vio class as the Vio structure. 

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



Parameter for compression type (XDR,ASC) 

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



Parameter for rw type (R,RW) 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\index{Vio class@{Vio class}!VIOtype@{VIOtype}}
\index{VIOtype@{VIOtype}!Vio class@{Vio class}}
\doxysubsubsection{VIOtype}
{\footnotesize\ttfamily \label{a00052_gaf325b686bb0ee8790628ef6fecb62410} 
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}
\index{Vio class@{Vio class}!VIOfrmt@{VIOfrmt}}
\index{VIOfrmt@{VIOfrmt}!Vio class@{Vio class}}
\doxysubsubsection{VIOfrmt}
{\footnotesize\ttfamily \label{a00052_gabfa72aea464435d52c14c43ebd5e363b} 
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}}}\label{a00052_gabfa72aea464435d52c14c43ebd5e363b} 
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}}}\label{a00052_gabfa72aea464435d52c14c43ebd5e363b} 
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}}}\label{a00052_gabfa72aea464435d52c14c43ebd5e363b} 
VIO\+\_\+\+ASC&\\
\hline

\end{DoxyEnumFields}

\begin{DoxyCode}{0}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00077\ \ \ \ \ VIO\_NO\_FRMT,}
\DoxyCodeLine{00078\ \ \ \ \ VIO\_XDR,}
\DoxyCodeLine{00079\ \ \ \ \ VIO\_ASC}
\DoxyCodeLine{00080\ \}\ VIOfrmt;}

\end{DoxyCode}
\index{Vio class@{Vio class}!VIOrwkey@{VIOrwkey}}
\index{VIOrwkey@{VIOrwkey}!Vio class@{Vio class}}
\doxysubsubsection{VIOrwkey}
{\footnotesize\ttfamily \label{a00052_gaf7330032d12db3359c24f79c9c2d4e24} 
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}}}\label{a00052_gaf7330032d12db3359c24f79c9c2d4e24} 
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}}}\label{a00052_gaf7330032d12db3359c24f79c9c2d4e24} 
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}}}\label{a00052_gaf7330032d12db3359c24f79c9c2d4e24} 
VIO\+\_\+W&\\
\hline

\end{DoxyEnumFields}

\begin{DoxyCode}{0}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00088\ \ \ \ \ VIO\_NO\_RW,}
\DoxyCodeLine{00089\ \ \ \ \ VIO\_R,}
\DoxyCodeLine{00090\ \ \ \ \ VIO\_W}
\DoxyCodeLine{00091\ \}\ VIOrwkey;}

\end{DoxyCode}
\index{Vio class@{Vio class}!VIOtype@{VIOtype}}
\index{VIOtype@{VIOtype}!Vio class@{Vio class}}
\doxysubsubsection{VIOtype}
{\footnotesize\ttfamily \label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
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}}}\label{a00052_gac54f991a41350084c7880d7f6192eeb9} 
VIO\+\_\+\+INET&\\
\hline

\end{DoxyEnumFields}

\begin{DoxyCode}{0}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00063\ \ \ \ \ VIO\_NO\_TYPE,\ }
\DoxyCodeLine{00064\ \ \ \ \ VIO\_SDIO,}
\DoxyCodeLine{00065\ \ \ \ \ VIO\_BUFF,}
\DoxyCodeLine{00066\ \ \ \ \ VIO\_FILE,}
\DoxyCodeLine{00067\ \ \ \ \ VIO\_UNIX,}
\DoxyCodeLine{00068\ \ \ \ \ VIO\_INET}
\DoxyCodeLine{00069\ \}\ VIOtype;}

\end{DoxyCode}


\doxysubsection{Function Documentation}
\index{Vio class@{Vio class}!Vio\_accept@{Vio\_accept}}
\index{Vio\_accept@{Vio\_accept}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_accept()}
{\footnotesize\ttfamily \label{a00052_gac2adcc2e97a7d09b17cb4af91c7fbe9b} 
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}
\index{Vio class@{Vio class}!Vio\_acceptFree@{Vio\_acceptFree}}
\index{Vio\_acceptFree@{Vio\_acceptFree}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_acceptFree()}
{\footnotesize\ttfamily \label{a00052_ga3d0cb66ac078c228d2f07bf6f297056c} 
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}
\index{Vio class@{Vio class}!Vio\_bufGive@{Vio\_bufGive}}
\index{Vio\_bufGive@{Vio\_bufGive}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufGive()}
{\footnotesize\ttfamily \label{a00052_gaf04c660cee5a6b867acb91279af49c91} 
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}
\index{Vio class@{Vio class}!Vio\_bufSize@{Vio\_bufSize}}
\index{Vio\_bufSize@{Vio\_bufSize}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufSize()}
{\footnotesize\ttfamily \label{a00052_ga09e5b807b5f961929248d77fefaf6688} 
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}
\index{Vio class@{Vio class}!Vio\_bufTake@{Vio\_bufTake}}
\index{Vio\_bufTake@{Vio\_bufTake}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_bufTake()}
{\footnotesize\ttfamily \label{a00052_gada8bd129766991220da5bc4d6f48fcc6} 
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}
\index{Vio class@{Vio class}!Vio\_connect@{Vio\_connect}}
\index{Vio\_connect@{Vio\_connect}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_connect()}
{\footnotesize\ttfamily \label{a00052_gab8edee60b958634290e52b7b8fb00cb2} 
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}
\index{Vio class@{Vio class}!Vio\_connectFree@{Vio\_connectFree}}
\index{Vio\_connectFree@{Vio\_connectFree}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_connectFree()}
{\footnotesize\ttfamily \label{a00052_gae7a8b6640b82ff581aa183890efa118e} 
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}
\index{Vio class@{Vio class}!Vio\_ctor@{Vio\_ctor}}
\index{Vio\_ctor@{Vio\_ctor}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_ctor()}
{\footnotesize\ttfamily \label{a00052_gac48ba5d670d2c69ec2c1ac4ae022482d} 
\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}
\index{Vio class@{Vio class}!Vio\_ctor2@{Vio\_ctor2}}
\index{Vio\_ctor2@{Vio\_ctor2}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_ctor2()}
{\footnotesize\ttfamily \label{a00052_gafd5263d2ea59f8a27b514a9a6c8db49e} 
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}
\index{Vio class@{Vio class}!Vio\_dtor@{Vio\_dtor}}
\index{Vio\_dtor@{Vio\_dtor}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_dtor()}
{\footnotesize\ttfamily \label{a00052_gac921320d3a6d380ae518deabbdba8d15} 
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}
\index{Vio class@{Vio class}!Vio\_dtor2@{Vio\_dtor2}}
\index{Vio\_dtor2@{Vio\_dtor2}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_dtor2()}
{\footnotesize\ttfamily \label{a00052_gaf80adb2dd398b2c9ffc62b484762fb46} 
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}
\index{Vio class@{Vio class}!Vio\_printf@{Vio\_printf}}
\index{Vio\_printf@{Vio\_printf}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_printf()}
{\footnotesize\ttfamily \label{a00052_ga543579d701d74aa482d3f4b7fd5016ad} 
int Vio\+\_\+printf (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee}{, }\item[{char $\ast$}]{parms}{, }\item[{}]{...}{}\end{DoxyParamCaption})}



Mimic "{}printf"{} 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}
\index{Vio class@{Vio class}!Vio\_read@{Vio\_read}}
\index{Vio\_read@{Vio\_read}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_read()}
{\footnotesize\ttfamily \label{a00052_gad81dab769683e00f090efae7a1919d39} 
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}
\index{Vio class@{Vio class}!Vio\_scanf@{Vio\_scanf}}
\index{Vio\_scanf@{Vio\_scanf}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_scanf()}
{\footnotesize\ttfamily \label{a00052_ga23748303f6c1cd02d37502d47cc58e6b} 
int Vio\+\_\+scanf (\begin{DoxyParamCaption}\item[{\textbf{ Vio} $\ast$}]{thee}{, }\item[{char $\ast$}]{parms}{, }\item[{}]{...}{}\end{DoxyParamCaption})}



Mimic "{}scanf"{} 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}
\index{Vio class@{Vio class}!Vio\_setCommChars@{Vio\_setCommChars}}
\index{Vio\_setCommChars@{Vio\_setCommChars}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_setCommChars()}
{\footnotesize\ttfamily \label{a00052_gaed8691f0b14a8aa79e7901076b002eec} 
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}
\index{Vio class@{Vio class}!Vio\_setWhiteChars@{Vio\_setWhiteChars}}
\index{Vio\_setWhiteChars@{Vio\_setWhiteChars}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_setWhiteChars()}
{\footnotesize\ttfamily \label{a00052_ga6761d827942a815176f9e9b8703cfc22} 
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}
\index{Vio class@{Vio class}!Vio\_socketClose@{Vio\_socketClose}}
\index{Vio\_socketClose@{Vio\_socketClose}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_socketClose()}
{\footnotesize\ttfamily \label{a00052_gab3e67e6f96c64086035a5f1016c099fb} 
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}
\index{Vio class@{Vio class}!Vio\_socketOpen@{Vio\_socketOpen}}
\index{Vio\_socketOpen@{Vio\_socketOpen}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_socketOpen()}
{\footnotesize\ttfamily \label{a00052_ga6033f2f3ca511071d8167018638b42c7} 
\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}
\index{Vio class@{Vio class}!Vio\_start@{Vio\_start}}
\index{Vio\_start@{Vio\_start}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_start()}
{\footnotesize\ttfamily \label{a00052_ga48241911c5133cb2babc4d31238a6cc9} 
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}
\index{Vio class@{Vio class}!Vio\_stop@{Vio\_stop}}
\index{Vio\_stop@{Vio\_stop}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_stop()}
{\footnotesize\ttfamily \label{a00052_ga165fe2e09fba533be74f5303ed3e6f8e} 
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}
\index{Vio class@{Vio class}!Vio\_write@{Vio\_write}}
\index{Vio\_write@{Vio\_write}!Vio class@{Vio class}}
\doxysubsubsection{Vio\_write()}
{\footnotesize\ttfamily \label{a00052_ga1940252cd404f068da25e0dc8867837f} 
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}
