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


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to