Class: Trema::AggregateStatsReply

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

Constant Summary collapse

FIELDS =
%w(packet_count byte_count flow_count)

Instance Method Summary collapse

Methods inherited from StatsHelper

#to_s

Constructor Details

#initialize(options = {}) ⇒ AggregateStatsReply

Aggregate counters for flows. A user would not explicitly instantiate a Trema::AggregateStatsReply object but would be created as a result of parsing the +OFPT_STATS_REPLY(OFPST_AGGREGATE) message.

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

Examples:

AggregateStatsReply.new(
  :packet_count => 10,
  :byte_count => 640,
  :flow_count => 2
)

Parameters:

  • options (Hash) (defaults to: {})

    the options to create this instance with.

Options Hash (options):

  • :packet_count (Number)

    the total number of packets that matched.

  • :byte_count (Number)

    the total number of bytes from packets that matched.

  • :flow_count (Number)

    the total number of flows that matched.



57
58
59
# File 'ruby/trema/aggregate-stats-reply.rb', line 57

def initialize options
  super FIELDS, options
end