Class: RetroIDL::ASN::OCTETSTRING

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

Constant Summary collapse

TAG_CLASS_NUMBER =
4
TAG_CLASS =
:universal

Instance Attribute Summary

Attributes inherited from BaseType

#id

Instance Method Summary collapse

Methods inherited from BaseType

===, #initialize, #link

Constructor Details

This class inherits a constructor from RetroIDL::ASN::BaseType

Instance Method Details

#evaluate(value) ⇒ Object



33
34
35
# File 'lib/retro_idl/asn/octetstring.rb', line 33

def evaluate(value)
    value.kind_of?(String)
end

#evaluateConstraint(value) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/retro_idl/asn/octetstring.rb', line 37

def evaluateConstraint(value)

    if evaluate(value) and ( @constraint or @constraint.evaluate(value) )
        true
    else
        false
    end

end

#to_sString

Convert object to ASN.1 syntax representation

Returns:

  • (String)

    ASN.1 syntax representation

Raises:



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

def to_s

    return "#{@tag} OCTET STRING #{@constraint}"

end