Sha256: 57eb196c1fb489144de71aad164548db816f0b693891474e5e1682b54865d773

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

module Pio
  module OpenFlow10
    module Error
      # enum ofp_error_type
      class ErrorType10 < BinData::Primitive
        ERROR_TYPES = {
          hello_failed: 0,
          bad_request: 1,
          bad_action: 2,
          flow_mod_failed: 3,
          port_mod_failed: 4,
          queue_operation_failed: 5
        }

        endian :big
        uint16 :error_type

        def get
          ERROR_TYPES.invert.fetch(error_type)
        end

        def set(value)
          self.error_type = ERROR_TYPES.fetch(value)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pio-0.30.0 lib/pio/open_flow10/error/error_type10.rb
pio-0.29.0 lib/pio/open_flow10/error/error_type10.rb
pio-0.28.1 lib/pio/open_flow10/error/error_type10.rb
pio-0.28.0 lib/pio/open_flow10/error/error_type10.rb
pio-0.27.2 lib/pio/open_flow10/error/error_type10.rb
pio-0.27.1 lib/pio/open_flow10/error/error_type10.rb
pio-0.27.0 lib/pio/open_flow10/error/error_type10.rb