Class: Pio::OpenFlow13::Match::Oxm

Inherits:
BinData::Record show all
Defined in:
lib/pio/open_flow13/match.rb

Overview

OXM format

Defined Under Namespace

Classes: Experimenter, MatchField, NiciraMatchExtension, OpenflowBasic, PacketRegisters

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object

rubocop:disable AbcSize rubocop:disable Next rubocop:disable LineLength

Raises:

  • (NoMethodError)


1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
# File 'lib/pio/open_flow13/match.rb', line 1230

def method_missing(method, *args, &block)
  match_fields.each do |each|
    if each.oxm_class == OpenFlowBasicValue::OXM_CLASS || each.oxm_class == NiciraMatchExtensionValue::OXM_CLASS || each.oxm_class == PacketRegistersValue::OXM_CLASS
      next unless each.class_payload.tlv_value.respond_to?(method)
      return each.class_payload.tlv_value.__send__(
        method, *args, &block
      )
    end
  end
  raise NoMethodError, method.to_s
end

Instance Method Details

#lengthObject



1223
1224
1225
# File 'lib/pio/open_flow13/match.rb', line 1223

def length
  match_length + padding_length
end