ITS: fix asn2wrs #.NO_EMIT
asn2wrs accepts #.NO_EMIT using module specific $Module$TypeName identifier
This commit is contained in:
parent
be6aff9e11
commit
5af925e013
|
@ -4854,15 +4854,6 @@ dissect_itsv1_SemiAxisLength(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
}
|
||||
|
||||
|
||||
static const value_string itsv1_HeadingValue_vals[] = {
|
||||
{ 0, "wgs84North" },
|
||||
{ 900, "wgs84East" },
|
||||
{ 1800, "wgs84South" },
|
||||
{ 2700, "wgs84West" },
|
||||
{ 3601, "unavailable" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
dissect_itsv1_HeadingValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
|
|
|
@ -921,7 +921,7 @@ class EthCtx:
|
|||
self.type_dep[type].append(dep)
|
||||
|
||||
#--- eth_reg_type -----------------------------------------------------------
|
||||
def eth_reg_type(self, ident, val):
|
||||
def eth_reg_type(self, ident, val, mod=None):
|
||||
#print "eth_reg_type(ident='%s', type='%s')" % (ident, val.type)
|
||||
if ident in self.type:
|
||||
if self.type[ident]['import'] and (self.type[ident]['import'] == self.Module()) :
|
||||
|
@ -938,11 +938,18 @@ class EthCtx:
|
|||
self.type[ident]['tname'] = val.eth_tname()
|
||||
else:
|
||||
self.type[ident]['tname'] = asn2c(ident)
|
||||
if mod :
|
||||
mident = "$%s$%s" % (mod, ident)
|
||||
else:
|
||||
mident = None
|
||||
self.type[ident]['export'] = self.conform.use_item('EXPORTS', ident)
|
||||
self.type[ident]['enum'] = self.conform.use_item('MAKE_ENUM', ident)
|
||||
self.type[ident]['vals_ext'] = self.conform.use_item('USE_VALS_EXT', ident)
|
||||
self.type[ident]['user_def'] = self.conform.use_item('USER_DEFINED', ident)
|
||||
self.type[ident]['no_emit'] = self.conform.use_item('NO_EMIT', ident)
|
||||
if mident and self.conform.check_item('NO_EMIT', mident) :
|
||||
self.type[ident]['no_emit'] = self.conform.use_item('NO_EMIT', mident)
|
||||
else:
|
||||
self.type[ident]['no_emit'] = self.conform.use_item('NO_EMIT', ident)
|
||||
self.type[ident]['tname'] = self.conform.use_item('TYPE_RENAME', ident, val_dflt=self.type[ident]['tname'])
|
||||
self.type[ident]['ethname'] = ''
|
||||
if (val.type == 'Type_Ref') or (val.type == 'TaggedType') or (val.type == 'SelectionType') :
|
||||
|
@ -3286,7 +3293,7 @@ class Type (Node):
|
|||
else:
|
||||
trnm = self.val
|
||||
else:
|
||||
ectx.eth_reg_type(nm, self)
|
||||
ectx.eth_reg_type(nm, self, mod = ectx.Module())
|
||||
trnm = nm
|
||||
if ectx.conform.check_item('VIRTUAL_ASSGN', nm):
|
||||
vnm = ectx.conform.use_item('VIRTUAL_ASSGN', nm)
|
||||
|
|
Loading…
Reference in New Issue