Commit 4b6c1eca authored by Bi-Ruei, Chiu's avatar Bi-Ruei, Chiu

Fix the problem when built-in types are used to instantiate an object

Solve the problem that 'TYPE OCTECT STRING' fails to generate corresponding item.

ClassObj S1AP-PROTOCOL-IES ::= {
  { ID id-eNB-UE-S1AP-ID   CRITICALITY reject   TYPE ENB-UE-S1AP-ID  PRESENCE mandatory}|
  { ID id-S1-Message       CRITICALITY reject   TYPE OCTET STRING    PRESENCE mandatory}|
  ...
}
parent da78f97b
......@@ -225,6 +225,9 @@ emit_ioc_cell(arg_t *arg, struct asn1p_ioc_cell_s *cell) {
} else if(cell->value->meta_type == AMT_TYPEREF) {
GEN_INCLUDE(asn1c_type_name(arg, cell->value, TNF_INCLUDE));
OUT("aioc__type, &asn_DEF_%s", MKID(cell->value));
} else if(cell->value->meta_type == AMT_TYPE) {
GEN_INCLUDE(asn1c_type_name(arg, cell->value, TNF_INCLUDE));
OUT("aioc__type, &asn_DEF_%s", asn1c_type_name(arg, cell->value, TNF_SAFE));
} else {
return -1;
}
......
......@@ -66,8 +66,8 @@ asn_TYPE_descriptor_t asn_DEF_Message = {
#include <NativeInteger.h>
#include <ANY.h>
#include <asn_ioc.h>
#include <OPEN_TYPE.h>
#include <BOOLEAN.h>
#include <OPEN_TYPE.h>
#include <constr_CHOICE.h>
#include <constr_SEQUENCE.h>
......@@ -110,9 +110,9 @@ static const long asn_VAL_1_1 = 1;
static const long asn_VAL_2_2 = 2;
static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
{ "&Type", ,
{ "&Type", aioc__type, &asn_DEF_NativeInteger },
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
{ "&Type",
{ "&Type", aioc__type, &asn_DEF_BOOLEAN }
};
static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
2, 2, asn_IOS_RegionalExtension_1_rows
......
......@@ -66,8 +66,8 @@ asn_TYPE_descriptor_t asn_DEF_Message = {
#include <NativeInteger.h>
#include <ANY.h>
#include <asn_ioc.h>
#include <OPEN_TYPE.h>
#include <BOOLEAN.h>
#include <OPEN_TYPE.h>
#include <constr_CHOICE.h>
#include <constr_SEQUENCE.h>
......@@ -110,9 +110,9 @@ static const long asn_VAL_1_1 = 1;
static const long asn_VAL_2_2 = 2;
static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
{ "&Type", ,
{ "&Type", aioc__type, &asn_DEF_NativeInteger },
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
{ "&Type",
{ "&Type", aioc__type, &asn_DEF_BOOLEAN }
};
static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
2, 2, asn_IOS_RegionalExtension_1_rows
......
......@@ -66,9 +66,9 @@ asn_TYPE_descriptor_t asn_DEF_Message = {
#include <NativeInteger.h>
#include <ANY.h>
#include <asn_ioc.h>
#include <OPEN_TYPE.h>
#include <BOOLEAN.h>
#include <OCTET_STRING.h>
#include <OPEN_TYPE.h>
#include <constr_CHOICE.h>
#include <constr_SEQUENCE.h>
......@@ -115,13 +115,13 @@ static const long asn_VAL_3_2 = 2;
static const long asn_VAL_4_3 = 3;
static const asn_ioc_cell_t asn_IOS_TotalRegionExtension_1_rows[] = {
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
{ "&Type", ,
{ "&Type", aioc__type, &asn_DEF_NativeInteger },
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
{ "&Type", ,
{ "&Type", aioc__type, &asn_DEF_BOOLEAN },
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_3_2 },
{ "&Type", ,
{ "&Type", aioc__type, &asn_DEF_BOOLEAN },
{ "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_4_3 },
{ "&Type",
{ "&Type", aioc__type, &asn_DEF_OCTET_STRING }
};
static const asn_ioc_set_t asn_IOS_TotalRegionExtension_1[] = {
4, 2, asn_IOS_TotalRegionExtension_1_rows
......
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