class Pio::OpenFlow10::PacketIn
OpenFlow
1.0 Packet-In message
Attributes
datapath_id[RW]
dpid[RW]
dpid=[RW]
Public Class Methods
inspect()
click to toggle source
rubocop:disable LineLength
# File lib/pio/open_flow10/packet_in.rb, line 35 def self.inspect 'PacketIn(open_flow_version: uint8, message_type: uint8, message_length: uint16, transaction_id: uint32, buffer_id: uint32, total_length: uint16, in_port: uint16, reason: symbol, raw_data: string)' end
Public Instance Methods
data()
click to toggle source
# File lib/pio/open_flow10/packet_in.rb, line 22 def data @data ||= Pio::Parser.read(raw_data) end
inspect()
click to toggle source
rubocop:disable LineLength
# File lib/pio/open_flow10/packet_in.rb, line 41 def inspect data_inspection = if raw_data.empty? %(raw_data: "") else %(data: #{data.inspect}) end %(#<PacketIn open_flow_version: #{version}, message_type: #{type}, message_length: #{_length}, transaction_id: #{Kernel.format('0x%x', transaction_id)}, buffer_id: #{Kernel.format('0x%x', buffer_id)}, total_length: #{total_length}, in_port: #{in_port}, reason: :#{reason}, #{data_inspection}>) end
lldp?()
click to toggle source
# File lib/pio/open_flow10/packet_in.rb, line 26 def lldp? data.is_a? Lldp end
method_missing(method, *args)
click to toggle source
rubocop:enable LineLength
# File lib/pio/open_flow10/packet_in.rb, line 51 def method_missing(method, *args) bindata_value = data.__send__(method, *args) bindata_value.try(:snapshot) || bindata_value end
to_ruby()
click to toggle source
# File lib/pio/open_flow10/packet_in.rb, line 30 def to_ruby @format.to_ruby end