Class: Trema::PortStatusAdd

Inherits:
PortStatus show all
Defined in:
ruby/trema/port-status-add.rb

Overview

As physical ports are added to the datapath, the controller needs to be informed with this message.

Constant Summary

Constants inherited from PortStatus

Trema::PortStatus::OFPPR_ADD, Trema::PortStatus::OFPPR_DELETE, Trema::PortStatus::OFPPR_MODIFY

Instance Method Summary collapse

Methods inherited from PortStatus

#datapath_id, #phy_port, #reason, #transaction_id

Constructor Details

#initialize(options) ⇒ PortStatusAdd

Creates a port-added message.

Examples:

PortStatusAdd.new(
  :datapath_id => 0xabc,
  :transaction_id => 123,
  :phy_port => port
)

Parameters:

  • options (Hash)

    the options to create a message with.

Options Hash (options):

  • :datapath_id (Number)

    message originator identifier.

  • :transaction_id (Number)

    unsolicited message transaction_id is zero.

  • :phy_port (Port)

    a Trema::Port object describing the properties of the port.



49
50
51
# File 'ruby/trema/port-status-add.rb', line 49

def initialize options
  super options.merge( :reason => OFPPR_ADD )
end