Class: Pio::OpenFlow::DatapathId

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/pio/open_flow/datapath_id.rb

Overview

Datapath unique ID. The lower 48-bits are for a MAC address, while the upper 16-bits are implementer-defined.

Instance Method Summary collapse

Instance Method Details

#getObject



23
24
25
# File 'lib/pio/open_flow/datapath_id.rb', line 23

def get
  datapath_id.to_i
end

#set(value) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/pio/open_flow/datapath_id.rb', line 15

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