Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into OPCUA-612-meta-refa…
Browse files Browse the repository at this point in the history
…ctor-let-quasar-generate-as-much-as-possible
  • Loading branch information
parasxos committed Aug 22, 2024
2 parents dbb0864 + 90765e4 commit 6d76d7d
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 168 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ jobs:
export SPHINXBUILD=`which sphinx-build`
make epub
cp ./build/epub/Quasar.epub ./_build/${{ env.VERSION_NAME }}
mv ./_build/${{ env.VERSION_NAME }}/Quasar.epub ./_build/${{ env.VERSION_NAME }}/Quasar\ ${{ env.VERSION_NAME }}.epub
cp ./build/epub/quasar.epub ./_build/${{ env.VERSION_NAME }}
mv ./_build/${{ env.VERSION_NAME }}/quasar.epub ./_build/${{ env.VERSION_NAME }}/quasar\ ${{ env.VERSION_NAME }}.epub
make latexpdf
cp ./build/latex/quasar.pdf ./_build/${{ env.VERSION_NAME }}
mv ./_build/${{ env.VERSION_NAME }}/quasar.pdf ./_build/${{ env.VERSION_NAME }}/Quasar\ ${{ env.VERSION_NAME }}.pdf
mv ./_build/${{ env.VERSION_NAME }}/quasar.pdf ./_build/${{ env.VERSION_NAME }}/quasar\ ${{ env.VERSION_NAME }}.pdf
- name: Update server
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# Author: Stefan Schlenker
# Author: Paris Moschovakos <[email protected]>

project(opc_ua)
cmake_minimum_required(VERSION 3.10)
project(opc_ua)
# the line below is added to quasar to keep backwards compatibility for the transition period.
cmake_policy(SET CMP0065 NEW)

Expand Down
4 changes: 2 additions & 2 deletions Documentation/source/AlternativeBackends.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OPC-UA back-ends for quasar
OPC UA back-ends for quasar
===========================

Author: Piotr P. Nikiel
Expand Down Expand Up @@ -47,7 +47,7 @@ quasar developers as one of supported "optional modules".
Activating open62541 is a simple procedure which is best described in the quasar tutorials on YouTube,
see e.g. `<https://www.youtube.com/watch?v=6MsWUQ0OXbY>`__ .

OPC-UA Back-end dependent features: a comparison table
OPC UA Back-end dependent features: a comparison table
------------------------------------------------------

+-----------------+-----------------+-----------------+-----------------+
Expand Down
14 changes: 7 additions & 7 deletions Documentation/source/ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ ChangeLog
Task <br>
<ul>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-1971">OPCUA-1971</a>]
- Expose configentry as OPC-UA property - for scalars </li>
- Expose configentry as OPC UA property - for scalars </li>
</ul>
Improvement <br>
<ul>
Expand Down Expand Up @@ -2510,7 +2510,7 @@ ChangeLog
Task<br>
<ul>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-1128">OPCUA-1128</a>]
- generate device --all doesn't work in SCA OPC-UA</li>
- generate device --all doesn't work in SCA OPC UA</li>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-1144">OPCUA-1144</a>]
- Remove stale boost/foreach includes in Meta</li>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-1147">OPCUA-1147</a>]
Expand Down Expand Up @@ -2885,7 +2885,7 @@ ChangeLog
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-106">OPCUA-106</a>]
- Quasar methods</li>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-579">OPCUA-579</a>]
- Easily selectable OPC-UA backend configuration file
- Easily selectable OPC UA backend configuration file
(ServerConfig.xml)</li>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-668">OPCUA-668</a>]
- Post-merge: missing copyright header in
Expand Down Expand Up @@ -2961,7 +2961,7 @@ ChangeLog
</td>
<td style="vertical-align: top;">Major features:<br>
<ul>
<li>Compatibility with the API of OPC-UA Toolkit 1.3.x,
<li>Compatibility with the API of OPC UA Toolkit 1.3.x,
1.4.x and 1.5.x.<br>
</li>
</ul>
Expand All @@ -2987,7 +2987,7 @@ ChangeLog
Task
<ul>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-588">OPCUA-588</a>]
- Port quasar to OPC-UA Toolkit 1.4.x</li>
- Port quasar to OPC UA Toolkit 1.4.x</li>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-606">OPCUA-606</a>]
- Refresh FAQ of Quasar</li>
</ul>
Expand Down Expand Up @@ -3116,7 +3116,7 @@ ChangeLog
New Feature
<ul>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-489">OPCUA-489</a>]
- Make QUASAR framework version info available to OPC-UA
- Make QUASAR framework version info available to OPC UA
clients from StandardMetaData</li>
</ul>
Task
Expand Down Expand Up @@ -3166,7 +3166,7 @@ ChangeLog
New Feature
<ul>
<li>[<a href="https://its.cern.ch/jira/browse/OPCUA-489">OPCUA-489</a>]
- Make QUASAR framework version info available to OPC-UA
- Make QUASAR framework version info available to OPC UA
clients from StandardMetaData</li>
</ul>
Task
Expand Down
12 changes: 6 additions & 6 deletions Documentation/source/LogIt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Initializing LogIt in the Quasar Server code
- sending commands to some target hardware (e.g. calling some 3rd party
API)
- accepting input (e.g. handling OPC-UA client item writes and method
- accepting input (e.g. handling OPC UA client item writes and method
calls)
- handling hardware disconnection/reconnection events

Expand Down Expand Up @@ -115,7 +115,7 @@ allows for an integrated approach to logging that allows you to
configure the verbosity of logging components both

- initially, via the quasar server XML configuration
- dynamically, via an OPC-UA client
- dynamically, via an OPC UA client

Initial Verbosity: Via Server Config XML
----------------------------------------
Expand Down Expand Up @@ -147,14 +147,14 @@ Runtime Verbosity: Via an OPC_UA client
---------------------------------------

| Per-component verbosity can be read and set at runtime via standard
quasar OPC-UA items (via *StandardMetaData.Log.ComponentLogLevels*).
The screenshot below shows a graphical OPC-UA client (Unified
quasar OPC UA items (via *StandardMetaData.Log.ComponentLogLevels*).
The screenshot below shows a graphical OPC UA client (Unified
Auomtation's uaexpert client) viewing these items. Writing a new
verbosity value, for example, setting component
*ADDRESS_SPACE_UPDATES* verbosity from *WRN* -> *TRC*, would result in
all messages (TRC is the highest verbosity setting) for that component
being delivered to the log.
| |screenshot of OPC-UA client setting log component verbosity|
| |screenshot of OPC UA client setting log component verbosity|
Quasar Framework Maintainers: Dealing with LogIt as a Git Submodule
-------------------------------------------------------------------
Expand Down Expand Up @@ -220,4 +220,4 @@ Then your fellow quasar maintainers update their environments with
git submodule update --init --recursive

.. |screenshot of OPC-UA client setting log component verbosity| image:: images/opc-ua-items-for-logging-verbosity.PNG
.. |screenshot of OPC UA client setting log component verbosity| image:: images/opc-ua-items-for-logging-verbosity.PNG
33 changes: 13 additions & 20 deletions Documentation/source/UserDefinedCommandLineParameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ User Defined Command Line Parameters
Background
----------

An OPC-UA server may be a rather complex process, as such, developers
An OPC UA server may be a rather complex process, as such, developers
may well want to provide implementation specific command line options -
to allows end-users to control aspects of the server's runtime
behaviour, say specifying additional configuration options outside of
Expand Down Expand Up @@ -34,7 +34,7 @@ Adding the command line options

As is often the case in quasar, user specific implementation code is
included in the server by overriding methods. The virtual method to
override is ````
override is

::

Expand All @@ -55,7 +55,7 @@ A Simple Example
----------------

This example shows how to add the 2 command line options listed below
such that a quasar OPC-UA server executable, once built, will parse for
such that a quasar OPC UA server executable, once built, will parse for
these options, complete with end-user facing, option specifc,
documentation:

Expand All @@ -65,7 +65,7 @@ documentation:
- some_string: A named string value

So, we want to be able to start the server process wit a command line
like: ````
like:

::

Expand All @@ -75,50 +75,43 @@ like: ````
In this case add them to class QuasarServer.
| Also add the virtual method override (also to class QuasarServer) Now
the class definition pseudo code looks like...
| ````
::

class QuasarServer : ...etc...
{
...etc...
virtual void appendCustomCommandLineOptions(boost::program_options::options_description& commandLineOptions,
boost::program_options::positional_options_description& positionalOptionsDescription

); ... etc ... bool m_someSwitch; std::string m_someString; }
boost::program_options::positional_options_description& positionalOptionsDescription);
... etc ... bool m_someSwitch; std::string m_someString; }``

Now add the implementation of the method
'appendCustomCommandLineOptions', for example ````
'appendCustomCommandLineOptions', for example

::

void QuasarServer::appendCustomCommandLineOptions(boost::program_options::options_description& commandLineOptions, boost::program_options::positional_options_description& positionalOptionsDescription

) { commandLineOptions.add_options() ("some_switch",
boost::program_options::bool_switch(&m_someSwitch)->default_value(false),
"User documentation of some_switch") ("some_string",
boost::program_options::value(&m_someString)->default_value("anyDefaultValue"),
"User documentation of some_string"); }
void QuasarServer::appendCustomCommandLineOptions(boost::program_options::options_description& commandLineOptions, boost::program_options::positional_options_description& positionalOptionsDescription) {
commandLineOptions.add_options() ("some_switch", boost::program_options::bool_switch(&m_someSwitch)->default_value(false), "User documentation of some_switch") ("some_string", boost::program_options::value(&m_someString)->default_value("anyDefaultValue"), "User documentation of some_string"); }

Now, starting the server process with a command line above will result
in values ````
in values

::

QuasarServer::m_someSwitch = true
QuasarServer::m_someString "hello, world!"

Furthermore, starting the server process with a command line like ````
Furthermore, starting the server process with a command line like

::

./myServerExecutable -help

will print the help documentation described above, at the command line,
for example: ````
for example:

::

...etc...
--some_switch User documentation of some_switch
--some_string arg User documentation of some_string
--some_string arg User documentation of some_string
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ User Defined Runtime Configuration Modification
Background
----------

| A completely static configuration for an OPC-UA server may not always
| A completely static configuration for an OPC UA server may not always
be exactly the desired behaviour; for example - consider a
multi-channel, highly modular, power supply system. For such a system
it may be beneficial to users to provide functionality from the quasar
server such that (with the correct command line options specified of
course) the server actually detects the hardware that is connected and
uses this as the basis for its runtime configuration. This might be an
efficient way to run an OPC-UA server in situations where, say, the
efficient way to run an OPC UA server in situations where, say, the
hardware setup is in flux (maybe an ad-hoc lab configuration) and so
manual modification of a static configuration file to describe the
system is painful. Equally, in a large production set up, the server
Expand Down Expand Up @@ -76,8 +76,7 @@ Key Functions

The start of of the configuration decoration hook is to override method
*overridableConfigure*. The virtual method is defined in class
*BaseQuasarServer*, and should be overridden in class *QuasarServer.
*
*BaseQuasarServer*, and should be overridden in class *QuasarServer*.

::

Expand Down Expand Up @@ -126,8 +125,6 @@ The start of of the configuration decoration hook is to override method

::

::

Example Code
~~~~~~~~~~~~

Expand Down Expand Up @@ -234,13 +231,10 @@ Function decorateConfiguration()
content order data. For some applications (e.g. clear()) we provide
functions in the DecorationUtils, e.g.
.. container::

.. container::
::

Configuration::DecorationUtils::clear(theConfig,
theConfig.ConfiguredClass(),
Configuration::Configuration::ConfiguredClass_id);
Configuration::DecorationUtils::clear(theConfig, theConfig.ConfiguredClass(),
Configuration::Configuration::ConfiguredClass_id);

|
Expand Down Expand Up @@ -283,14 +277,14 @@ called with the correct arguments; namely with the developer's
implementation of ConfigXmlDecoratorFunction as the 3rd argument. As is
often the case in quasar, injecting user specifc code involves
overriding a virtual function. In this case, the virtual function to
override is: ````
override is:

::

bool BaseQuasarServer::overridableConfigure(const std::string& fileName, AddressSpace::ASNodeManager *nm);

A typical developer override of this function would be along the lines
of the following pseudo code ````
of the following pseudo code

::

Expand Down
2 changes: 1 addition & 1 deletion Documentation/source/_init_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Quasar
:hidden:
:caption: Quasar OpcUa Server

Summary of known quasar-based OPC-UA servers <./quasar_OPC_UA_servers>
Summary of known quasar-based OPC UA servers <./quasar_OPC_UA_servers>

23 changes: 17 additions & 6 deletions Documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import subprocess
import datetime

def get_git_commit_hash():
try:
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
except Exception:
return 'N/A'

def get_current_date():
return datetime.datetime.now().strftime("%Y-%m-%d")

# -- Project information -----------------------------------------------------

project = 'Quasar'
copyright = '2022, Paris Moschovakos'
project = 'quasar'
copyright = '2021-2024, Paris Moschovakos'
author = 'Paris Moschovakos'


Expand Down Expand Up @@ -64,7 +75,7 @@
locale_dirs = ['../locales']

html_context = {
"display_github": False,
"last_updated": True,
"commit": True
}
"display_github": False,
"commit": get_git_commit_hash(),
"last_updated": get_current_date(),
}
12 changes: 6 additions & 6 deletions Documentation/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Quasar
quasar
======

| The quick opcua server generation framework.
Expand All @@ -23,10 +23,10 @@ Quasar
Design manual <./DesignManual>
For quasar developers <./forQuasarDevelopers>
LogIt <./LogIt>
Quasar <./quasar>
quasar <./quasar>

Quasar build system <./quasarBuildSystem>
Quasar commands <./quasarCommands>
quasar build system <./quasarBuildSystem>
quasar commands <./quasarCommands>
User defined command line parameters <./UserDefinedCommandLineParameters>
User defined runtime configuration modification <./UserDefinedRuntimeConfigurationModification>
Windows setup <./WindowsSetup>
Expand All @@ -44,7 +44,7 @@ Quasar

.. toctree::
:hidden:
:caption: Quasar OpcUa Server
:caption: quasar OPC UA Servers

Summary of known quasar-based OPC-UA servers <./quasar_OPC_UA_servers>
Summary of known quasar-based OPC UA servers <./quasar_OPC_UA_servers>

Loading

0 comments on commit 6d76d7d

Please sign in to comment.