Signed-off-by: YAMAMOTO Takashi <[email protected]> --- doc/source/ofproto_base.rst | 49 +++++++++++++++++++++++++++++++++++++++++++++ doc/source/ofproto_ref.rst | 1 + 2 files changed, 50 insertions(+) create mode 100644 doc/source/ofproto_base.rst
diff --git a/doc/source/ofproto_base.rst b/doc/source/ofproto_base.rst new file mode 100644 index 0000000..0a12dea --- /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 diff --git a/doc/source/ofproto_ref.rst b/doc/source/ofproto_ref.rst index 216db35..bcec5d6 100644 --- a/doc/source/ofproto_ref.rst +++ b/doc/source/ofproto_ref.rst @@ -5,5 +5,6 @@ OpenFlow protocol API Reference .. toctree:: :maxdepth: 3 + ofproto_base.rst ofproto_v1_2_ref.rst ofproto_v1_3_ref.rst -- 1.8.3.1 ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
