Prechádzať zdrojové kódy

fixing unicode chars in tutorials, toc, to get good pdfs

Stasik0 9 rokov pred
rodič
commit
8721538bbf
4 zmenil súbory, kde vykonal 151 pridanie a 141 odobranie
  1. 107 0
      doc/in_a_nutshell.rst
  2. 7 111
      doc/index.rst
  3. 19 19
      doc/tutorial_client_firstSteps.rst
  4. 18 11
      doc/tutorials.rst

+ 107 - 0
doc/in_a_nutshell.rst

@@ -0,0 +1,107 @@
+OPC UA in a nutshell
+====================
+
+OPC UA, a collection of services
+--------------------------------
+
+In OPC-UA, all communication is based on service calls, each consisting of a request and a response
+message. Be careful to note the difference between services and methods. Services are pre-defined in
+the standard and cannot be changed. But you can use the *Call* service to invoke user-defined
+methods on the server.
+
+For completeness, the following tables contain all services defined in the standard. Do not bother
+with their details yet. We will introduce the different services later in the text. In open62541,
+each service is implemented in a single function. See the \ref services section for details.
+
+**Establishing communication**
+
++-----------------------------+-----------------------------+------------------------------+
+| Discovery Service Set       | SecureChannel Service Set   | Session Service Set          |
++=============================+=============================+==============================+
+| FindServers                 | OpenSecureChannel           | CreateSession                |
++-----------------------------+-----------------------------+------------------------------+
+| GetEndpoints                | CloseSecureChannel          | ActivateSession              |
++-----------------------------+-----------------------------+------------------------------+
+| RegisterServer              | CloseSession                |                              |
++-----------------------------+-----------------------------+------------------------------+
+| Cancel                      |                             |                              |
++-----------------------------+-----------------------------+------------------------------+
+
+**Interaction with the information model**
+
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+| Attribute Service Set       | View Service Set              | Method Service Set           | NodeManagement Service Set   | Query Service Set    |
++=============================+===============================+==============================+==============================+======================+
+| Read                        | Browse                        | Call                         | AddNodes                     | QueryFirst           |
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+| HistoryRead                 | BrowseNext                    |                              | AddReferences                | QueryNext            |
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+| Write                       | TranslateBrowsePathsToNodeids |                              | DeleteNodes                  |                      |
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+| HistoryUpdate               | RegisterNodes                 |                              | DeleteReferences             |                      |
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+|                             | UnregisterNodes               |                              |                              |                      |
++-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
+
+**Notifications**
+
++-----------------------------+-------------------------------+
+| MonitoredItem Service Set   | Subscription Service Set      |
++=============================+===============================+
+| CreateMonitoredItems        | CreateSubscription            |
++-----------------------------+-------------------------------+
+| ModifyMonitoreditems        | ModifySubscription            |
++-----------------------------+-------------------------------+
+| SetMonitoringMode           | SetPublishingMode             |
++-----------------------------+-------------------------------+
+| SetTriggering               | Publish                       |
++-----------------------------+-------------------------------+
+| DeleteMonitoredItems        | Republish                     |
++-----------------------------+-------------------------------+
+|                             | TransferSubscription          |
++-----------------------------+-------------------------------+
+|                             | DeleteSubscription            |
++-----------------------------+-------------------------------+
+
+OPC UA, a web of nodes
+----------------------
+
+The information model in each OPC UA server is a web of interconnected nodes.
+There are eight different types of nodes. Depending on its type, every node
+contains different attributes. Some attributes, such as the *NodeId* (unique
+identifier) and the *BrowseName*, are contained in all node types.
+
++-----------------------+-------------------+
+| ReferenceTypeNode     | MethodNode        |
++-----------------------+-------------------+
+| DataTypeNode          | ObjectTypeNode    |
++-----------------------+-------------------+
+| VariableTypeNode      | ObjectNode        |
++-----------------------+-------------------+
+| VariableNode          | ViewNode          |
++-----------------------+-------------------+
+                                                                                                            
+Nodes are interconnected by directed reference-triples of the form ``(nodeid,
+referencetype, target-nodeid)``. Therefore an OPC UA information model is
+easiest imagined as a *web of nodes*. Reference types can be
+
+- standard- or user-defined and
+- either non-hierarchical (e.g., indicating the type of a variable-node) or
+  hierarchical (e.g., indicating a parent-child relationship).
+
+OPC UA, a protocol
+------------------
+
+The OPC UA protocol (both binary and XML-based) is based on 25 *built-in*
+datatypes. In open62541, these are defined in ua_types.h.
+
+The builtin datatypes are combined to more complex structures. When the structure contains an array,
+then the size of the array is stored in an Int32 value just before the array itself. A size of -1
+indicates an undefined array. Positive sizes (and zero) have the usual semantics.
+
+Most importantly, every service has a request and a response message defined as such a data
+structure. The entire OPC UA protocol revolves around the exchange of these request and response
+messages. Their exact definitions can be looked up here:
+https://opcfoundation.org/UA/schemas/Opc.Ua.Types.bsd.xml. In open62541, we autogenerate the
+C-structs to handle the standard-defined structures automatically. See ua_types_generated.h for
+comparison.

+ 7 - 111
doc/index.rst

@@ -1,14 +1,6 @@
 Welcome to open62541's documentation!
 =====================================
 
-.. toctree::
-   :maxdepth: 3
-   :hidden:
-
-   building
-   datatypes
-   tutorials
-
 `OPC UA <http://en.wikipedia.org/wiki/OPC_Unified_Architecture>`_ (short for OPC
 Unified Architecture) is a protocol for industrial communication and has been
 standardized in the IEC62541. At its core, OPC UA defines a set of services to
@@ -25,111 +17,15 @@ understanding, we go on explaining how these principles are realized in detail.
 Examples are given based on the *open62541* implementation of the
 standard.
 
-OPC UA, a collection of services
---------------------------------
-
-In OPC-UA, all communication is based on service calls, each consisting of a request and a response
-message. Be careful to note the difference between services and methods. Services are pre-defined in
-the standard and cannot be changed. But you can use the *Call* service to invoke user-defined
-methods on the server.
-
-For completeness, the following tables contain all services defined in the standard. Do not bother
-with their details yet. We will introduce the different services later in the text. In open62541,
-each service is implemented in a single function. See the \ref services section for details.
-
-**Establishing communication**
-
-+-----------------------------+-----------------------------+------------------------------+
-| Discovery Service Set       | SecureChannel Service Set   | Session Service Set          |
-+=============================+=============================+==============================+
-| FindServers                 | OpenSecureChannel           | CreateSession                |
-+-----------------------------+-----------------------------+------------------------------+
-| GetEndpoints                | CloseSecureChannel          | ActivateSession              |
-+-----------------------------+-----------------------------+------------------------------+
-| RegisterServer              | CloseSession                |                              |
-+-----------------------------+-----------------------------+------------------------------+
-| Cancel                      |                             |                              |
-+-----------------------------+-----------------------------+------------------------------+
-
-**Interaction with the information model**
-
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-| Attribute Service Set       | View Service Set              | Method Service Set           | NodeManagement Service Set   | Query Service Set    |
-+=============================+===============================+==============================+==============================+======================+
-| Read                        | Browse                        | Call                         | AddNodes                     | QueryFirst           |
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-| HistoryRead                 | BrowseNext                    |                              | AddReferences                | QueryNext            |
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-| Write                       | TranslateBrowsePathsToNodeids |                              | DeleteNodes                  |                      |
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-| HistoryUpdate               | RegisterNodes                 |                              | DeleteReferences             |                      |
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-|                             | UnregisterNodes               |                              |                              |                      |
-+-----------------------------+-------------------------------+------------------------------+------------------------------+----------------------+
-
-**Notifications**
-
-+-----------------------------+-------------------------------+
-| MonitoredItem Service Set   | Subscription Service Set      |
-+=============================+===============================+
-| CreateMonitoredItems        | CreateSubscription            |
-+-----------------------------+-------------------------------+
-| ModifyMonitoreditems        | ModifySubscription            |
-+-----------------------------+-------------------------------+
-| SetMonitoringMode           | SetPublishingMode             |
-+-----------------------------+-------------------------------+
-| SetTriggering               | Publish                       |
-+-----------------------------+-------------------------------+
-| DeleteMonitoredItems        | Republish                     |
-+-----------------------------+-------------------------------+
-|                             | TransferSubscription          |
-+-----------------------------+-------------------------------+
-|                             | DeleteSubscription            |
-+-----------------------------+-------------------------------+
-
-OPC UA, a web of nodes
-----------------------
-
-The information model in each OPC UA server is a web of interconnected nodes.
-There are eight different types of nodes. Depending on its type, every node
-contains different attributes. Some attributes, such as the *NodeId* (unique
-identifier) and the *BrowseName*, are contained in all node types.
-
-+-----------------------+-------------------+
-| ReferenceTypeNode     | MethodNode        |
-+-----------------------+-------------------+
-| DataTypeNode          | ObjectTypeNode    |
-+-----------------------+-------------------+
-| VariableTypeNode      | ObjectNode        |
-+-----------------------+-------------------+
-| VariableNode          | ViewNode          |
-+-----------------------+-------------------+
-                                                                                                            
-Nodes are interconnected by directed reference-triples of the form ``(nodeid,
-referencetype, target-nodeid)``. Therefore an OPC UA information model is
-easiest imagined as a *web of nodes*. Reference types can be
-
-- standard- or user-defined and
-- either non-hierarchical (e.g., indicating the type of a variable-node) or
-  hierarchical (e.g., indicating a parent-child relationship).
-
-OPC UA, a protocol
-------------------
-
-The OPC UA protocol (both binary and XML-based) is based on 25 *built-in*
-datatypes. In open62541, these are defined in ua_types.h.
-
-The builtin datatypes are combined to more complex structures. When the structure contains an array,
-then the size of the array is stored in an Int32 value just before the array itself. A size of -1
-indicates an undefined array. Positive sizes (and zero) have the usual semantics.
+.. toctree::
+   :maxdepth: 3
 
-Most importantly, every service has a request and a response message defined as such a data
-structure. The entire OPC UA protocol revolves around the exchange of these request and response
-messages. Their exact definitions can be looked up here:
-https://opcfoundation.org/UA/schemas/Opc.Ua.Types.bsd.xml. In open62541, we autogenerate the
-C-structs to handle the standard-defined structures automatically. See ua_types_generated.h for
-comparison.
+   in_a_nutshell
+   building
+   tutorials
+   datatypes
 
+   
 Indices and tables
 ==================
 

+ 19 - 19
doc/tutorial_client_firstSteps.rst

@@ -13,25 +13,25 @@ As a recap, your directory structure should now look like this::
   :myApp> ln -s ../open62541/build/*so ./
   :myApp> tree
   .
-  ── include
-  │   ── logger_stdout.h
-  │   ── networklayer_tcp.h
-  │   ── networklayer_udp.h
-  │   ── open62541.h
-  │   ── ua_client.h
-  │   ── ua_config.h
-  │   ── ua_config.h.in
-  │   ── ua_connection.h
-  │   ── ua_log.h
-  │   ── ua_nodeids.h
-  │   ── ua_server.h
-  │   ── ua_statuscodes.h
-  │   ── ua_transport_generated.h
-  │   ── ua_types_generated.h
-  │   ── ua_types.h
-  ── libopen62541.so -> ../../open62541/build/libopen62541.so
-  ── myServer
-  ── myServer.c
+  +── include
+  │   +── logger_stdout.h
+  │   +── networklayer_tcp.h
+  │   +── networklayer_udp.h
+  │   +── open62541.h
+  │   +── ua_client.h
+  │   +── ua_config.h
+  │   +── ua_config.h.in
+  │   +── ua_connection.h
+  │   +── ua_log.h
+  │   +── ua_nodeids.h
+  │   +── ua_server.h
+  │   +── ua_statuscodes.h
+  │   +── ua_transport_generated.h
+  │   +── ua_types_generated.h
+  │   +── ua_types.h
+  +── libopen62541.so -> ../../open62541/build/libopen62541.so
+  +── myServer
+  +── myServer.c
 
 Note that I have linked the library into the folder to spare me the trouble of copying it every time I change/rebuild the stack.
 

+ 18 - 11
doc/tutorials.rst

@@ -1,8 +1,9 @@
 Tutorials
 =========
 
-Tutorial 1: First steps with open62541-server
-------------------------------
+This section contains sructured tutorials
+   
+**Tutorial 1: First steps with open62541-server**
 
 :doc:`tutorial_server_firstSteps`
 
@@ -16,10 +17,9 @@ Contents:
 
 * Compiling built-in server and client examples
 
-Tutorial 2: First steps with open62541-client
-------------------------------
+**Tutorial 2: First steps with open62541-client**
 
-:doc:`tutorial_server_firstSteps`
+:doc:`tutorial_client_firstSteps`
 
 Contents:
 
@@ -33,8 +33,7 @@ Contents:
 
 * Introduction to stings
 
-Tutorial 3: Adding nodes to a server and connecting nodes to user-defined values
-------------------------------
+**Tutorial 3: Adding nodes to a server and connecting nodes to user-defined values**
 
 :doc:`tutorial_server_variables`
 
@@ -48,8 +47,7 @@ Contents:
 
 * Connecting node to a callback function
 
-Tutorial 4: Adding server-side methods
-------------------------------
+**Tutorial 4: Adding server-side methods**
 
 :doc:`tutorial_server_method`
 
@@ -57,7 +55,16 @@ Contents:
 
 * Defining server-side method nodes
 
-Tutorial 5: Nodeset handling
-------------------------------
+**Tutorial 5: Nodeset handling**
 
 :doc:`tutorial_noderelations`
+
+.. toctree::
+   :maxdepth: 2
+   :hidden:
+
+   tutorial_server_firstSteps
+   tutorial_client_firstSteps
+   tutorial_server_variables
+   tutorial_server_method
+   tutorial_noderelations