Class: Trema::QueueStatsReply

Inherits:
StatsHelper show all
Defined in:
ruby/trema/queue-stats-reply.rb

Constant Summary collapse

FIELDS =
%w(port_no queue_id tx_bytes tx_packets tx_errors)

Instance Method Summary collapse

Methods inherited from StatsHelper

#to_s

Constructor Details

#initialize(options = {}) ⇒ QueueStatsReply

Queue statistics for a port. A user would not explicitly instantiate a Trema::QueueStatsReply object but would be created as a result of parsing the OFPT_STATS_REPLY(OFPST_QUEUE) message.

Returns an object that encapsulates the OFPST_STATS_REPLY(OFPST_QUEUE) OpenFlow message.

Examples:

QueueStatsReply.new(
  :port_no => 1,
  :queue_id => 123,
  :tx_bytes => 128
  :tx_packets => 2
  :tx_errors => 0
)

Options Hash (options):

  • :port_no (Number)

    a specific port or all port if OFPT_ALL.

  • :queue_id (Number)

    a specific queue identifier or all queues if OFPQ_ALL.

  • :tx_bytes (Number)

    a counter of transmitted bytes.

  • :tx_packets (Number)

    a counter of transmitted packets.

  • :tx_errors (Number)

    a counter of transmitted errors.



65
66
67
# File 'ruby/trema/queue-stats-reply.rb', line 65

def initialize options
  super FIELDS, options
end