Home | History | Annotate | Line # | Download | only in asn1
      1  1.1.1.2  elric -- Id --
      2      1.1  elric 
      3      1.1  elric CANTHANDLE DEFINITIONS ::= BEGIN
      4      1.1  elric 
      5      1.1  elric -- Code the tag [1] but not the [ CONTEXT CONS UT_Sequence ] for Kaka2
      6      1.1  elric -- Workaround: use inline the structure directly
      7      1.1  elric -- Code the tag [2] but it should be primitive since KAKA3 is
      8      1.1  elric -- Workaround: use the INTEGER type directly
      9      1.1  elric 
     10      1.1  elric Kaka2  ::= SEQUENCE {
     11      1.1  elric         kaka2-1 [0] INTEGER
     12      1.1  elric }
     13      1.1  elric 
     14      1.1  elric Kaka3  ::= INTEGER
     15      1.1  elric 
     16      1.1  elric Foo ::= SEQUENCE {
     17      1.1  elric         kaka1 [0] IMPLICIT INTEGER OPTIONAL,
     18      1.1  elric         kaka2 [1] IMPLICIT Kaka2 OPTIONAL,
     19      1.1  elric         kaka3 [2] IMPLICIT Kaka3 OPTIONAL
     20      1.1  elric }
     21      1.1  elric 
     22      1.1  elric -- Don't code kaka if it's 1
     23      1.1  elric -- Workaround is to use OPTIONAL and check for in the encoder stubs
     24      1.1  elric 
     25      1.1  elric Bar ::= SEQUENCE {
     26      1.1  elric         kaka [0] INTEGER DEFAULT 1
     27      1.1  elric }
     28      1.1  elric 
     29      1.1  elric --  Can't handle primitives in SET OF
     30      1.1  elric --  Workaround is to define a type that is only an integer and use that
     31      1.1  elric 
     32      1.1  elric Baz ::= SET OF INTEGER
     33      1.1  elric 
     34      1.1  elric END
     35