Class: Pio::OpenFlow10::PortStatus::Reason
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Pio::OpenFlow10::PortStatus::Reason
- Defined in:
- lib/pio/open_flow10/port_status/reason.rb
Overview
What changed about the physical port
Constant Summary collapse
- REASONS =
{ add: 0, delete: 1, modify: 2 }.freeze
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
13 14 15 |
# File 'lib/pio/open_flow10/port_status/reason.rb', line 13 def get REASONS.invert.fetch(reason) end |
#set(value) ⇒ Object
17 18 19 |
# File 'lib/pio/open_flow10/port_status/reason.rb', line 17 def set(value) self.reason = REASONS.fetch(value) end |