Sha256: efa2eb65025922f2e476efe206267e9320fc86cc04160bb51968835c52b39b52

Contents?: true

Size: 597 Bytes

Versions: 5

Compression:

Stored size: 597 Bytes

Contents

require 'pio/open_flow/action'
require 'pio/open_flow13/port32'

# Base module.
module Pio
  module OpenFlow13
    # Output to switch port.
    class SendOutPort < OpenFlow::Action
      NO_BUFFER = 0xffff

      action_header action_type: 0, action_length: 16
      port32 :port
      uint16 :max_length, initial_value: NO_BUFFER
      uint48 :padding

      def initialize(port)
        super(port: port)
      end

      def max_length
        case @format.max_length
        when NO_BUFFER
          :no_buffer
        else
          @format.max_length
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pio-0.30.1 lib/pio/open_flow13/send_out_port.rb
pio-0.30.0 lib/pio/open_flow13/send_out_port.rb
pio-0.29.0 lib/pio/open_flow13/send_out_port.rb
pio-0.28.1 lib/pio/open_flow13/send_out_port.rb
pio-0.28.0 lib/pio/open_flow13/send_out_port.rb