Commit 07f8c3ea authored by Lev Walkin's avatar Lev Walkin

add asn_encode* and other encoders

parent 686f38bf
This diff is collapsed.
......@@ -5,7 +5,7 @@ may contain partially decoded data. This data may be useful for debugging
Don't forget to discard the unused partially decoded data by calling
\code{ASN_STRUCT_FREE()} or \code{ASN_STRUCT_RESET()}.
The return value is returned in a compound structure:
The function returns a compound structure:
\begin{codesample}
typedef struct {
enum {
......@@ -17,7 +17,7 @@ typedef struct {
} asn_dec_rval_t;
\end{codesample}
The \code{.code} member specifies the decoding outcome.
\noindent{}The \code{.code} member specifies the decoding outcome.
\begin{tabular}[h!]{ll}
\texttt{RC\_OK} & Decoded successfully and completely \\
......@@ -25,6 +25,6 @@ The \code{.code} member specifies the decoding outcome.
\texttt{RC\_FAIL} & Failed for good
\end{tabular}
The \code{.consumed} member specifies the amount of \code{buffer} data
\noindent{}The \code{.consumed} member specifies the amount of \code{buffer} data
that was used during parsing, irrespectively of the \code{.code}.
The function returns a compound structure:
\begin{codesample}
typedef struct {
ssize_t encoded;
const asn_TYPE_descriptor_t *failed_type;
const void *structure_ptr;
} asn_enc_rval_t;
\end{codesample}
\noindent{}In case of unsuccessful encoding, the \code{.encoded} member is set to -1 and
the other members of the compound structure point to where the encoding has
failed to proceed further.
In case encoding is successful, the \code{.encoded} member specifies the
size of the serialized output.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment