Class: Pio::OpenFlow13::PacketIn

Inherits:
Pio::OpenFlow::Message show all
Defined in:
lib/pio/open_flow13/packet_in.rb

Overview

OpenFlow 1.3 PacketIn message parser and generator

Defined Under Namespace

Classes: Reason

Instance Attribute Summary collapse

Attributes inherited from Pio::OpenFlow::Message

#format

Instance Method Summary collapse

Methods inherited from Pio::OpenFlow::Message

#initialize, method_missing, open_flow_header, read, #to_binary

Methods included from Pio::OpenFlow::Flags

#_define_flags, #_flags, #define_flags_32bit, #flags_16bit, #flags_32bit

Constructor Details

This class inherits a constructor from Pio::OpenFlow::Message

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



55
56
57
58
# File 'lib/pio/open_flow13/packet_in.rb', line 55

def method_missing(method, *args)
  bindata_value = data.__send__(method, *args)
  bindata_value.try(:snapshot) || bindata_value
end

Instance Attribute Details

#datapath_idObject Also known as: dpid

Returns the value of attribute datapath_id.



43
44
45
# File 'lib/pio/open_flow13/packet_in.rb', line 43

def datapath_id
  @datapath_id
end

Instance Method Details

#dataObject



47
48
49
# File 'lib/pio/open_flow13/packet_in.rb', line 47

def data
  @data ||= Pio::Parser.read(raw_data)
end

#in_portObject



51
52
53
# File 'lib/pio/open_flow13/packet_in.rb', line 51

def in_port
  match.in_port
end