Class: EventMachine::SFlow::ExpandedFlowSample
- Inherits:
-
Object
- Object
- EventMachine::SFlow::ExpandedFlowSample
- Defined in:
- lib/em-sflow/packet/expanded_flow_sample.rb
Instance Attribute Summary collapse
-
#drop_count ⇒ Object
Returns the value of attribute drop_count.
-
#input_type ⇒ Object
Returns the value of attribute input_type.
-
#input_value ⇒ Object
Returns the value of attribute input_value.
-
#output_type ⇒ Object
Returns the value of attribute output_type.
-
#output_value ⇒ Object
Returns the value of attribute output_value.
-
#records ⇒ Object
Returns the value of attribute records.
-
#sample_pool ⇒ Object
Returns the value of attribute sample_pool.
-
#sampling_rate ⇒ Object
Returns the value of attribute sampling_rate.
-
#sequence_number ⇒ Object
Returns the value of attribute sequence_number.
-
#source_class ⇒ Object
Returns the value of attribute source_class.
-
#source_value ⇒ Object
Returns the value of attribute source_value.
Instance Method Summary collapse
-
#initialize(data) ⇒ ExpandedFlowSample
constructor
A new instance of ExpandedFlowSample.
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_count ⇒ Object
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_type ⇒ Object
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_value ⇒ Object
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_type ⇒ Object
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_value ⇒ Object
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 |
#records ⇒ Object
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_pool ⇒ Object
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_rate ⇒ Object
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_number ⇒ Object
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_class ⇒ Object
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_value ⇒ Object
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 |