\section{util/dll-src/rcxtty.h File Reference}
\label{rcxtty_8h}\index{util/dll-src/rcxtty.h@{util/dll-src/rcxtty.h}}
Basic RCX communication. 

\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf FILEDESCR}\ int
\item 
\#define {\bf BADFILE}\ -1
\item 
\#define {\bf TTY\_\-VARIABLE}\ \char`\"{}RCXTTY\char`\"{}
\begin{CompactList}\small\item\em environment variable to override defaults \item\end{CompactList}\item 
\#define {\bf DEFAULTTTY}\ \char`\"{}/dev/ttyd2\char`\"{}
\begin{CompactList}\small\item\em IRIX - second serial port. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf rcx\-Init} (const char $\ast$tty, int highspeed)
\begin{CompactList}\small\item\em initialize RCX communications port \item\end{CompactList}\item 
void {\bf rcx\-Shutdown} ()
\begin{CompactList}\small\item\em shutdown RCX communications port \item\end{CompactList}\item 
FILEDESCR {\bf rcx\-FD} (void)
\begin{CompactList}\small\item\em get RCX file descriptor \item\end{CompactList}\item 
void {\bf myperror} (char $\ast$str)
\begin{CompactList}\small\item\em perror() wrapper \item\end{CompactList}\item 
int {\bf mywrite} (FILEDESCR fd, const void $\ast$buf, {\bf size\_\-t} len)
\begin{CompactList}\small\item\em write() wrapper \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Basic RCX communication. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf rcxtty.h}.

\subsection{Define Documentation}
\index{rcxtty.h@{rcxtty.h}!BADFILE@{BADFILE}}
\index{BADFILE@{BADFILE}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define BADFILE\ -1}\label{rcxtty_8h_a1}




Definition at line 35 of file rcxtty.h.\index{rcxtty.h@{rcxtty.h}!DEFAULTTTY@{DEFAULTTTY}}
\index{DEFAULTTTY@{DEFAULTTTY}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define DEFAULTTTY\ \char`\"{}/dev/ttyd2\char`\"{}}\label{rcxtty_8h_a3}


IRIX - second serial port. 



Definition at line 49 of file rcxtty.h.\index{rcxtty.h@{rcxtty.h}!FILEDESCR@{FILEDESCR}}
\index{FILEDESCR@{FILEDESCR}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define FILEDESCR\ int}\label{rcxtty_8h_a0}




Definition at line 34 of file rcxtty.h.

Referenced by main(), rcx\_\-init(), rcx\-FD(), and rcx\-Init().\index{rcxtty.h@{rcxtty.h}!TTY_VARIABLE@{TTY\_\-VARIABLE}}
\index{TTY_VARIABLE@{TTY\_\-VARIABLE}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TTY\_\-VARIABLE\ \char`\"{}RCXTTY\char`\"{}}\label{rcxtty_8h_a2}


environment variable to override defaults 



Definition at line 40 of file rcxtty.h.

Referenced by main().

\subsection{Function Documentation}
\index{rcxtty.h@{rcxtty.h}!myperror@{myperror}}
\index{myperror@{myperror}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void myperror (char $\ast$ {\em str})}\label{rcxtty_8h_a7}


perror() wrapper 



Definition at line 65 of file rcxtty.c.

Referenced by keepalive\-Send(), LNPinit(), nbread(), rcx\_\-init(), rcx\_\-send(), rcx\_\-wakeup\_\-tower(), and rcx\-Init().\index{rcxtty.h@{rcxtty.h}!mywrite@{mywrite}}
\index{mywrite@{mywrite}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mywrite (FILEDESCR {\em fd}, const void $\ast$ {\em buf}, {\bf size\_\-t} {\em len})}\label{rcxtty_8h_a8}


write() wrapper 



Definition at line 73 of file rcxtty.c.

References NULL.

Referenced by keepalive\-Send(), lnp\_\-logical\_\-write(), rcx\_\-send(), and rcx\_\-wakeup\_\-tower().\index{rcxtty.h@{rcxtty.h}!rcxFD@{rcxFD}}
\index{rcxFD@{rcxFD}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}FILEDESCR rcx\-FD (void)}\label{rcxtty_8h_a6}


get RCX file descriptor 



Definition at line 61 of file rcxtty.c.

References FILEDESCR.

Referenced by io\_\-handler(), keepalive\-Handler(), keepalive\-Init(), lnp\_\-assured\_\-write(), lnp\_\-logical\_\-write(), and LNPinit().\index{rcxtty.h@{rcxtty.h}!rcxInit@{rcxInit}}
\index{rcxInit@{rcxInit}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\-Init (const char $\ast$ {\em tty}, int {\em highspeed})}\label{rcxtty_8h_a4}


initialize RCX communications port 



Definition at line 110 of file rcxtty.c.

References B2400, B4800, exit(), FILEDESCR, memset(), myperror(), NULL, rcx\-Fd, and tty\_\-usb.

Referenced by LNPinit().\index{rcxtty.h@{rcxtty.h}!rcxShutdown@{rcxShutdown}}
\index{rcxShutdown@{rcxShutdown}!rcxtty.h@{rcxtty.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rcx\-Shutdown ()}\label{rcxtty_8h_a5}


shutdown RCX communications port 



Definition at line 220 of file rcxtty.c.

References rcx\-Fd.