Moving in e2sim originally from it/test/simulators
[sim/e2-interface.git] / e2sim / ASN1c / asn_ioc.h
1 /*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 #                                                                            *
5 # Licensed under the Apache License, Version 2.0 (the "License");            *
6 # you may not use this file except in compliance with the License.           *
7 # You may obtain a copy of the License at                                    *
8 #                                                                            *
9 #      http://www.apache.org/licenses/LICENSE-2.0                            *
10 #                                                                            *
11 # Unless required by applicable law or agreed to in writing, software        *
12 # distributed under the License is distributed on an "AS IS" BASIS,          *
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
14 # See the License for the specific language governing permissions and        *
15 # limitations under the License.                                             *
16 #                                                                            *
17 ******************************************************************************/
18
19 /*
20  * Run-time support for Information Object Classes.
21  * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
22  * Redistribution and modifications are permitted subject to BSD license.
23  */
24 #ifndef ASN_IOC_H
25 #define ASN_IOC_H
26
27 #include <asn_system.h>         /* Platform-specific types */
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 struct asn_TYPE_descriptor_s;
34 struct asn_ioc_cell_s;
35
36 /*
37  * X.681, #13
38  */
39 typedef struct asn_ioc_set_s {
40     size_t rows_count;
41     size_t columns_count;
42     const struct asn_ioc_cell_s *rows;
43 } asn_ioc_set_t;
44
45
46 typedef struct asn_ioc_cell_s {
47     const char *field_name; /* Is equal to corresponding column_name */
48     enum {
49         aioc__undefined = 0,
50         aioc__value,
51         aioc__type,
52         aioc__open_type,
53     } cell_kind;
54     struct asn_TYPE_descriptor_s *type_descriptor;
55     const void *value_sptr;
56     struct {
57         size_t types_count;
58         struct {
59             unsigned choice_position;
60         } *types;
61     } open_type;
62 } asn_ioc_cell_t;
63
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif  /* ASN_IOC_H */