diff options
Diffstat (limited to 'doc/source/ofproto_base.rst')
-rw-r--r-- | doc/source/ofproto_base.rst | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/source/ofproto_base.rst b/doc/source/ofproto_base.rst new file mode 100644 index 00000000..0a12dea2 --- /dev/null +++ b/doc/source/ofproto_base.rst @@ -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 |