class SML::GetProfilePack::Response
Attributes
act_time[RW]
header_list[RW]
parameter_treepath[RW]
period_list[RW]
profile_signature[RW]
raw_data[RW]
register_period[RW]
server_id[RW]
Public Class Methods
construct(array_rep)
click to toggle source
# File lib/ruby-sml/sml-getprofilepack.rb, line 64 def self.construct(array_rep) return nil if array_rep.nil? server_id = array_rep.shift act_time = SML::Time.construct(array_rep.shift) registration_period = array_rep.shift array_rep.shift unless registration_period.nil? parameter_treepath = SML::Treepath.construct(array_rep.shift) header_list = [] array_rep.shift.each do |entry_array_rep| entry = SML::ProfileObjectHeaderEntry.construct(entry_array_rep) return nil if entry.nil? header_list << entry end period_list = [] array_rep.shift.each do |entry_array_rep| entry = SML::ProfileObjectPeriodEntry.construct(entry_array_rep) return nil if entry.nil? period_list << entry end raw_data = array_rep.shift profile_signature = array_rep.shift return nil if (act_time.nil? or parameter_treepath.nil?) return SML::GetProfilePack::Response.new(server_id, act_time, registration_period, parameter_treepath, header_list, period_list, raw_data, profile_signature) end
new(server_id, act_time, register_period, parameter_treepath, header_list, period_list, raw_data, profile_signature)
click to toggle source
# File lib/ruby-sml/sml-getprofilepack.rb, line 53 def initialize(server_id, act_time, register_period, parameter_treepath, header_list, period_list, raw_data, profile_signature) @server_id = server_id @act_time = act_time @register_period = register_period @parameter_treepath = parameter_treepath @header_list = header_list @period_list = period_list @raw_data = raw_data @profile_signature = profile_signature end
Public Instance Methods
to_a()
click to toggle source
# File lib/ruby-sml/sml-getprofilepack.rb, line 89 def to_a header_list_array = [] header_list.each do |entry| header_list_array << entry.to_a end period_list_array = [] period_list.each do |entry| period_list_array << entry.to_a end result = [] << server_id << act_time.to_a << registration_period result << :uint32 unless registration_period.nil? return result << parameter_treepath.to_a << header_list_array << period_list_array << raw_data << profile_signature end