From 7383bc7d9dac813c625d3d3b5f7757f76ffad763 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan <andrei.gherzan@huawei.com> Date: Fri, 23 Apr 2021 14:08:43 +0100 Subject: [PATCH] docs/smart-panel: Introduce high-level connection/interaction diagram This relies on the plantuml plugin/module so it also includes the required extension and to simplify that, we switch to using a `conf.py` file. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> --- docs/Makefile | 6 +-- docs/blueprints/smart-panel.rst | 45 +++++++++++++++++++++- docs/conf.py | 66 +++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 docs/conf.py diff --git a/docs/Makefile b/docs/Makefile index ac87306d..9d7f5321 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,11 +4,7 @@ .PHONY: all all: - sphinx-build -W -C \ - -D html_theme=sphinx_rtd_theme \ - -D project='All Scenario OS Build System and meta-ohos' \ - -D copyright='Huawei Inc' \ - . build + sphinx-build -W . build clean: rm -rf ./build diff --git a/docs/blueprints/smart-panel.rst b/docs/blueprints/smart-panel.rst index f056a70b..e4bf69af 100644 --- a/docs/blueprints/smart-panel.rst +++ b/docs/blueprints/smart-panel.rst @@ -5,7 +5,7 @@ Smart Panel Blueprint ##################### -.. contents:: +.. contents:: :depth: 3 Overview @@ -23,6 +23,49 @@ Nitrogen boards exposing sensors and/or emulating device (e.g. light bulbs). .. image:: assets/smart-home-blueprint-arch.png +.. uml:: + + title + <b>High level connection diagram + end title + + node "Avenger96" #11AAFF { + [Linux] + } + + node "Nitrogen #1" #116699 { + [Zephyr#1] + } + + node "Nitrogen #2" #116699 { + [Zephyr#2] + } + + [LED] #3BB300 + [LCD] #3BB300 + [MotionSensor] #3BB300 + [HumidityTemperature] #3BB300 + [Display] + + [Linux] --> [Display] : HDMI + + [Zephyr#1] --> Linux : BLE + [Zephyr#1] --> LCD : I2C + [Zephyr#1] <-- MotionSensor : I2C + [Zephyr#1] <-- HumidityTemperature : GPIO + + [Zephyr#2] <-- Linux : BLE + [Zephyr#2] --> LED : GPIO + + legend + |= Legend: | + |<back:#11AAFF>Avenger96:96Boards</back>| + |<back:#116699>Nitrogen:96Boards</back>| + |<back:#3BB300>Grove sensors</back>| + endlegend + + [Human] --> [Display] + How to build ************ diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..06c6ed90 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'All Scenarios OS Build System and meta-ohos' +copyright = '2021' +author = 'OSTC' + +version = '0.1.99' +release = version + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinxcontrib.plantuml'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +html_show_sourcelink = False -- GitLab