Commit f4a1f580 authored by Bi-Ruei, Chiu's avatar Bi-Ruei, Chiu

Add aper_encode_to_buffer()

parent 755538fe
...@@ -163,6 +163,20 @@ _uper_encode_flush_outp(asn_per_outp_t *po) { ...@@ -163,6 +163,20 @@ _uper_encode_flush_outp(asn_per_outp_t *po) {
return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); return po->output(po->tmpspace, buf - po->tmpspace, po->op_key);
} }
asn_enc_rval_t
aper_encode_to_buffer(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, void *buffer, size_t buffer_size) {
enc_to_buf_arg key;
key.buffer = buffer;
key.left = buffer_size;
if(td) ASN_DEBUG("Encoding \"%s\" using ALIGNED PER", td->name);
return aper_encode(td, constraints, sptr, encode_to_buffer_cb, &key);
}
ssize_t ssize_t
aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const asn_per_constraints_t *constraints,
......
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