vlm / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
1.03k stars 551 forks source link

Example of uper_encode_to_buffer #265

Open josephquzhou opened 6 years ago

josephquzhou commented 6 years ago

There is no example or explanation of uper_encode_to_buffer in the document. Would it be possible to provide an example? Thanks!

velichkov commented 6 years ago

Hi @josephquzhou,

There are examples in the tests, here are two https://github.com/vlm/asn1c/blob/4cc779fd9bd7f556699b5863cf111b359da10b66/tests/tests-c-compiler/check-src/check-132.-gen-PER.c#L13-L21 https://github.com/vlm/asn1c/blob/4cc779fd9bd7f556699b5863cf111b359da10b66/tests/tests-skeletons/check-PER-UniversalString.c#L32-L46