📄 fifoutil_8h.tex
字号:
\hypertarget{fifoutil_8h}{\subsection{fifoutil.h File Reference}\label{fifoutil_8h}\index{fifoutil.h@{fifoutil.h}}}\subsubsection{Detailed Description}This interface enables easy passing of fixed size messages between POSIX threads in Linux using first in first out ordering. Only one reader and writer per fifo is supported unless the application serializes the calls. \footnotesize\begin{verbatim} * ============================================================================ * Copyright (c) Texas Instruments Inc 2007 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied or provided. * ============================================================================ * \end{verbatim}\normalsize Definition in file \hyperlink{fifoutil_8h-source}{fifoutil.h}.{\tt \#include $<$unistd.h$>$}\parInclude dependency graph for fifoutil.h:\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=86pt]{fifoutil_8h__incl}\end{center}\end{figure}\subsubsection*{Data Structures}\begin{CompactItemize}\item struct \hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Obj}\begin{CompactList}\small\item\em Object that stores the state of the fifo. \item\end{CompactList}\end{CompactItemize}\subsubsection*{Defines}\begin{CompactItemize}\item \#define \hyperlink{fifoutil_8h_76cc6d3a2f25511a7652f57a50790da4}{FIFOUTIL\_\-SUCCESS}~0\begin{CompactList}\small\item\em Indicates that a fifo util API call completed successfully. \item\end{CompactList}\item \#define \hyperlink{fifoutil_8h_eadaf1ebbb755573ee7ec339cc83ae9e}{FIFOUTIL\_\-FAILURE}~-1\begin{CompactList}\small\item\em Indicates that a fifo util API call failed. \item\end{CompactList}\end{CompactItemize}\subsubsection*{Typedefs}\begin{CompactItemize}\item typedef \hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Obj} $\ast$ \hyperlink{fifoutil_8h_7beb3128ab2cfc929ffd9fe9598423d6}{Fifo\-Util\_\-Handle}\begin{CompactList}\small\item\em Pointer to a fifo util object. \item\end{CompactList}\end{CompactItemize}\subsubsection*{Functions}\begin{CompactItemize}\item static int \hyperlink{fifoutil_8h_7e69788b5efd797f05f0133cbd6697de}{Fifo\-Util\_\-open} (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} h\-Fifo, size\_\-t size)\begin{CompactList}\small\item\em Opens the fifo. Must be called before other API:s on a fifo. \item\end{CompactList}\item static int \hyperlink{fifoutil_8h_e7dc71f0d7684857b8c8800cd6cef18c}{Fifo\-Util\_\-close} (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} h\-Fifo)\begin{CompactList}\small\item\em Closes the fifo. No API calls can be made on this fifo after this. \item\end{CompactList}\item static int \hyperlink{fifoutil_8h_771ec78d0fd96797bfc54ad12da2d7e2}{Fifo\-Util\_\-get} (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} h\-Fifo, void $\ast$buffer)\begin{CompactList}\small\item\em Blocking call to get a message from a fifo. \item\end{CompactList}\item static int \hyperlink{fifoutil_8h_e2683d1cbe854bb8ea5a7d11597af751}{Fifo\-Util\_\-put} (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} h\-Fifo, void $\ast$buffer)\begin{CompactList}\small\item\em Put a message on the fifo. \item\end{CompactList}\end{CompactItemize}\subsubsection{Define Documentation}\hypertarget{fifoutil_8h_76cc6d3a2f25511a7652f57a50790da4}{\index{fifoutil.h@{fifoutil.h}!FIFOUTIL_SUCCESS@{FIFOUTIL\_\-SUCCESS}}\index{FIFOUTIL_SUCCESS@{FIFOUTIL\_\-SUCCESS}!fifoutil.h@{fifoutil.h}}\paragraph[FIFOUTIL\_\-SUCCESS]{\setlength{\rightskip}{0pt plus 5cm}\#define FIFOUTIL\_\-SUCCESS~0}\hfill}\label{fifoutil_8h_76cc6d3a2f25511a7652f57a50790da4}Indicates that a fifo util API call completed successfully. Definition at line 40 of file fifoutil.h.Referenced by Fifo\-Util\_\-close(), Fifo\-Util\_\-get(), Fifo\-Util\_\-open(), and Fifo\-Util\_\-put().\hypertarget{fifoutil_8h_eadaf1ebbb755573ee7ec339cc83ae9e}{\index{fifoutil.h@{fifoutil.h}!FIFOUTIL_FAILURE@{FIFOUTIL\_\-FAILURE}}\index{FIFOUTIL_FAILURE@{FIFOUTIL\_\-FAILURE}!fifoutil.h@{fifoutil.h}}\paragraph[FIFOUTIL\_\-FAILURE]{\setlength{\rightskip}{0pt plus 5cm}\#define FIFOUTIL\_\-FAILURE~-1}\hfill}\label{fifoutil_8h_eadaf1ebbb755573ee7ec339cc83ae9e}Indicates that a fifo util API call failed. Definition at line 45 of file fifoutil.h.Referenced by Fifo\-Util\_\-close(), Fifo\-Util\_\-get(), Fifo\-Util\_\-open(), and Fifo\-Util\_\-put().\subsubsection{Typedef Documentation}\hypertarget{fifoutil_8h_7beb3128ab2cfc929ffd9fe9598423d6}{\index{fifoutil.h@{fifoutil.h}!FifoUtil_Handle@{FifoUtil\_\-Handle}}\index{FifoUtil_Handle@{FifoUtil\_\-Handle}!fifoutil.h@{fifoutil.h}}\paragraph[FifoUtil\_\-Handle]{\setlength{\rightskip}{0pt plus 5cm}typedef \hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Obj}$\ast$ \hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle}}\hfill}\label{fifoutil_8h_7beb3128ab2cfc929ffd9fe9598423d6}Pointer to a fifo util object. Definition at line 35 of file fifoutil.h.\subsubsection{Function Documentation}\hypertarget{fifoutil_8h_7e69788b5efd797f05f0133cbd6697de}{\index{fifoutil.h@{fifoutil.h}!FifoUtil_open@{FifoUtil\_\-open}}\index{FifoUtil_open@{FifoUtil\_\-open}!fifoutil.h@{fifoutil.h}}\paragraph[FifoUtil\_\-open]{\setlength{\rightskip}{0pt plus 5cm}static int Fifo\-Util\_\-open (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} {\em h\-Fifo}, size\_\-t {\em size})\hspace{0.3cm}{\tt \mbox{[}inline, static\mbox{]}}}\hfill}\label{fifoutil_8h_7e69788b5efd797f05f0133cbd6697de}Opens the fifo. Must be called before other API:s on a fifo. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em h\-Fifo}]Pointer to the fifo object to open. \item[{\em size}]Size in bytes of the messages to be passed through this fifo. \end{description}\end{Desc}\begin{Desc}\item[Returns:]FIFOUTIL\_\-SUCCESS for success or FIFOUTIL\_\-FAILURE for failure. \end{Desc}Definition at line 53 of file fifoutil.h.References FIFOUTIL\_\-FAILURE, FIFOUTIL\_\-SUCCESS, Fifo\-Util\_\-Obj::pipes, and Fifo\-Util\_\-Obj::size.\hypertarget{fifoutil_8h_e7dc71f0d7684857b8c8800cd6cef18c}{\index{fifoutil.h@{fifoutil.h}!FifoUtil_close@{FifoUtil\_\-close}}\index{FifoUtil_close@{FifoUtil\_\-close}!fifoutil.h@{fifoutil.h}}\paragraph[FifoUtil\_\-close]{\setlength{\rightskip}{0pt plus 5cm}static int Fifo\-Util\_\-close (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} {\em h\-Fifo})\hspace{0.3cm}{\tt \mbox{[}inline, static\mbox{]}}}\hfill}\label{fifoutil_8h_e7dc71f0d7684857b8c8800cd6cef18c}Closes the fifo. No API calls can be made on this fifo after this. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em h\-Fifo}]Pointer to the fifo object to close. \end{description}\end{Desc}\begin{Desc}\item[Returns:]FIFOUTIL\_\-SUCCESS for success or FIFOUTIL\_\-FAILURE for failure. \end{Desc}Definition at line 69 of file fifoutil.h.References FIFOUTIL\_\-FAILURE, FIFOUTIL\_\-SUCCESS, and Fifo\-Util\_\-Obj::pipes.\hypertarget{fifoutil_8h_771ec78d0fd96797bfc54ad12da2d7e2}{\index{fifoutil.h@{fifoutil.h}!FifoUtil_get@{FifoUtil\_\-get}}\index{FifoUtil_get@{FifoUtil\_\-get}!fifoutil.h@{fifoutil.h}}\paragraph[FifoUtil\_\-get]{\setlength{\rightskip}{0pt plus 5cm}static int Fifo\-Util\_\-get (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} {\em h\-Fifo}, void $\ast$ {\em buffer})\hspace{0.3cm}{\tt \mbox{[}inline, static\mbox{]}}}\hfill}\label{fifoutil_8h_771ec78d0fd96797bfc54ad12da2d7e2}Blocking call to get a message from a fifo. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em h\-Fifo}]Pointer to a previously opened fifo object. \item[{\em buffer}]A pointer to the buffer which will be copied to the fifo. \end{description}\end{Desc}\begin{Desc}\item[Returns:]FIFOUTIL\_\-SUCCESS for success or FIFOUTIL\_\-FAILURE for failure. \end{Desc}Definition at line 90 of file fifoutil.h.References FIFOUTIL\_\-FAILURE, FIFOUTIL\_\-SUCCESS, Fifo\-Util\_\-Obj::pipes, and Fifo\-Util\_\-Obj::size.\hypertarget{fifoutil_8h_e2683d1cbe854bb8ea5a7d11597af751}{\index{fifoutil.h@{fifoutil.h}!FifoUtil_put@{FifoUtil\_\-put}}\index{FifoUtil_put@{FifoUtil\_\-put}!fifoutil.h@{fifoutil.h}}\paragraph[FifoUtil\_\-put]{\setlength{\rightskip}{0pt plus 5cm}static int Fifo\-Util\_\-put (\hyperlink{struct_fifo_util___obj}{Fifo\-Util\_\-Handle} {\em h\-Fifo}, void $\ast$ {\em buffer})\hspace{0.3cm}{\tt \mbox{[}inline, static\mbox{]}}}\hfill}\label{fifoutil_8h_e2683d1cbe854bb8ea5a7d11597af751}Put a message on the fifo. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em h\-Fifo}]Pointer to a previously opened fifo object. \item[{\em buffer}]A pointer to the buffer which will be copied from the fifo. \end{description}\end{Desc}\begin{Desc}\item[Returns:]FIFOUTIL\_\-SUCCESS for success or FIFOUTIL\_\-FAILURE for failure. \end{Desc}Definition at line 105 of file fifoutil.h.References FIFOUTIL\_\-FAILURE, FIFOUTIL\_\-SUCCESS, Fifo\-Util\_\-Obj::pipes, and Fifo\-Util\_\-Obj::size.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -