Class: RASN1::Types::Set

Inherits:
Sequence show all
Defined in:
lib/rasn1/types/set.rb

Overview

ASN.1 set

A set is a collection of another ASN.1 types.

To encode this ASN.1 example:

Record ::= SET {
  id        INTEGER,
  room  [0] INTEGER OPTIONAL,
  house [1] IMPLICIT INTEGER DEFAULT 0
}

do:

set = RASN1::Types::Set.new
set.value = [
             RASN1::Types::Integer
             RASN1::Types::Integer(explicit: 0, optional: true),
             RASN1::Types::Integer(implicit: 1, default: 0)
            ]

Author:

  • Sylvain Daubert

Constant Summary collapse

ID =

Set id value

0x11

Constants inherited from Constructed

Constructed::ASN1_PC

Constants inherited from Base

Base::CLASSES, Base::CLASS_MASK, Base::INDEFINITE_LENGTH, Base::MULTI_OCTETS_ID

Instance Attribute Summary

Attributes inherited from Base

#asn1_class, #default, #name, #options

Method Summary

Methods inherited from Sequence

#[], #der_to_value_with_tracing, #initialize, #initialize_copy, start_tracing, stop_tracing, #void_value

Methods inherited from Constructed

#can_build?, #inspect

Methods inherited from Base

#==, #can_build?, constrained?, #constructed?, #do_parse_explicit_with_tracing, #do_parse_with_tracing, encoded_type, #explicit?, #id, #implicit?, #initialize, #initialize_copy, #inspect, #optional?, parse, #parse!, #primitive?, #specific_initializer, start_tracing, stop_tracing, #tagged?, #to_der, #trace, #type, type, #value, #value=, #value?, #value_size, #void_value

Constructor Details

This class inherits a constructor from RASN1::Types::Sequence