diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-06-03 19:58:59 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-06-03 19:58:59 +0000 |
commit | 4393bceae595f7b1488ec4f38767a3da710349f0 (patch) | |
tree | d4185e9cdf8bade136e1324647bb1a81338bdd7b /tools | |
parent | a6dab6d6447509270ccb10281f155e6b804a8b25 (diff) |
INAP:
- Use (some) IN CS4 asn1 files Q.1248.1 Q.1248.2 Q.1248.3
BER/asn2wrs:
- Add basic support for EmbeddedPDVType
svn path=/trunk/; revision=22031
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/asn2wrs.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 88d3f19a06..9fa849c1fd 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -4138,9 +4138,20 @@ class EmbeddedPDVType (Type): def GetTTag(self, ectx): return ('BER_CLASS_UNI', 'BER_UNI_TAG_EMBEDDED_PDV') + def eth_type_default_pars(self, ectx, tname): + pars = Type.eth_type_default_pars(self, ectx, tname) + if ectx.default_external_type_cb: + pars['TYPE_REF_FN'] = ectx.default_external_type_cb + else: + pars['TYPE_REF_FN'] = 'NULL' + return pars def eth_type_default_body(self, ectx, tname): - body = '#error Can not decode %s' % (tname) + if (ectx.Ber()): + body = ectx.eth_fn_call('dissect_%(ER)s_EmbeddedPDV_Type', ret='offset', + par=(('%(IMPLICIT_TAG)s', '%(TREE)s', '%(TVB)s', '%(OFFSET)s', '%(ACTX)s', '%(HF_INDEX)s', '%(TYPE_REF_FN)s',),)) + else: + body = '#error Can not decode %s' % (tname) return body #--- ExternalType ----------------------------------------------------------- |