Sha256: 1f8797c56fa4993e19c1d5d13b426ecb2f655c406a1cd339f6dbdb227c1ab104

Contents?: true

Size: 1.53 KB

Versions: 3

Compression:

Stored size: 1.53 KB

Contents

# encoding: utf-8

require 'pio/echo/format'
require 'pio/echo/message'

module Pio
  # OpenFlow Echo Request and Reply message parser.
  class Echo
    # OpenFlow 1.0 Echo Request message.
    class Request < Message
      # Creates an EchoRequest OpenFlow message. This message can be
      # used to measure the bandwidth of a controller/switch
      # connection as well as to verify its liveness.
      #
      # @overload initialize()
      #   @example
      #     Pio::Echo::Request.new
      #
      # @overload initialize(transaction_id)
      #   @example
      #     Pio::Echo::Request.new(123)
      #   @param [Number] transaction_id
      #     An unsigned 32-bit integer number associated with this
      #     message.
      #
      # @overload initialize(user_options)
      #   @example
      #     Pio::Echo::Request.new(
      #       transaction_id: transaction_id,
      #       user_data: 'Thu Aug 25 13:09:00 +0900 2011'
      #     )
      #   @param [Hash] user_options The options to create a message with.
      #   @option user_options [Number] :transaction_id
      #   @option user_options [Number] :xid An alias to transaction_id.
      #   @option user_options [String] :user_data
      #     The user data field specified as a String may be a message
      #     timestamp to check latency, various lengths to measure
      #     bandwidth or zero-size(nil) to verify liveness between the
      #     switch and controller.
      def initialize(user_options = {})
        super REQUEST, user_options
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pio-0.8.1 lib/pio/echo/request.rb
pio-0.8.0 lib/pio/echo/request.rb
pio-0.7.0 lib/pio/echo/request.rb