Class: Pio::OpenFlow13::NiciraStackPush

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

Overview

NXAST_STACK_PUSH 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(field, options = {}) ⇒ NiciraStackPush

Returns a new instance of NiciraStackPush.



24
25
26
27
28
29
30
31
# File 'lib/pio/open_flow13/nicira_stack_push.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

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



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

def field
  @field
end

Instance Method Details

#n_bitsObject



36
37
38
# File 'lib/pio/open_flow13/nicira_stack_push.rb', line 36

def n_bits
  _n_bits - 1
end