Sha256: 06ac4b3fa743c0111f69455ba989ece2c469c5f1053d38ac8729d16916245bf1

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

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

module Pio
  module OpenFlow
    # Transaction ID (uint32)
    class TransactionId < BinData::Primitive
      endian :big

      uint32 :xid

      def set(value)
        unless value.unsigned_32bit?
          raise(ArgumentError,
                'Transaction ID should be an unsigned 32-bit integer.')
        end
        self.xid = value
      end

      def get
        xid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pio-0.30.1 lib/pio/open_flow/transaction_id.rb