\doxysection{vio.\+h File Reference}
\label{a00020}\index{vio.h@{vio.h}}


Class Vio\+: virtual $<$SDIO/\+FILE/\+BUFF/\+UNIX/\+INET$>$ I/O layer.  


{\ttfamily \#include $<$maloc/maloc\+\_\+base.\+h$>$}\newline
{\ttfamily \#include $<$maloc/vnm.\+h$>$}\newline
Include dependency graph for vio.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{a00021}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=224pt]{a00022}
\end{center}
\end{figure}
\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*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ VPORTNUMBER}~14916
\begin{DoxyCompactList}\small\item\em our portbase; 5000 $<$ VPORTNUMBER $<$ 49152 \end{DoxyCompactList}\item 
\#define \textbf{ VIO\+\_\+\+MAXBUF}~10
\begin{DoxyCompactList}\small\item\em number of internal buffers (BUFF datatype) \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}
Class Vio\+: virtual $<$SDIO/\+FILE/\+BUFF/\+UNIX/\+INET$>$ I/O layer. 

\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id}
\doxyref{vio.\+h}{p.}{a00020},v 1.\+28 2010/08/12 05\+:40\+:35 fetk Exp 
\end{DoxyParagraph}
\begin{DoxyAuthor}{Author}
Michael Holst
\end{DoxyAuthor}
\begin{DoxyAttention}{Attention}
\begin{DoxyVerb}*
* MALOC = < Minimal Abstraction Layer for Object-oriented C >
* Copyright (C) 1994-- Michael Holst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 
* \end{DoxyVerb}
 
\end{DoxyAttention}


\doxysubsection{Macro Definition Documentation}
\index{vio.h@{vio.h}!VIO\_MAXBUF@{VIO\_MAXBUF}}
\index{VIO\_MAXBUF@{VIO\_MAXBUF}!vio.h@{vio.h}}
\doxysubsubsection{VIO\_MAXBUF}
{\footnotesize\ttfamily \label{a00020_a1e94d8ac2af32609f662f3133cb2460a} 
\#define VIO\+\_\+\+MAXBUF~10}



number of internal buffers (BUFF datatype) 

\index{vio.h@{vio.h}!VPORTNUMBER@{VPORTNUMBER}}
\index{VPORTNUMBER@{VPORTNUMBER}!vio.h@{vio.h}}
\doxysubsubsection{VPORTNUMBER}
{\footnotesize\ttfamily \label{a00020_a4a7675dfbe5a786fba616dba632bb44a} 
\#define VPORTNUMBER~14916}



our portbase; 5000 $<$ VPORTNUMBER $<$ 49152 

