lib/pio/echo/reply.rb in pio-0.8.1 vs lib/pio/echo/reply.rb in pio-0.8.2
- old
+ new
@@ -1,15 +1,19 @@
-# encoding: utf-8
-
+require 'forwardable'
require 'pio/echo/format'
require 'pio/echo/message'
+require 'pio/open_flow'
module Pio
- # OpenFlow Echo Request and Reply message parser.
class Echo
- # OpenFlow 1.0 Echo Reply message.
+ # OpenFlow 1.0 Echo Reply message generator.
class Reply < Message
+ # OpenFlow 1.0 Echo reply message generator.
+ class Format < Pio::Echo::Format
+ default_parameters message_type_value: Pio::OpenFlow::Type::ECHO_REPLY
+ end
+
# Creates an EchoReply 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()
@@ -35,11 +39,8 @@
# @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 REPLY, user_options
- end
end
end
end