Class: EventMachine::SFlow::ExpandedFlowSample

Inherits:
Object
  • Object
show all
Defined in:
lib/em-sflow/packet/expanded_flow_sample.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ExpandedFlowSample

Returns a new instance of ExpandedFlowSample.



4
5
6
7
8
9
10
11
12
13
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 4

def initialize data
  data.extend EM::SFlow::BinaryString
  data.extend EM::SFlow::FlowRecord

  @sequence_number, @source_class, @source_value, @sampling_rate, @sample_pool, @drop_count, @input_type, @input_value, @output_type, @output_value, record_count = data.unpack("NNNNNNNNNNN")

  data.advance(44)

  @records = data.to_flow_records!(record_count)
end

Instance Attribute Details

#drop_countObject

Returns the value of attribute drop_count.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def drop_count
  @drop_count
end

#input_typeObject

Returns the value of attribute input_type.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def input_type
  @input_type
end

#input_valueObject

Returns the value of attribute input_value.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def input_value
  @input_value
end

#output_typeObject

Returns the value of attribute output_type.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def output_type
  @output_type
end

#output_valueObject

Returns the value of attribute output_value.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def output_value
  @output_value
end

#recordsObject

Returns the value of attribute records.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def records
  @records
end

#sample_poolObject

Returns the value of attribute sample_pool.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def sample_pool
  @sample_pool
end

#sampling_rateObject

Returns the value of attribute sampling_rate.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def sampling_rate
  @sampling_rate
end

#sequence_numberObject

Returns the value of attribute sequence_number.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def sequence_number
  @sequence_number
end

#source_classObject

Returns the value of attribute source_class.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def source_class
  @source_class
end

#source_valueObject

Returns the value of attribute source_value.



2
3
4
# File 'lib/em-sflow/packet/expanded_flow_sample.rb', line 2

def source_value
  @source_value
end