aper_support.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
3  * Redistribution and modifications are permitted subject to BSD license.
4  */
5 #ifndef _APER_SUPPORT_H_
6 #define _APER_SUPPORT_H_
7 
8 #include <etsi_its_vam_ts_coding/asn_system.h> /* Platform-specific types */
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 /*
16  * X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
17  * Get the length "n" from the Aligned PER stream.
18  */
19 ssize_t aper_get_length(asn_per_data_t *pd, ssize_t lb, ssize_t ub,
20  int effective_bound_bits, int *repeat);
21 
22 /*
23  * Get the normally small length "n".
24  */
26 
27 /*
28  * Get the normally small non-negative whole number.
29  */
30 ssize_t aper_get_nsnnwn(asn_per_data_t *pd);
31 
32 /*
33  * Get the constrained whole number.
34  */
35 long aper_get_constrained_whole_number(asn_per_data_t *po, long lb, long ub);
36 
37 /*
38  * X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
39  * Put the length "n" to the Aligned PER stream.
40  * If (opt_need_eom) is given, it will be set to 1 if final 0-n is needed.
41  * In that case, invoke aper_put_length(po, -1, -1, 0, NULL) after encoding the
42  * last block.
43  * This function returns the number of units which may be flushed
44  * in the next units saving iteration.
45  */
46 ssize_t aper_put_length(asn_per_outp_t *po, ssize_t lb, ssize_t ub, size_t n,
47  int *opt_need_eom);
48 
49 /* Align the current bit position to octet bundary */
51 int32_t aper_get_align(asn_per_data_t *pd);
52 
53 /*
54  * Put the normally small length "n" to the Unaligned PER stream.
55  * Returns 0 or -1.
56  */
57 int aper_put_nslength(asn_per_outp_t *po, size_t length);
58 
59 /*
60  * Put the normally small non-negative whole number.
61  */
62 int aper_put_nsnnwn(asn_per_outp_t *po, int number);
63 
64 /*
65  * Put the constrained whole number.
66  */
67 int aper_put_constrained_whole_number(asn_per_outp_t *po, long lb, long ub, long number);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* _APER_SUPPORT_H_ */
aper_put_nslength
int aper_put_nslength(asn_per_outp_t *po, size_t length)
Definition: aper_support.c:234
asn_bit_outp_s
Definition: asn_bit_data.h:56
per_support.h
aper_put_align
int aper_put_align(asn_per_outp_t *po)
Definition: aper_support.c:185
aper_put_length
ssize_t aper_put_length(asn_per_outp_t *po, ssize_t lb, ssize_t ub, size_t n, int *opt_need_eom)
Definition: aper_support.c:196
aper_put_nsnnwn
int aper_put_nsnnwn(asn_per_outp_t *po, int number)
Definition: aper_support.c:251
aper_get_nslength
ssize_t aper_get_nslength(asn_per_data_t *pd)
Definition: aper_support.c:53
asn_bit_data_s
Definition: asn_bit_data.h:17
aper_get_align
int32_t aper_get_align(asn_per_data_t *pd)
Definition: aper_support.c:10
aper_get_nsnnwn
ssize_t aper_get_nsnnwn(asn_per_data_t *pd)
Definition: aper_support.c:72
aper_get_length
ssize_t aper_get_length(asn_per_data_t *pd, ssize_t lb, ssize_t ub, int effective_bound_bits, int *repeat)
Definition: aper_support.c:20
asn_system.h
aper_get_constrained_whole_number
long aper_get_constrained_whole_number(asn_per_data_t *po, long lb, long ub)
Definition: aper_support.c:116
aper_put_constrained_whole_number
int aper_put_constrained_whole_number(asn_per_outp_t *po, long lb, long ub, long number)
Definition: aper_support.c:301


etsi_its_vam_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:30:55