Class: Trema::AggregateStatsRequest
- Inherits:
-
StatsRequest
- Object
- StatsRequest
- Trema::AggregateStatsRequest
- Defined in:
- ruby/trema/stats-request.c
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ AggregateStatsRequest
constructor
A AggregateStatsRequest object instance to request aggregate statistics.
-
#match ⇒ Match
Detailed description of each flow field.
-
#out_port ⇒ Number
Requires flow matching if defined.
-
#table_id ⇒ Number
An index into array of tables.
Methods inherited from StatsRequest
Constructor Details
#initialize(options = {}) ⇒ AggregateStatsRequest
A Trema::AggregateStatsRequest object instance to request aggregate statistics.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'ruby/trema/stats-request.c', line 410
static VALUE
aggregate_stats_request_init( VALUE self, VALUE options ) {
buffer *message;
Data_Get_Struct( self, buffer, message );
subclass_stats_request_init( self, options );
( ( struct ofp_header * ) ( message->data ) )->xid = htonl( get_stats_request_num2uint( self, "@transaction_id" ) );
struct ofp_stats_request *stats_request;
stats_request = ( struct ofp_stats_request * ) message->data;
struct ofp_aggregate_stats_request *aggregate_stats_request;
aggregate_stats_request = ( struct ofp_aggregate_stats_request * ) stats_request->body;
stats_request->flags = htons ( get_stats_request_num2uint16( self, "@flags" ) );
const struct ofp_match *match;
Data_Get_Struct( rb_iv_get( self, "@match" ), struct ofp_match, match );
hton_match( &aggregate_stats_request->match, match );
aggregate_stats_request->table_id = get_stats_request_table_id( self );
aggregate_stats_request->out_port = htons( get_stats_request_num2uint16( self, "@out_port" ) );
return self;
}
|
Instance Method Details
#match ⇒ Match
Detailed description of each flow field.
204 205 206 207 |
# File 'ruby/trema/stats-request.c', line 204 static VALUE stats_match( VALUE self ) { return rb_iv_get( self, "@match" ); } |
#out_port ⇒ Number
Requires flow matching if defined.
226 227 228 229 |
# File 'ruby/trema/stats-request.c', line 226 static VALUE stats_out_port( VALUE self ) { return rb_iv_get( self, "@out_port" ); } |
#table_id ⇒ Number
An index into array of tables. 0xff for all tables.
215 216 217 218 |
# File 'ruby/trema/stats-request.c', line 215 static VALUE stats_table_id( VALUE self ) { return rb_iv_get( self, "@table_id" ); } |