class Pio::OpenFlow13::NiciraStackPop
NXAST_STACK_POP action
Attributes
field[R]
Public Class Methods
new(field, options = {})
click to toggle source
Calls superclass method
Pio::OpenFlow::Action::new
# File lib/pio/open_flow13/nicira_stack_pop.rb, line 24 def initialize(field, options = {}) @field = field super(_offset: options[:offset] || 0, _n_bits: (options[:n_bits] || oxm_length * 8) + 1, field: { oxm_class: field_oxm_class.const_get(:OXM_CLASS), oxm_field: field_oxm_class.const_get(:OXM_FIELD), oxm_length: oxm_length }) end
Public Instance Methods
n_bits()
click to toggle source
# File lib/pio/open_flow13/nicira_stack_pop.rb, line 36 def n_bits _n_bits - 1 end
Private Instance Methods
field_oxm_class()
click to toggle source
# File lib/pio/open_flow13/nicira_stack_pop.rb, line 46 def field_oxm_class Match.const_get(@field.to_s.split('_').map(&:capitalize).join) end
oxm_length()
click to toggle source
# File lib/pio/open_flow13/nicira_stack_pop.rb, line 42 def oxm_length field_oxm_class.new.length end