Commit Graph

64 Commits

Author SHA1 Message Date
Julius Pfrommer cf5867a981 feature(test): Set array entries for chunking tests 2020-04-02 00:11:22 +02:00
Julius Pfrommer 287c5ad69b fix(server): Make the BrowseName of Nodes immutable
The BrowseName is tracked in binary trees in other nodes for fast
lookup. We would have to reinsert the node to all references lists
of other nodes pointing here.
2020-03-29 21:27:39 +02:00
Julius Pfrommer cde2a43662 refactor(test): No threading in check_client_async_connect.c 2020-02-29 13:09:46 +01:00
Julius Pfrommer 4d2eebca1c refactor(client): Clean up async connect 2020-02-29 13:09:46 +01:00
Julius Pfrommer d07b8b954d fix(tests): Fix tests with subscriptions disabled 2020-01-26 12:39:37 +01:00
Julius Pfrommer de26fc4575 fix(tests): Fix a timing issue under valgrind in check_client.c 2020-01-25 19:33:26 +01:00
Julius Pfrommer ed2406d3a3 fix(tests): Async fixes for check_client_subscriptions.c 2020-01-19 19:32:52 +01:00
Julius Pfrommer a25bb75393 refactor(core): Move ConnectionConfig into SecureChannel 2020-01-18 21:15:08 +01:00
Julius Pfrommer d332c9d40b refactor(core): Assemble complete chunks in the SecureChannel 2020-01-18 21:15:08 +01:00
Julius Pfrommer fac9b51a69 refactor(core): Decode OPN message at the client/server level
This removes an ugly indirection and unlocks more simplifications later
on.
2020-01-12 03:05:01 +01:00
Jonas Green e923698177 Solved issues related to SecurityToken renewal
* previousSecurityToken structure of UA_SecureChannel was not cleared
after generating the new remote symmetric key. This caused a server
to renew the remote key every time a message chunk was received. If
the client requested a renewal of the secure channel and new nonces
were exchanged, but the client continued to use the "old"
SecurityToken for some more message chunks the server generated a
remote key based on the new nonces when it should have used the key
of the current SecurityToken.
* UA_SecureChannelManager_cleanupTimedOut() changed currently used
SecurityToken to the next one if present. According to Part 4,
chapter 5.5.2 OpenSecureChannel the server shall use the existing
SecurityToken until it expires or the server receives a message
secured with the new SecurityToken. Hence, it shouldn't trigg itself
change the SecurityToken.
* Fixed issues in renew channel test cases of the client
2019-11-20 15:50:16 +01:00
Julius Pfrommer 3dce9f5ed5 refactor(server): Simplify the async operations intenally
The server config is simplified a bit. A single timeout is used for the
request. No changes to the public API otherwise.

Full integration tests for the async operations.
2019-11-10 16:50:18 +01:00
wbitesi 2d5355b7be Async monitored items (#2549)
* Implemented async subscriptions/monitored items

* Extended custom callback to hold UA_Client callback specific data

* Distinguish between user and UA_Client specific callback data
* Memory management for client-specific callback data (deleter)
* Updated current highlevel_async functions to new interface

* Fix: memory issues in async subscriptions/monitored items

clang analyzer memory issues addressed

* Fix codacy errors in async subscription/monitoreditems

* Memory fix: MonitoredItems_CreateData_free(..)

* Memory fix: UA_Client_MonitoredItems_delete_async

Async handler did not copy the request into CustomCallback::clientData

* Fix: portability issues with cppcheck+gcc4.8

* Fix: callback handler for delete_subscription_async was not called

* Added test cases for async subscription functions

* Fix -Werror=c++-compat in async subscription/monitoreditems tests

* Satisfy clang-format for async subscription/monitoreditems implementation

* Rebased to master and applied clang-format again

* remove CustomCallback_new(void)

* Change UA_malloc to UA_calloc when needed

* Remove CustomCallbackDataDeleter and use stack allocation for subscriptions.

Requires the use of a flag to distinguish stack allocated data from
heap allocated data in the subscription/monitored items implementation

* Fix C++-compat warning

* Fix: clang-format for changes

* Fix: uninitialized variable on conditional jump

* Remove all UA_EXPORT occurrences from ua_client_subscriptions

* clang-analyze: fix argument to free() is the address of local variable

clang analyzer cannot infer from
memset(&cc, 0, sizeof(CustomCallback)) that CustomCallback.isAsync is false.
Iadded a __clang_analyzer__ only statement that explicitly sets isAsync to false
using preprocessor macros.

* Bugfix: async monitored items memory leak

* Satisfy clang-analyzer for creation of monitored items
2019-11-06 10:21:20 +01:00
Julius Pfrommer a8a8231ba4 Tests: Various fixes for the unit tests on MinGW 2019-06-06 02:32:09 +02:00
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02:00
Stefan Profanter f19a6a1839 Stack: Correct include for architecture related headers
Fixes #2646
2019-04-18 08:01:45 +02:00
Stefan Profanter 0ee155231d CI: Exclude some specific unit tests which are not supported when compiling with MINIMAL NS0
Fixes #2585
2019-04-04 12:30:18 +00:00
Stefan Profanter 63f3653ff1 Additional header cleanup and consistent name of ns generated files 2019-03-21 20:16:31 +01:00
Julius Pfrommer c9c818868f Move header files to a more unix-like structure
This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
2019-03-21 20:16:31 +01:00
Frank Meerkoetter d42a21a908 Completely cover UA_Client_Subscriptions_modify 2019-03-07 08:13:14 +01:00
Frank Meerkoetter 181f970266 Bring UA_Client_Subscriptions_modify() under coverage. 2019-03-06 15:05:58 +01:00
Peter Rustler 89cf21bea0 historical_update: Add Test which test server and client code. 2019-02-06 00:08:02 +01:00
Julius Pfrommer b4c9fc37eb Client: Initialize client config inside the client structure
Temporarily disable encyrption
2019-01-30 18:45:42 +01:00
Julius Pfrommer acd2f4a6bf ArrayDimension constraints are only upper bounds (fix #2325) 2019-01-11 14:34:13 +01:00
Peter Rustler cf193cf41d Cleanup client historical api to meet ci and pr requirements.
The following commits where squashed in this commit:
* client_historical_data: Bugfix isInverse
* client_historical: Cleanup and refactoring to meet pr comments.
* client_historialdata: Add a test for client historical read raw.
* historical_client: support index range
* historical_client: refactoring and cleanup methods.
* historical: Make the build system configurable and rename server test.
* historical_data: cleanup
* client_historical: Add code for events and modified history
* client_historical: fix memoryleak
* hda_client: Fix client_historical example.
2019-01-08 00:01:05 +01:00
Frank Meerkoetter 5bc2cfce90 Do not dynamically allocate a simple bool
Giving this variable a static life time is much simpler.
2019-01-07 08:01:35 +01:00
Martin Lang 4b9cb3c034 Replace ValueRanks by defines (#2124)
* Replace ValueRanks by defines

* Update tests/client/check_client_highlevel.c
2018-10-20 15:46:30 +02:00
Mark Giraud 3105893407 Add unit test that reproduces #1930 2018-09-19 18:44:14 +02:00
Julius Pfrommer 4d6af8f425 Client: Depreate UA_Client_close in favor of UA_Client_disconnect 2018-08-05 17:18:52 +00:00
Jose Cabral fba3aa57a0 Get rid of some arch-dependant in examples and tests 2018-06-29 08:38:08 +02:00
Stefan Profanter 443283f8e4 Merge remote-tracking branch 'upstream/master' into feature/architectures
# Conflicts:
#	src/server/ua_services_discovery_multicast.c
#	src/ua_util.h
2018-05-23 18:06:54 +02:00
StalderT 047c5e4098 WIP client : timed async service & async highlevel functions with client worker for 0.4 (#1598)
This commit adds asynchronous services to open62541 on client side

* Asynchronous service (highlevel read/write) are available through the API that is defined in
ua_client_highlevel_async.h

* Besides the services, the connection procedure is asynchronous as well.

* A client Application that uses the asynchronous API 
adds requests by calling an asynchronous service (e.g., UA_Client_sendAsyncReadRequest(), UA_Client_sendAsyncBrowseRequest() )
checks for response with UA_Client_run_iterate() repeatedly
and processes the responses with user-defined callbacks
2018-05-15 10:54:15 +02:00
Julius Pfrommer 93fcb96895 Fix client highlevel tests with methodcalls disabled 2018-04-26 16:02:35 +02:00
Julius Pfrommer 3de900fbcd Use methods only when the feature is enabled 2018-04-26 16:02:35 +02:00
Stefan Profanter a0d6e2b166 Further adaption to architecture folder
# Conflicts:
#	plugins/ua_log_socket_error.h
2018-04-16 13:13:00 +02:00
Julius Pfrommer d4f40c6790 Remove functionality deprecated after 0.3 2018-04-11 19:40:46 +02:00
Julius Pfrommer 5975e602b6 simplify publish request queueing 2018-03-16 12:53:23 +01:00
StalderT 1b92ebcb7b try fix sub test 2018-02-18 20:08:03 +01:00
StalderT 39d12d3451 Add callback for subscription inactivity 2018-02-18 13:00:21 +01:00
Julius Pfrommer 746ad7ede8 New Subscriptions and MonitoredItems Client API
Co-authored-by: StalderT <github@netsolux.ch>
2018-02-18 13:00:21 +01:00
StalderT b5dc40efef Add async subscription handling for the client 2018-02-18 13:00:21 +01:00
StalderT 5c3630eab2 fix LifetimeCount and call UA_Subscription_publishCallback if a publi… (#1556)
* fix LifetimeCount and call UA_Subscription_publishCallback if a publishResponse is present
2018-02-06 19:09:25 +01:00
Stefan Profanter 1cfbcd5516 Add unit test for empty GetEndpoints call
Fixes #775
2018-02-05 22:44:11 +01:00
StalderT 65db398dcb add client to dataChangeHandler 2018-02-05 22:41:28 +01:00
StalderT 5508c34f80 fix UA_Client_disconnect/close crash (#1562)
* fix UA_Client_disconnect/close SIGSEGV

* add a unit test
2018-02-01 09:35:22 +01:00
StalderT 6470730f43 fix Client_Reconnect test. Sometimes failed with appveyor. 2018-01-24 13:38:52 +01:00
StalderT de11543f21 fix UA_Client_Subscriptions_addMonitored(Items/Events) definition and add test 2018-01-06 15:59:29 +01:00
StalderT 36ba8b3302 increase coverage (connect_username / endpoints) 2017-12-20 19:00:46 +01:00
StalderT d6ec41d53a add UA_Client_close and the ability to reactivate a session (#1444)
* add UA_Client_close and the ability to reactivate a session

* add some check

* remove double socket close introduce in #1417

* remove double close
2017-12-19 09:56:16 +01:00
StalderT 926724d925 add test for #968 2017-12-06 22:32:53 +01:00