Class: Pio::OpenFlow13::NiciraStackPush
- Inherits:
-
Pio::OpenFlow::NiciraAction
- Object
- Pio::OpenFlow::Action
- Pio::OpenFlow::NiciraAction
- Pio::OpenFlow13::NiciraStackPush
- Defined in:
- lib/pio/open_flow13/nicira_stack_push.rb
Overview
NXAST_STACK_PUSH action
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field, options = {}) ⇒ NiciraStackPush
constructor
A new instance of NiciraStackPush.
- #n_bits ⇒ Object
Methods inherited from Pio::OpenFlow::NiciraAction
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, = {}) @field = field super(_offset: [:offset] || 0, _n_bits: ([: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
#field ⇒ Object (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_bits ⇒ Object
36 37 38 |
# File 'lib/pio/open_flow13/nicira_stack_push.rb', line 36 def n_bits _n_bits - 1 end |