The getting started lessons provide sample code for most common use cases.
The following lists give an overview on the learning targets covered by each lesson.
Lesson 1: Connect and Read
Lesson 2: Create DataMonitoredItem
Lesson 3: Browse, Read Configuration, and Write Values
- Browse for nodes in the address space using UaSession::browse()
- Receive browse results in multiple portions using UaSession::browseNext()
- add a configuration object that provides connection parameters and NodeIds instead of using hard-coded configuration values
- read namespace table after connect to set up namespaceindex for nodeIds from configuration object
- write the value attribute of variables using UaSession::write()
- enhance read method to use NodeIds from configuration object
Lesson 4: Discovery and Secure Connection
Lesson 5: Register Nodes and Reconnection Scenarios
- call registerNodes to get optimised NodeIds and write values using the optimised NodeIds
- read the list of items to monitor from configuration instead of using hard coded NodeIds
- enhance subscription to automatically handle reconnection scenarios
- show how to automatically update the registered NodeIds when a new session was created
Lesson 6: Create EventMonitoredItem
- create a subscription with an event monitored item
- receive event notifications via UaSubscriptionCallback::newEvents()
- set an event filter for an event monitored item
- call methods to trigger events on demoserver