Class: Pio::OpenFlow10::SendOutPort
- Inherits:
-
Pio::OpenFlow::Action
- Object
- Pio::OpenFlow::Action
- Pio::OpenFlow10::SendOutPort
- Defined in:
- lib/pio/open_flow10/send_out_port.rb
Overview
An action to output a packet to a port.
Instance Method Summary collapse
-
#==(other) ⇒ Object
rubocop:enable MethodLength.
-
#initialize(user_options) ⇒ SendOutPort
constructor
rubocop:disable MethodLength.
Methods inherited from Pio::OpenFlow::Action
action_header, method_missing, read, #to_binary
Constructor Details
#initialize(user_options) ⇒ SendOutPort
rubocop:disable MethodLength
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pio/open_flow10/send_out_port.rb', line 16 def initialize() = if .respond_to?(:to_i) { port: .to_i } elsif Port16.reserved_port_name?() { port: } else end max_length = [:max_length] if max_length && !max_length.unsigned_16bit? raise(ArgumentError, 'The max_length should be an unsigned 16bit integer.') end super() end |
Instance Method Details
#==(other) ⇒ Object
rubocop:enable MethodLength
33 34 35 36 |
# File 'lib/pio/open_flow10/send_out_port.rb', line 33 def ==(other) return false unless other to_binary == other.to_binary end |