Class: Pio::OpenFlow::HelloFailedCode

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

Overview

enum ofp_hello_failed_code

Constant Summary collapse

ERROR_CODES =
{ incompatible: 0, permissions_error: 1 }

Instance Method Summary collapse

Instance Method Details

#getObject



12
13
14
# File 'lib/pio/open_flow/hello_failed_code.rb', line 12

def get
  ERROR_CODES.invert.fetch(error_code)
end

#set(value) ⇒ Object



16
17
18
# File 'lib/pio/open_flow/hello_failed_code.rb', line 16

def set(value)
  self.error_code = ERROR_CODES.fetch(value)
end