Sha256: 71c4801efebb6212e847f0e65fa18a1bc5c58925bfd4cff9d653df5d4ce82770

Contents?: true

Size: 809 Bytes

Versions: 5

Compression:

Stored size: 809 Bytes

Contents

require 'pio/open_flow'

module Pio
  module OpenFlow13
    # OpenFlow 1.3 Stats Request message
    class StatsRequest < OpenFlow::Message
      # Request type of Stats Request message
      class StatsType < BinData::Primitive
        TYPES = [:description,
                 :flow,
                 :aggregate,
                 :table,
                 :port,
                 :queue,
                 :vendor]

        endian :big

        uint16 :stats_type

        def set(value)
          self.stats_type = TYPES.find_index(value)
        end

        def get
          TYPES[stats_type]
        end
      end

      open_flow_header version: 4,
                       message_type: 16,
                       message_length: 12
      stats_type :stats_type
      uint16 :stats_flags
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pio-0.30.0 lib/pio/open_flow13/stats_request.rb
pio-0.29.0 lib/pio/open_flow13/stats_request.rb
pio-0.28.1 lib/pio/open_flow13/stats_request.rb
pio-0.28.0 lib/pio/open_flow13/stats_request.rb
pio-0.27.2 lib/pio/open_flow13/stats_request.rb