Browse Source

Various fixes for doc generation

Stefan Profanter 6 years ago
parent
commit
fb64f4a9bb

+ 1 - 1
CMakeLists.txt

@@ -22,7 +22,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 set(OPEN62541_VER_MAJOR 0)
 set(OPEN62541_VER_MINOR 3)
 set(OPEN62541_VER_PATCH 0)
-set(OPEN62541_VER_LABEL "dev") # Appended to the X.Y.Z version format. For example "-rc1" or an empty string
+set(OPEN62541_VER_LABEL "-rc1") # Appended to the X.Y.Z version format. For example "-rc1" or an empty string
 
 #  If a relative path is specified, it is treated as relative to the $<INSTALL_PREFIX>
 set(LIB_INSTALL_DIR lib CACHE PATH "Installation path of libraries")

+ 6 - 3
doc/CMakeLists.txt

@@ -20,9 +20,10 @@ endfunction()
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_types.h ${DOC_SRC_DIR}/types.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_constants.h ${DOC_SRC_DIR}/constants.rst)
 generate_rst(${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.h ${DOC_SRC_DIR}/types_generated.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server.h ${DOC_SRC_DIR}/server.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server_config.h ${DOC_SRC_DIR}/server_config.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server.h ${DOC_SRC_DIR}/server.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_config.h ${DOC_SRC_DIR}/client_config.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_subscriptions.h ${DOC_SRC_DIR}/client_subscriptions.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client.h ${DOC_SRC_DIR}/client.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_highlevel.h ${DOC_SRC_DIR}/client_highlevel.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_log.h ${DOC_SRC_DIR}/plugin_log.rst)
@@ -45,7 +46,8 @@ add_custom_target(doc_latex ${SPHINX_EXECUTABLE}
   -b latex "${DOC_SRC_DIR}" "${DOC_LATEX_DIR}"
   DEPENDS ${DOC_SRC_DIR}/types.rst ${DOC_SRC_DIR}/constants.rst ${DOC_SRC_DIR}/types_generated.rst
           ${DOC_SRC_DIR}/server.rst ${DOC_SRC_DIR}/server_config.rst
-          ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
+          ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_subscriptions.rst
+          ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
           ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst
           ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_access_control.rst
           ${DOC_SRC_DIR}/nodestore.rst
@@ -73,7 +75,8 @@ add_custom_target(doc ${SPHINX_EXECUTABLE}
   -b html "${DOC_SRC_DIR}" "${DOC_HTML_DIR}"
   DEPENDS ${DOC_SRC_DIR}/types.rst ${DOC_SRC_DIR}/constants.rst ${DOC_SRC_DIR}/types_generated.rst
           ${DOC_SRC_DIR}/server.rst ${DOC_SRC_DIR}/server_config.rst
-          ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
+          ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_subscriptions.rst
+          ${DOC_SRC_DIR}/client_highlevel.rst ${DOC_SRC_DIR}/client_config.rst
           ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst
           ${DOC_SRC_DIR}/services.rst ${DOC_SRC_DIR}/plugin_access_control.rst
           ${DOC_SRC_DIR}/nodestore.rst

+ 1 - 1
doc/conf.py

@@ -82,7 +82,7 @@ language = "en"
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = []
+exclude_patterns = ["client_config.rst", "server_config.rst"]
 
 # The reST default role (used for this markup: `text`) to use for all
 # documents.

File diff suppressed because it is too large
+ 1 - 1
doc/nodeset_compiler.rst


+ 1 - 1
doc/protocol.rst

@@ -99,7 +99,7 @@ consider the example OPC UA binary conversation, recorded and displayed with the
    :figwidth: 100 %
    :alt: OPC UA conversation in Wireshark
 
-       OPC UA conversation displayed in Wireshark
+   OPC UA conversation displayed in Wireshark
 
 The top part of the Wireshark window shows the messages from the conversation in
 order. The green line contains the applied filter. Here, we want to see the OPC

+ 9 - 5
include/ua_client.h

@@ -44,6 +44,9 @@ extern "C" {
  * `UA_Client_Subscriptions_manuallySendPublishRequest`. See also :ref:`here
  * <client-subscriptions>`.
  *
+ *
+ * .. include:: client_config.rst
+ *
  * Client Lifecycle
  * ---------------- */
 
@@ -176,6 +179,7 @@ UA_Client_findServersOnNetwork(UA_Client *client, const char *serverUrl,
  *
  * Services
  * --------
+ *
  * The raw OPC UA services are exposed to the client. But most of them time, it
  * is better to use the convenience functions from ``ua_client_highlevel.h``
  * that wrap the raw services. */
@@ -185,7 +189,7 @@ __UA_Client_Service(UA_Client *client, const void *request,
                     const UA_DataType *requestType, void *response,
                     const UA_DataType *responseType);
 
-/**
+/*
  * Attribute Service Set
  * ^^^^^^^^^^^^^^^^^^^^^ */
 static UA_INLINE UA_ReadResponse
@@ -204,7 +208,7 @@ UA_Client_Service_write(UA_Client *client, const UA_WriteRequest request) {
     return response;
 }
 
-/**
+/*
  * Method Service Set
  * ^^^^^^^^^^^^^^^^^^ */
 #ifdef UA_ENABLE_METHODCALLS
@@ -217,7 +221,7 @@ UA_Client_Service_call(UA_Client *client, const UA_CallRequest request) {
 }
 #endif
 
-/**
+/*
  * NodeManagement Service Set
  * ^^^^^^^^^^^^^^^^^^^^^^^^^^ */
 static UA_INLINE UA_AddNodesResponse
@@ -255,7 +259,7 @@ UA_Client_Service_deleteReferences(UA_Client *client,
     return response;
 }
 
-/**
+/*
  * View Service Set
  * ^^^^^^^^^^^^^^^^ */
 static UA_INLINE UA_BrowseResponse
@@ -305,7 +309,7 @@ UA_Client_Service_unregisterNodes(UA_Client *client,
     return response;
 }
 
-/**
+/*
  * Query Service Set
  * ^^^^^^^^^^^^^^^^^ */
 static UA_INLINE UA_QueryFirstResponse

+ 7 - 8
include/ua_client_config.h

@@ -15,7 +15,7 @@ extern "C" {
 #include "ua_plugin_network.h"
 
 /**
- * .. _client-configuration:
+ * .. _client-config:
  *
  * Client Configuration
  * --------------------
@@ -49,21 +49,21 @@ typedef struct UA_Client UA_Client;
 
 /**
  * Client Lifecycle callback
- * ------------------------- */
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^ */
 
 typedef void (*UA_ClientStateCallback)(UA_Client *client, UA_ClientState clientState);
 
 /**
  * Subscription Inactivity callback
- * ------------------------- */
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
 
 #ifdef UA_ENABLE_SUBSCRIPTIONS
 typedef void (*UA_SubscriptionInactivityCallback)(UA_Client *client, UA_UInt32 subscriptionId, void *subContext);
 #endif
 
 /**
- * Client Configuration
- * -------------------- */
+ * Client Configuration Data
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^ */
 
 typedef struct UA_ClientConfig {
     UA_UInt32 timeout;               /* Sync response timeout in ms */
@@ -91,12 +91,11 @@ typedef struct UA_ClientConfig {
 } UA_ClientConfig;
 
 
-/** Get the client configuration from the configuration plugin. Used by the
+/* Get the client configuration from the configuration plugin. Used by the
  * server when it needs client functionality to register to a discovery server
  * or when the server needs to create a client for other purposes
  *
- * @return The client configuration structure
- **/
+ * @return The client configuration structure */
 UA_ClientConfig UA_EXPORT
 UA_Server_getClientConfig(void);
 

+ 2 - 6
tools/generate_datatypes.py

@@ -512,9 +512,7 @@ printh("extern UA_EXPORT const UA_DataType " + outname.upper() + "[" + outname.u
 
 i = 0
 for t in filtered_types:
-    if i != 0:
-        printh("\n")
-    printh("/**\n * " +  t.name)
+    printh("\n/**\n * " +  t.name)
     printh(" * " + "^" * len(t.name))
     if t.description == "":
         printh(" */")
@@ -528,9 +526,7 @@ for t in filtered_types:
 i = 0
 # Generate alias for opaque types
 for t in filtered_opaque_types:
-    if i != 0:
-        printh("\n")
-    printh("/**\n * " +  t.name)
+    printh("\n/**\n * " +  t.name)
     printh(" * " + "^" * len(t.name))
     if t.description == "":
         printh(" */")