Sha256: 0446374cfec3e1727053e43b96452111a39e989b2f5f72f723679461425436bb

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

class EventMachine::SFlow::FlowSample
  attr_accessor :sequence_number, :source_class, :source_value, :sampling_rate, :sample_pool, :drop_count, :input_count, :output_count, :records
  
  def initialize data
    data.extend EM::SFlow::BinaryString
    data.extend EM::SFlow::FlowRecord
    
    @records = []
    
    @sequence_number, source_id_class_value, @sampling_rate, @sample_pool, @drop_count, @input_count, @output_count, record_count = data.unpack("NNNNNNNN")
    
    @source_class = source_id_class_value >> 24
    @source_value = source_id_class_value & (2 ** 24 - 1)
    
    data.advance(32)
    
    @records = data.to_flow_records!(record_count)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
em-sflow-1.0.3 lib/em-sflow/packet/flow_sample.rb
em-sflow-1.0.2 lib/em-sflow/packet/flow_sample.rb