document MsgBase
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
71ea304be6
commit
32977c125e
49
doc/source/ofproto_base.rst
Normal file
49
doc/source/ofproto_base.rst
Normal file
@ -0,0 +1,49 @@
|
||||
**************************************************
|
||||
OpenFlow version independent classes and functions
|
||||
**************************************************
|
||||
|
||||
.. py:currentmodule:: ryu.ofproto.ofproto_parser
|
||||
|
||||
Base class for OpenFlow messages
|
||||
--------------------------------
|
||||
|
||||
.. XXX
|
||||
.. the descrption of _TYPE is inlined from ryu/lib/stringify.py.
|
||||
.. this is a work around for a sphinx bug.
|
||||
.. https://bitbucket.org/birkenfeld/sphinx/issue/741/autodoc-inherited-members-wont-work-for
|
||||
|
||||
.. autoclass:: MsgBase
|
||||
:members: to_jsondict, from_jsondict
|
||||
|
||||
.. attribute::
|
||||
_TYPE
|
||||
|
||||
_TYPE class attribute is used to annotate types of attributes.
|
||||
|
||||
This type information is used to find an appropriate conversion for
|
||||
a JSON style dictionary.
|
||||
|
||||
Currently the following types are implemented.
|
||||
|
||||
===== ==========
|
||||
Type Descrption
|
||||
===== ==========
|
||||
ascii US-ASCII
|
||||
utf-8 UTF-8
|
||||
===== ==========
|
||||
|
||||
Example::
|
||||
|
||||
_TYPE = {
|
||||
'ascii': [
|
||||
'hw_addr',
|
||||
],
|
||||
'utf-8': [
|
||||
'name',
|
||||
]
|
||||
}
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
.. autofunction:: ofp_msg_from_jsondict
|
@ -5,5 +5,6 @@ OpenFlow protocol API Reference
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
ofproto_base.rst
|
||||
ofproto_v1_2_ref.rst
|
||||
ofproto_v1_3_ref.rst
|
||||
|
Loading…
Reference in New Issue
Block a user