@@ -58,181 +58,199 @@ Pointer to location for returned attribute number.
\end{minipage}
\subsection{Define an integer attribute: \texttt{cdiDefAttInt}}
\index{cdiDefAttInt}
\label{cdiDefAttInt}
\subsection{Define a text attribute: \texttt{cdiDefAttTxt}}
\index{cdiDefAttTxt}
\label{cdiDefAttTxt}
The function {\texttt{cdiDefAttInt}} defines an integer attribute.
The function {\texttt{cdiDefAttTxt}} defines a text attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len,
const int *ip);
int cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or{\htmlref{\texttt{gridCreate}}{gridCreate}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}},{\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{type}]
External data type ({\texttt{CDI\_DATATYPE\_INT16}} or {\texttt{CDI\_DATATYPE\_INT32}}).
\item[\texttt{len}]
Number of values provided for the attribute.
\item[\texttt{ip}]
Pointer to one or more integer values.
\item[\texttt{tp}]
Pointer to one or more character values.
\end{deflist}
\end{minipage}
\subsubsection*{Example}
\subsection{Get the value(s) of an integer attribute: \texttt{cdiInqAttInt}}
\index{cdiInqAttInt}
\label{cdiInqAttInt}
Here is an example using {\texttt{cdiDefAttTxt}} to define the attribute "description":
status = cdiDefAttTxt(vlistID, varID, "description", LEN(text), text);
...
\end{lstlisting}
The function {\texttt{cdiInqAttInt}} gets the values(s) of an integer attribute.
\subsection{Get the value(s) of a text attribute: \texttt{cdiInqAttTxt}}
\index{cdiInqAttTxt}
\label{cdiInqAttTxt}
The function {\texttt{cdiInqAttTxt}} gets the values(s) of a text attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int *ip);
int cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{mlen}]
Number of allocated values provided for the attribute.
\item[\texttt{ip}]
Pointer location for returned integer attribute value(s).
\item[\texttt{tp}]
Pointer location for returned text attribute value(s).
\end{deflist}
\end{minipage}
\subsection{Define a floating point attribute: \texttt{cdiDefAttFlt}}
\index{cdiDefAttFlt}
\label{cdiDefAttFlt}
\subsection{Define an integer attribute: \texttt{cdiDefAttInt}}
\index{cdiDefAttInt}
\label{cdiDefAttInt}
The function {\texttt{cdiDefAttFlt}} defines a floating point attribute.
The function {\texttt{cdiDefAttInt}} defines an integer attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len,
const double *dp);
int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len,
const int *ip);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or{\htmlref{\texttt{gridCreate}}{gridCreate}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}},{\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{type}]
External data type ({\texttt{CDI\_DATATYPE\_FLT32}} or {\texttt{CDI\_DATATYPE\_FLT64}}).
External data type ({\texttt{CDI\_DATATYPE\_INT16}} or {\texttt{CDI\_DATATYPE\_INT32}}).
\item[\texttt{len}]
Number of values provided for the attribute.
\item[\texttt{dp}]
Pointer to one or more floating point values.
\item[\texttt{ip}]
Pointer to one or more integer values.
\end{deflist}
\end{minipage}
\subsection{Get the value(s) of a floating point attribute: \texttt{cdiInqAttFlt}}
\index{cdiInqAttFlt}
\label{cdiInqAttFlt}
\subsection{Get the value(s) of an integer attribute: \texttt{cdiInqAttInt}}
\index{cdiInqAttInt}
\label{cdiInqAttInt}
The function {\texttt{cdiInqAttFlt}} gets the values(s) of a floating point attribute.
The function {\texttt{cdiInqAttInt}} gets the values(s) of an integer attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double *dp);
int cdiInqAttInt(int cdiID, int varID, const char *name, int mlen, int *ip);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{mlen}]
Number of allocated values provided for the attribute.
\item[\texttt{dp}]
Pointer location for returned floating point attribute value(s).
\item[\texttt{ip}]
Pointer location for returned integer attribute value(s).
\end{deflist}
\end{minipage}
\subsection{Define a text attribute: \texttt{cdiDefAttTxt}}
\index{cdiDefAttTxt}
\label{cdiDefAttTxt}
\subsection{Define a floating point attribute: \texttt{cdiDefAttFlt}}
\index{cdiDefAttFlt}
\label{cdiDefAttFlt}
The function {\texttt{cdiDefAttTxt}} defines a text attribute.
The function {\texttt{cdiDefAttFlt}} defines a floating point attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiDefAttTxt(int cdiID, int varID, const char *name, int len, const char *tp);
int cdiDefAttFlt(int cdiID, int varID, const char *name, int type, int len,
const double *dp);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}} or{\htmlref{\texttt{gridCreate}}{gridCreate}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}},{\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{type}]
External data type ({\texttt{CDI\_DATATYPE\_FLT32}} or {\texttt{CDI\_DATATYPE\_FLT64}}).
\item[\texttt{len}]
Number of values provided for the attribute.
\item[\texttt{tp}]
Pointer to one or more character values.
\item[\texttt{dp}]
Pointer to one or more floating point values.
\end{deflist}
\end{minipage}
\subsection{Get the value(s) of a text attribute: \texttt{cdiInqAttTxt}}
\index{cdiInqAttTxt}
\label{cdiInqAttTxt}
\subsection{Get the value(s) of a floating point attribute: \texttt{cdiInqAttFlt}}
\index{cdiInqAttFlt}
\label{cdiInqAttFlt}
The function {\texttt{cdiInqAttTxt}} gets the values(s) of a text attribute.
The function {\texttt{cdiInqAttFlt}} gets the values(s) of a floating point attribute.
\subsubsection*{Usage}
\begin{verbatim}
int cdiInqAttTxt(int cdiID, int varID, const char *name, int mlen, char *tp);
int cdiInqAttFlt(int cdiID, int varID, const char *name, int mlen, double *dp);
\end{verbatim}
\hspace*{4mm}\begin{minipage}[]{15cm}
\begin{deflist}{\texttt{cdiID}\ }
\item[\texttt{cdiID}]
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{streamInqVlist}}{streamInqVlist}}.
CDI ID, from a previous call to {\htmlref{\texttt{vlistCreate}}{vlistCreate}}, {\htmlref{\texttt{gridCreate}}{gridCreate}} or {\htmlref{\texttt{zaxisCreate}}{zaxisCreate}}.
\item[\texttt{varID}]
Variable identifier, or {\texttt{CDI\_GLOBAL}} for a global attribute.
\item[\texttt{name}]
Attribute name.
\item[\texttt{mlen}]
Number of allocated values provided for the attribute.
\item[\texttt{tp}]
Pointer location for returned text attribute value(s).
\item[\texttt{dp}]
Pointer location for returned floating point attribute value(s).