Class: Trema::TableStatsReply

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

Constant Summary collapse

FIELDS =
%w(table_id name wildcards max_entries ) +
%w(active_count lookup_count matched_count)

Instance Method Summary collapse

Methods inherited from StatsHelper

#to_s

Constructor Details

#initialize(options = {}) ⇒ TableStatsReply

Information about tables that a switch supports. A switch may choose to maintain a single table that can store both wildcard and exact match flows. Or may use separate tables for each flow type. A user would not explicitly instantiate a Trema::TableStatsReply object but would be created as a result of parsing the OFPT_STATS_REPLY(OFPST_TABLE) message.

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

Examples:

TableStatsReply.new(
  :table_id => 0,
  :name => "classifier",
  :wildcards => 4194303,
  :max_entries => 1048576,
  :active_count => 4,
  :lookup_count => 4,
  :matched_count => 0
)

Parameters:

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

    the options to create this instance with.

Options Hash (options):

  • :table_id (Number)

    a number that uniquely identifies the table.

  • :name (String)

    a meaningful name for the table.

  • :wildcards (Number)

    wildcards that supported by the table.

  • :max_entries (Number)

    the maximum number of flow entries the table can support.

  • :active_count (Number)

    number of active entries.

  • :lookup_count (Number)

    a counter of the number of packets looked up in the table.

  • :matched_count (Number)

    a counter of the matched hit entries.



74
75
76
# File 'ruby/trema/table-stats-reply.rb', line 74

def initialize options
  super FIELDS, options
end