Class: Trema::OpenflowError
- Inherits:
-
Object
- Object
- Trema::OpenflowError
- Defined in:
- ruby/trema/openflow-error.c
Instance Method Summary collapse
-
#code ⇒ Number
The reason of the failed type error.
-
#data ⇒ String, Array
Variable length data interpreted based on type and code.
-
#datapath_id ⇒ Number
Message originator identifier.
-
#initialize(options = {}) ⇒ OpenflowError
constructor
The occurence of reported errors/exceptions manifested as an instance - a OpenflowError object.
-
#transaction_id ⇒ Number
The transaction_id of the offended message.
-
#type ⇒ Number
The command or action that failed.
Constructor Details
#initialize(options = {}) ⇒ OpenflowError
The occurence of reported errors/exceptions manifested as an instance - a Trema::OpenflowError object. The user would not explicitly instantiate a Trema::OpenflowError but would be created while parsing the OFPT_ERROR message.
65 66 67 68 69 |
# File 'ruby/trema/openflow-error.c', line 65
static VALUE
openflow_error_init( VALUE self, VALUE options ) {
rb_iv_set( self, "@attribute", options );
return self;
}
|
Instance Method Details
#code ⇒ Number
The reason of the failed type error.
110 111 112 113 |
# File 'ruby/trema/openflow-error.c', line 110 static VALUE openflow_error_code( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "code" ) ) ); } |
#data ⇒ String, Array
Variable length data interpreted based on type and code.
122 123 124 125 |
# File 'ruby/trema/openflow-error.c', line 122 static VALUE openflow_error_data( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "data" ) ) ); } |
#datapath_id ⇒ Number
Message originator identifier.
77 78 79 80 |
# File 'ruby/trema/openflow-error.c', line 77 static VALUE openflow_error_datapath_id( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "datapath_id" ) ) ); } |
#transaction_id ⇒ Number
The transaction_id of the offended message.
88 89 90 91 |
# File 'ruby/trema/openflow-error.c', line 88 static VALUE openflow_error_transaction_id( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "transaction_id" ) ) ); } |
#type ⇒ Number
The command or action that failed.
99 100 101 102 |
# File 'ruby/trema/openflow-error.c', line 99 static VALUE openflow_error_type( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "type" ) ) ); } |