Class: Pio::OpenFlow13::NiciraRegLoad

Inherits:
Pio::OpenFlow::NiciraAction show all
Defined in:
lib/pio/open_flow13/nicira_reg_load.rb

Overview

NXAST_REG_LOAD action

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pio::OpenFlow::NiciraAction

nicira_action_header

Methods inherited from Pio::OpenFlow::Action

action_header, method_missing, read, #to_binary

Constructor Details

#initialize(value, destination, options = {}) ⇒ NiciraRegLoad

Returns a new instance of NiciraRegLoad.



23
24
25
26
27
28
29
30
31
# File 'lib/pio/open_flow13/nicira_reg_load.rb', line 23

def initialize(value, destination, options = {})
  @destination = destination
  super(_value: value,
        _offset: options[:offset] || 0,
        _n_bits: (options[:n_bits] || oxm_length * 8) - 1,
        _destination: { oxm_class: oxm_class,
                        oxm_field: oxm_field,
                        oxm_length: oxm_length })
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



33
34
35
# File 'lib/pio/open_flow13/nicira_reg_load.rb', line 33

def destination
  @destination
end

Instance Method Details

#n_bitsObject



39
40
41
# File 'lib/pio/open_flow13/nicira_reg_load.rb', line 39

def n_bits
  _n_bits + 1
end

#offsetObject



35
36
37
# File 'lib/pio/open_flow13/nicira_reg_load.rb', line 35

def offset
  _offset
end

#valueObject



43
44
45
# File 'lib/pio/open_flow13/nicira_reg_load.rb', line 43

def value
  _value
end