On Mon, 28 Jul 2014 17:11:48 +0800
arne_goetje <arne_goe...@accton.com> wrote:

> Hi list,
> 
> the example code in ofproto_v1_3_parser.py to log error messages only logs 
> hex numbers.
> Example:
> 
>         @set_ev_cls(ofp_event.EventOFPErrorMsg,
>                     [HANDSHAKE_DISPATCHER, CONFIG_DISPATCHER, 
> MAIN_DISPATCHER])
>         def error_msg_handler(self, ev):
>             msg = ev.msg
> 
>             self.logger.debug('OFPErrorMsg received: type=0x%02x 
> code=0x%02x '
>                               'message=%s',
>                               msg.type, msg.code, 
> utils.hex_array(msg.data))
> 
> I'd like to decode those hex numbers into human readable form. How to do 
> it? Apparently those types and codes are defined in ofproto_v1_3.py 
> already... how to look them up?

You meant that converting type and code to strings like:

type:'Hello Failed', code:'Incompatible'

?


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to