Class: Pio::Features::Reply

Inherits:
Message
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pio/features/reply.rb

Overview

OpenFlow 1.0 Features Reply message

Defined Under Namespace

Classes: Body

Instance Method Summary collapse

Methods inherited from Message

create_from

Constructor Details

#initialize(user_options = {}) ⇒ Reply

Returns a new instance of Reply.



34
35
36
37
38
39
# File 'lib/pio/features/reply.rb', line 34

def initialize(user_options = {})
  @options = user_options.dup.merge(datapath_id: user_options[:dpid])
  body = Body.new(@options)
  @features = Format.new(@options.merge(message_type: 6,
                                        body: body.to_binary_s))
end

Instance Method Details

#actionsObject



62
63
64
65
# File 'lib/pio/features/reply.rb', line 62

def actions
  @body ||= Body.read(@features.body)
  @body.actions
end

#capabilitiesObject



57
58
59
60
# File 'lib/pio/features/reply.rb', line 57

def capabilities
  @body ||= Body.read(@features.body)
  @body.capabilities
end

#datapath_idObject Also known as: dpid



41
42
43
44
# File 'lib/pio/features/reply.rb', line 41

def datapath_id
  @body ||= Body.read(@features.body)
  @body.datapath_id
end

#n_buffersObject



47
48
49
50
# File 'lib/pio/features/reply.rb', line 47

def n_buffers
  @body ||= Body.read(@features.body)
  @body.n_buffers
end

#n_tablesObject



52
53
54
55
# File 'lib/pio/features/reply.rb', line 52

def n_tables
  @body ||= Body.read(@features.body)
  @body.n_tables
end

#portsObject



67
68
69
70
# File 'lib/pio/features/reply.rb', line 67

def ports
  @body ||= Body.read(@features.body)
  @body.ports
end