\section{util/firmdl/rcx\_\-comm.h File Reference}
\label{rcx__comm_8h}\index{util/firmdl/rcx_comm.h@{util/firmdl/rcx\_\-comm.h}}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf RCX\_\-OK}\ 0
\item 
\#define {\bf RCX\_\-NO\_\-TOWER}\ -1
\item 
\#define {\bf RCX\_\-BAD\_\-LINK}\ -2
\item 
\#define {\bf RCX\_\-BAD\_\-ECHO}\ -3
\item 
\#define {\bf RCX\_\-NO\_\-RESPONSE}\ -4
\item 
\#define {\bf RCX\_\-BAD\_\-RESPONSE}\ -5
\item 
\#define {\bf FILEDESCR}\ int
\item 
\#define {\bf BADFILE}\ -1
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
FILEDESCR {\bf rcx\_\-init} (char $\ast$tty, int is\_\-fast)
\item 
void {\bf rcx\_\-close} (FILEDESCR fd)
\item 
int {\bf rcx\_\-wakeup\_\-tower} (FILEDESCR fd, int timeout)
\item 
int {\bf rcx\_\-send} (FILEDESCR fd, void $\ast$buf, int len, int use\_\-comp)
\item 
int {\bf rcx\_\-recv} (FILEDESCR fd, void $\ast$buf, int maxlen, int timeout, int use\_\-comp)
\item 
int {\bf rcx\_\-sendrecv} (FILEDESCR fd, void $\ast$send, int slen, void $\ast$recv, int rlen, int timeout, int retries, int use\_\-comp)
\item 
int {\bf rcx\_\-is\_\-alive} (FILEDESCR fd, int use\_\-comp)
\item 
char $\ast$ {\bf rcx\_\-strerror} (int error)
\item 
void {\bf hexdump} (char $\ast$prefix, void $\ast$buf, int len)
\end{CompactItemize}


\subsection{Define Documentation}
\index{rcx_comm.h@{rcx\_\-comm.h}!BADFILE@{BADFILE}}
\index{BADFILE@{BADFILE}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define BADFILE\ -1}\label{rcx__comm_8h_a7}




Definition at line 40 of file rcx\_\-comm.h.\index{rcx_comm.h@{rcx\_\-comm.h}!FILEDESCR@{FILEDESCR}}
\index{FILEDESCR@{FILEDESCR}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define FILEDESCR\ int}\label{rcx__comm_8h_a6}




Definition at line 39 of file rcx\_\-comm.h.\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_BAD_ECHO@{RCX\_\-BAD\_\-ECHO}}
\index{RCX_BAD_ECHO@{RCX\_\-BAD\_\-ECHO}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-BAD\_\-ECHO\ -3}\label{rcx__comm_8h_a3}




Definition at line 31 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_BAD_LINK@{RCX\_\-BAD\_\-LINK}}
\index{RCX_BAD_LINK@{RCX\_\-BAD\_\-LINK}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-BAD\_\-LINK\ -2}\label{rcx__comm_8h_a2}




Definition at line 30 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_BAD_RESPONSE@{RCX\_\-BAD\_\-RESPONSE}}
\index{RCX_BAD_RESPONSE@{RCX\_\-BAD\_\-RESPONSE}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-BAD\_\-RESPONSE\ -5}\label{rcx__comm_8h_a5}




Definition at line 33 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_NO_RESPONSE@{RCX\_\-NO\_\-RESPONSE}}
\index{RCX_NO_RESPONSE@{RCX\_\-NO\_\-RESPONSE}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-NO\_\-RESPONSE\ -4}\label{rcx__comm_8h_a4}




Definition at line 32 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_NO_TOWER@{RCX\_\-NO\_\-TOWER}}
\index{RCX_NO_TOWER@{RCX\_\-NO\_\-TOWER}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-NO\_\-TOWER\ -1}\label{rcx__comm_8h_a1}




Definition at line 29 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().\index{rcx_comm.h@{rcx\_\-comm.h}!RCX_OK@{RCX\_\-OK}}
\index{RCX_OK@{RCX\_\-OK}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define RCX\_\-OK\ 0}\label{rcx__comm_8h_a0}




Definition at line 28 of file rcx\_\-comm.h.

Referenced by rcx\_\-strerror().

\subsection{Function Documentation}
\index{rcx_comm.h@{rcx\_\-comm.h}!hexdump@{hexdump}}
\index{hexdump@{hexdump}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hexdump (char $\ast$ {\em prefix}, void $\ast$ {\em buf}, int {\em len})}\label{rcx__comm_8h_a16}




Definition at line 402 of file rcx\_\-comm.c.

References GROUP\_\-SIZE.

Referenced by rcx\_\-recv(), rcx\_\-send(), and rcx\_\-wakeup\_\-tower().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_close@{rcx\_\-close}}
\index{rcx_close@{rcx\_\-close}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rcx\_\-close (FILEDESCR {\em fd})}\label{rcx__comm_8h_a9}




Definition at line 346 of file rcx\_\-comm.c.

Referenced by main().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_init@{rcx\_\-init}}
\index{rcx_init@{rcx\_\-init}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}FILEDESCR rcx\_\-init (char $\ast$ {\em tty}, int {\em is\_\-fast})}\label{rcx__comm_8h_a8}




Definition at line 266 of file rcx\_\-comm.c.

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

Referenced by main().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_is_alive@{rcx\_\-is\_\-alive}}
\index{rcx_is_alive@{rcx\_\-is\_\-alive}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\_\-is\_\-alive (FILEDESCR {\em fd}, int {\em use\_\-comp})}\label{rcx__comm_8h_a14}




Definition at line 621 of file rcx\_\-comm.c.

References rcx\_\-sendrecv().

Referenced by main().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_recv@{rcx\_\-recv}}
\index{rcx_recv@{rcx\_\-recv}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\_\-recv (FILEDESCR {\em fd}, void $\ast$ {\em buf}, int {\em maxlen}, int {\em timeout}, int {\em use\_\-comp})}\label{rcx__comm_8h_a12}




Definition at line 492 of file rcx\_\-comm.c.

References BUFFERSIZE, hexdump(), and nbread().

Referenced by rcx\_\-sendrecv().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_send@{rcx\_\-send}}
\index{rcx_send@{rcx\_\-send}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\_\-send (FILEDESCR {\em fd}, void $\ast$ {\em buf}, int {\em len}, int {\em use\_\-comp})}\label{rcx__comm_8h_a11}




Definition at line 424 of file rcx\_\-comm.c.

References exit(), hexdump(), myperror(), mywrite(), nbread(), rx\_\-flush(), and tty\_\-usb.

Referenced by rcx\_\-sendrecv().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_sendrecv@{rcx\_\-sendrecv}}
\index{rcx_sendrecv@{rcx\_\-sendrecv}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\_\-sendrecv (FILEDESCR {\em fd}, void $\ast$ {\em send}, int {\em slen}, void $\ast$ {\em recv}, int {\em rlen}, int {\em timeout}, int {\em retries}, int {\em use\_\-comp})}\label{rcx__comm_8h_a13}




Definition at line 592 of file rcx\_\-comm.c.

References rcx\_\-recv(), rcx\_\-send(), and rcx\_\-strerror().

Referenced by image\_\-dl(), and rcx\_\-is\_\-alive().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_strerror@{rcx\_\-strerror}}
\index{rcx_strerror@{rcx\_\-strerror}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ rcx\_\-strerror (int {\em error})}\label{rcx__comm_8h_a15}




Definition at line 629 of file rcx\_\-comm.c.

References RCX\_\-BAD\_\-ECHO, RCX\_\-BAD\_\-LINK, RCX\_\-BAD\_\-RESPONSE, RCX\_\-NO\_\-RESPONSE, RCX\_\-NO\_\-TOWER, and RCX\_\-OK.

Referenced by main(), and rcx\_\-sendrecv().\index{rcx_comm.h@{rcx\_\-comm.h}!rcx_wakeup_tower@{rcx\_\-wakeup\_\-tower}}
\index{rcx_wakeup_tower@{rcx\_\-wakeup\_\-tower}!rcx_comm.h@{rcx\_\-comm.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int rcx\_\-wakeup\_\-tower (FILEDESCR {\em fd}, int {\em timeout})}\label{rcx__comm_8h_a10}




Definition at line 355 of file rcx\_\-comm.c.

References BUFFERSIZE, exit(), hexdump(), myperror(), mywrite(), nbread(), rx\_\-flush(), timer\_\-read(), timer\_\-reset(), and timeval\_\-t.

Referenced by main().