Class: Trema::QueueGetConfigReply

Inherits:
Object
  • Object
show all
Defined in:
ruby/trema/queue-get-config-reply.c

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ QueueGetConfigReply

A reply instance of Trema::QueueGetConfigReply constructed when OFPT_QUEUE_GET_CONFIG_REPLY message received.

Returns an object that encapsulates the OFPT_QUEUE_GET_CONFIG_REPLY OpenFlow message.

Examples:

QueueGetConfigReply.new(
  :datapath_id => 0xabc,
  :transaction_id => 1
  :port => 1,
  :queues => [ PacketQueue ]
)

Parameters:

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

    the options to create a message with.

Options Hash (options):

  • :datapath_id (Number)

    a unique name that identifies an OpenVSwitch, the message originator.

  • :transaction_id (Number)

    value copied from OPFT_QUEUE_SET_CONFIG_REQUEST message.

  • :port (Number)

    the port the queue is attached to.

  • :queues (Array)

    an array of PacketQueue objects.



59
60
61
62
63
# File 'ruby/trema/queue-get-config-reply.c', line 59

static VALUE
queue_get_config_reply_init( VALUE self, VALUE options ) {
  rb_iv_set( self, "@attribute", options );
  return self;
}

Instance Method Details

#datapath_idNumber

Message originator identifier.

Returns:

  • (Number)

    the value of datapath_id.



71
72
73
74
# File 'ruby/trema/queue-get-config-reply.c', line 71

static VALUE
queue_get_config_reply_datapath_id( VALUE self ) {
  return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "datapath_id" ) ) );
}

#portNumber

The port the queue is attached to.

Returns:

  • (Number)

    the value of port.



93
94
95
96
# File 'ruby/trema/queue-get-config-reply.c', line 93

static VALUE
queue_get_config_reply_port( VALUE self ) {
  return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "port" ) ) );
}

#queuesArray<PacketQueue>

An array of PacketQueue objects. A packet queue is further classified depending on its properties. Currently only a minimum-rate type queue supported.

Returns:



106
107
108
109
# File 'ruby/trema/queue-get-config-reply.c', line 106

static VALUE
queue_get_config_reply_queues( VALUE self ) {
  return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "queues" ) ) );
}

#transaction_idNumber

Transaction ids, message sequence numbers matching requests to replies.

Returns:

  • (Number)

    the value of transaction id.



82
83
84
85
# File 'ruby/trema/queue-get-config-reply.c', line 82

static VALUE
queue_get_config_reply_transaction_id( VALUE self ) {
  return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "transaction_id" ) ) );
}