Sha256: 43b583181effe4cd256b24844ae8f32c7f86c33e88747df45b3e260c5b10d8ab

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

module Pio
  module OpenFlow10
    # Flow Removed message
    class FlowRemoved < OpenFlow::Message
      # Why was this flow removed?
      # (enum ofp_flow_removed_reason)
      class Reason < BinData::Primitive
        REASONS = { idle_timeout: 0, hard_timeout: 1, delete: 2 }.freeze

        uint8 :reason

        def get
          REASONS.invert.fetch(reason)
        end

        def set(value)
          self.reason = REASONS.fetch(value)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pio-0.30.1 lib/pio/open_flow10/flow_removed/reason.rb