asneg / opcuastack Goto Github PK
View Code? Open in Web Editor NEWOpen Source OPC UA Application Server and OPC UA Client/Server C++ Libraries
Home Page: https://asneg.github.io/projects/opcuastack
License: Apache License 2.0
Open Source OPC UA Application Server and OPC UA Client/Server C++ Libraries
Home Page: https://asneg.github.io/projects/opcuastack
License: Apache License 2.0
The sdk does not support node management service
If a node in the information model is to be accessed, the current reference to the node must be determined via a request. This is expensive. Therefore, it makes sense to pass an interface for the information model to the application.
The tests can not be compiled with OpenSSL 1.1.0 on Windows:
d:\projects\opcuastack\tst\opcuastackcore\certificate\rsasign_t.cpp(27): error C2027: use of undefined type "evp_pkey_st"
On Linux the erorr is the same.
DBG [7f1291132700] opc ua secure channel recv MessageResponse: Local-Address=<127.0.0.1>, Local-Port=<50164>, Partner-Address=<127.0.0.1>, Partner-Port=<8889>, ChannelId=<125>, ResponseType=<i=464>, RequestId=<1>
/home/huebl/devel/OpcUaStack3/tst/OpcUaStackClient/ValueBasedInterface/VBIAsyncReal_Session_t.cpp(69): fatal error in "VBIAsyncReal_Session_session_connect_disconnect": critical check vbiClientHandlerTest.sessionStateUpdate_.waitForCondition(1000) == true failed
Variables can be stored in a node set. Currently this feature is not supported.
The client sdk does not support user authentication
Write README.rst in English which contains:
Example:
OpcUaDataValue dataValue;
dataValue.statusCode(Success);
dataValue.sourceTimestamp(OpcUaDateTime(boost::posix_time::microsec_clock::universal_time()));
dataValue.serverTimestamp(OpcUaDateTime(boost::posix_time::microsec_clock::universal_time()));
dataValue.variant()->setValue(OpcUaString("Hello, World!"));
The intermediate step via variant function should be hidden from the user.
Determining a node reference in an application is too cumbersome. Most of the code should be hidden from the user.
A NodeSet can be used to define events, data types, variables, and objects. This definition can be used for code generation.
Use> operator instead = operator in version check
The execution of the tests must be checked.
A NodeSet can be used to define events, data types, variables, and objects. This definition can be used for code generation.
The Ctrl c signal on a Linux computer causes the opc ua application server to shutdown. If the signal is issued twice in succession, the shutdown procedure is executed twice in the OPC UA Application Server. This leads to a crash.
There is no error handling in the encoder and decoder functions.
I've generated a test application with OpcUaBuilder and tried to build DEB packet from it by typing:
$ sh build.sh deb
Then I've got this error:
build deb package start
build deb package enable
-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Version info
-- product version: 1.0.0
-- Dependency info
-- opcuastack version: 3.0.1
-- boost version: .
-- openssl version: ..
-- System info
-- host system name: Linux
-- host system processor: x86_64
-- system processor: x86_64
-- system name: Linux
-- host system: Linux-4.15.0-36-generic
CMake Error at CMakeLists.txt:73 (include):
include could not find load file:
//usr/share/cmake/OpcUaStack3/CMakeBoost.txt
CMake Error at CMakeLists.txt:83 (include):
include could not find load file:
//usr/share/cmake/OpcUaStack3/CMakeOpenSSL.txt
CMake Error at CMakeLists.txt:93 (include):
include could not find load file:
//usr/share/cmake/OpcUaStack3/CMakeOpcUaStack.txt
The installation directories and other things are passed to the build script via parameters. If no parameters are transferred, a default value is used for the parameters. This behavior should be extended as follows.
The parameters can also be defined as environment variables.
If no environment variable exists, the default value is used.
If an environment variable exists, the default value is overwritten.
If a parameter is passed to the build script, the default variable and the environment variable are overwritten.
UA Expert sometimes reports about Unexpected SequenceNumber when it subscribed on some variable of the server on Ubuntu:
19:57:37.406 | General | | Error: UaSessionPrivate::publishCallback - KeepAlive returned unexpected SequenceNumber (expected=2, received=1)
19:57:37.406 | General | | Warning: Notifications missing, lastSequenceNumber=1 newSequenceNumber=1
I have the same error with Prosys OPC UA Java SDK on Windows.
OS: Ubuntu 18.04 or Windows 10
Client: UA Expert, Prosys OPC UA Java SDK
Stacks Versions: 3.6.0-dev (test on Ubuntu), 3.3.3 (test on Windows)
The class contains code that does not belong there. Registering and unregistering data types is part of the Klass ExtensionObject.
The code in Release 3.6.0 can't be compelled on Windows with Visual Studio 2017:
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(341): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
d:\projects\opcuastack\src\opcuastackcore\buildintypes\opcuaarray.h(507): error C2679: бинарный "=": не найден операт
ор, принимающий правый операнд типа "std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>" (или прием
лемое преобразование отсутствует) [D:\Projects\OpcUaStack\build_msi_x64_vs15.0_Release\OpcUaStackCore.vcxproj]
Предупреждений: 1542
Ошибок: 7604
PS. Sorry, the log messages are in Russian. You can figure out the error by its codes.
The stack should provides an opportunity to run user applications in Docker container.
An error occured while attempting to create a new opc ua server library using the project builder.
sh build.sh -t local -s ~/.ASNeG
build local start
+ cmake ../src -GEclipse CDT4 - Unix Makefiles
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version info
-- product version: 1.0.0
-- Dependency info
-- opcuastack version: 4.1.0
-- boost version: .
-- openssl version: ..
-- System info
-- host system name: Linux
-- host system processor: x86_64
-- system processor: x86_64
-- system name: Linux
-- host system: Linux-4.15.0-43-generic
CMake Error at CMakeLists.txt:72 (include):
include could not find load file:
/usr/share/cmake/OpcUaStack4/CMakeBoost.txt
CMake Error at CMakeLists.txt:82 (include):
include could not find load file:
/usr/share/cmake/OpcUaStack4/CMakeOpenSSL.txt
CMake Error at CMakeLists.txt:92 (include):
include could not find load file:
/usr/share/cmake/OpcUaStack4/CMakeOpcUaStack.txt
-- Configuring incomplete, errors occurred!
See also "/home/huebl/devel/OpcUaFileServer/build_local_Debug/CMakeFiles/CMakeOutput.log".
+ -DCMAKE_BUILD_TYPE=Debug
build.sh: 92: build.sh: -DCMAKE_BUILD_TYPE=Debug: not found
+ RESULT=127
+ set +x
cmake error
The -s option does not work.
The thread is currently single threaded. This is problematic in several ways.
The processing of slow tasks blocks other tasks
The application uses the same thread as the SDK.
The processor is not used optimally
The OpcUaVariant data type is used to manage various types of data. All data types used must therefore support a set of operators. Currently, these operators are not yet supported by all classes.
The client sdk does not yet support encryption and signature
A NodeSet can be used to define events, data types, variables, and objects. This definition can be used for code generation.
For joint work, the most important guidelines should be documented in a Developer Guide.
For the implementation of simple tasks, the application service interface is partly too complicated. Therefore, w rework should be done. The following parts should be revised.
ServiceTransactionNamespace
ServiceTransactionRegisterForwardNode
ServiceTransactionRegisterForwardMethod
ServiceTransactionRegisterForwardGlobal
ServiceTransactionCreateNodeInstance
ServiceTransactionDelNodeInstance
ServiceTransactionFireEvent
ServiceTransactionBrowsePathToNodeId
Documentation
Description from customer:
We need some help with OPCUAStack. We have made quite a good progress on it now.
We are exposing some data from message broker via OPCUA nodes with basic types(floats,ints etc.). I used same style for implementation as I found in AsnegDemo in TestFolderLib.
So there are some generated on startup xml configuration for example with 10 nodes in some folder. On start up Im registering read/write callbacks with
ServiceTransactionRegisterForwardNode` - result is find, callbacks are called for all 10 nodes.
On next step Im trying to do 'ServiceTransactionGetNodeReference' - preparing 10 nodes ids as in example sendSync return
Success. Then I
m taking NodeReference::SPtr by position from request and casting with 'boost::static_pointer_castOpcUaStackServer::NodeReferenceApplication(...)' to 'BaseNodeClass::WPtr' and saving this pointer in internal map. All checks pass and ok.
Then when message arrive to exact node, I`m trying to update value with locking pointer to shared - and all nodes except first fails(As I see from demo it is == node is deleted.. but nobody touching it, schema is static).
More over this way was working all the time till now, before I changed small things in initialization of not related to OPCUA classes.
Wondering if you have any idea what could be the reason of such thing? Is it threading/timing issue? Is update date way of updating node values that is described into AsnegDemo
? Maybe there is better way?
OpcUAStack tag is 3.3.4
Couple of days ago I found reason of problem. It was caused by invalid condition check during session manager startup. It might be already fixed in your develop branch, but I used 3.3.4
. I attaching patch for it.
Script *build.bat * should have the same options which build.sh has.
The generated classes contain the optional placeholder elements. This leads to invalid code. These elements should be removed.
A NodeSet can be used to define events, data types, variables, and objects. This definition can be used for code generation.
Part of the client testing is disabled. The reason is that these tests require a Reliable OPC UA Server. However, such an OPC UA server is not yet available in the tests.
An OPC UA server must be integrated in the tests.
Derzeit versuche ich mittels Ihres OpcUaStacks eine OPC-Client Funktionalität in mein Projekt einzubauen. Dazu habe ich den OpcUaStack mit Hilfe von Visual Studio 2015 x64 gebaut.
Ich verwendete dafür folgende Versionen der geforderten Bibliotheken:
Boost: 1_58_0 (auch mit VS 2015 in x64 gebaut)
Openssl: 1.0.1u (Verwendung der 64 bit Version)
Cmake: 3.9.2
Die Visual Studio Solution habe ich mit Cmake generiert und der Build-Prozess verlief dann in Visual Studio selber. Nach dem Build habe ich das INSTALL Projekt verwendet, um die OpcUaStack-Bibliothek nach C:\install zu kopieren. Der Build-Prozess verlief einwandfrei.
Anschließend habe ich mir „ASNeGDemo“ heruntergeladen und dieses ebenfalls wie oben beschrieben übersetzt. Zusätzlich habe ich darin example/ValueBasedInterface gebaut, da ich dieses Beispiel als Orientierungshilfe für meine Applikation gewählt habe. Auch hier verlief der Build-Prozess innerhalb von VS 2015 ohne weitere Probleme.
Als ich schließlich versuchte, auf einen OPC Server zu connecten (z.B. Unified Automation Demo Server), wurde folgende Assertion nicht erfüllt.
Assertion failed: applicationCertificate().get() != nullptr, file R:\src\OpcUaStack\src\OpcUaStackCore\SecureChannel\SecureChannelBase.cpp, line 521
Die gleiche Meldung wird ausgegeben, wenn ich den ASNegDemo-Server starte: > OpcUaServer3 CONSOLE C:\install\etc\OpcUaStack\ASNeG-Demo\OpcUaServer.xml
Haben Sie eventuell eine Erklärung dafür?
Was mich beim Bauen irritiert hat, ist folgende Warnung:
C:\local\boost_1_58_0\boost/asio/detail/config.hpp(227): warning C4005: "BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT": Makro-Neudefinition
2> C:\local\boost_1_58_0\boost/asio/detail/config.hpp(213): note: Siehe vorherige Definition von "BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT"
Hat diese Warnung eventuell mit dem Fehler zu tun?
Each data type requires a JSON encoder and a decoder
Close Session should delete the session. This is currently not possible because pending requests (for example, publish requests) are returned to the session. This results in a CORE when the session is deleted.
Solution
Before the session is deleted, all outstanding requests must be captured.
When the application is shutdown (DiscoveryCient), access to the SlotTimerElement results in a CORE.
Script build.bat has a lot of strict definitions and absolute paths. It works only in very specific environment.
A better implementation should figure out the environment variables automatically or allow to pass them as arguments.
In order to prevent compilation errors on Windows, we need to build the stack on Windows automatically.
All standard enum classes are generated by a code generator and have the same structure. The class OpcUaStatusCode should also have this structure.
Use RPM package for installation
The node set stores variable instances in XMl format. These variables can not currently be processed.
The node set stores Type information about data types. This information can not currently be processed,
Use MSI package for installation
The certificates are not yet validated in the OPC UA stack.
A NodeSet can be used to define events, data types, variables, and objects. This definition can be used for code generation.
Use DEB package for installation
Related to #15
New Attributes:
DataTypeDefinition
RolePermissions
UserRolePermissions
AccessRestrictions
AccessLevelEx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.