Sha256: 217dee60298e6c8cd2a3f2e396c8cd24221c3cf6fea6d317f206a905341179d8

Contents?: true

Size: 567 Bytes

Versions: 12

Compression:

Stored size: 567 Bytes

Contents

require 'bindata'
require 'pio/monkey_patch/integer'

module Pio
  module OpenFlow
    # Datapath unique ID. The lower 48-bits are for a MAC address,
    # while the upper 16-bits are implementer-defined.
    class DatapathId < BinData::Primitive
      endian :big

      uint64 :datapath_id

      def set(value)
        unless value.unsigned_64bit?
          fail(ArgumentError,
               'Datapath ID should be an unsigned 64-bit integer.')
        end
        self.datapath_id = value
      end

      def get
        datapath_id
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pio-0.30.0 lib/pio/open_flow/datapath_id.rb
pio-0.29.0 lib/pio/open_flow/datapath_id.rb
pio-0.28.1 lib/pio/open_flow/datapath_id.rb
pio-0.28.0 lib/pio/open_flow/datapath_id.rb
pio-0.27.2 lib/pio/open_flow/datapath_id.rb
pio-0.27.1 lib/pio/open_flow/datapath_id.rb
pio-0.27.0 lib/pio/open_flow/datapath_id.rb
pio-0.26.0 lib/pio/open_flow/datapath_id.rb
pio-0.25.0 lib/pio/open_flow/datapath_id.rb
pio-0.24.2 lib/pio/open_flow/datapath_id.rb
pio-0.24.1 lib/pio/open_flow/datapath_id.rb
pio-0.24.0 lib/pio/open_flow/datapath_id.rb