Class: RetroIDL::ASN::SEQUENCEOF

Inherits:
BaseType
  • Object
show all
Defined in:
lib/retro_idl/asn/sequenceof.rb

Constant Summary collapse

TAG_CLASS_NUMBER =
16
TAG_CLASS =
:universal

Instance Attribute Summary

Attributes inherited from BaseType

#id

Instance Method Summary collapse

Methods inherited from BaseType

===

Constructor Details

#initialize(**opts) ⇒ SEQUENCEOF

Returns a new instance of SEQUENCEOF.



26
27
28
29
30
31
# File 'lib/retro_idl/asn/sequenceof.rb', line 26

def initialize(**opts)

    super(**opts)
    @type = RetroIDL::ASN.const_get(opts[:type][:class]).new( **opts[:type] )

end

Instance Method Details



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/retro_idl/asn/sequenceof.rb', line 33

def link(mod, stack)

    if @mod.nil? or @mod != mod

        @mod = nil

        if @type.link(mod, stack)

            super(mod, stack)

        end

    else

        @mod

    end
    
end

#to_sString

Convert object to ASN.1 syntax representation

Returns:

  • (String)

    ASN.1 syntax representation

Raises:



54
55
56
57
58
# File 'lib/retro_idl/asn/sequenceof.rb', line 54

def to_s

    "#{@tag} SEQUENCE #{@constraint} OF #{@type}"

end