Class: Pio::OpenFlow13::NiciraSendOutPort

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

Overview

NXAST_OUTPUT_REG 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(source, options = {}) ⇒ NiciraSendOutPort

Returns a new instance of NiciraSendOutPort.



25
26
27
28
29
30
31
32
33
# File 'lib/pio/open_flow13/nicira_send_out_port.rb', line 25

def initialize(source, options = {})
  @source = source
  super(_n_bits: (options[:n_bits] || oxm_length * 8) - 1,
        _offset: options[:offset] || 0,
        _source: { oxm_class: source_oxm_class.const_get(:OXM_CLASS),
                   oxm_field: source_oxm_class.const_get(:OXM_FIELD),
                   oxm_length: oxm_length },
        max_length: options[:max_length] || SendOutPort::NO_BUFFER)
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



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

def source
  @source
end

Instance Method Details

#n_bitsObject



41
42
43
# File 'lib/pio/open_flow13/nicira_send_out_port.rb', line 41

def n_bits
  _n_bits + 1
end

#offsetObject



37
38
39
# File 'lib/pio/open_flow13/nicira_send_out_port.rb', line 37

def offset
  _offset
end