Skip to content

tobiaslocker/open62541pp

Repository files navigation

A wrapper for open62541 in modern C++

This is a wrapper that covers some of open62541's functionality. Currently it is based on the v0.3.0 single-file-distribution.

Building

git submodule update --init --recursive
./scripts/build.sh

Building the example

cd examples/simple-client/
./build.sh

or

cd examples/simple-client/
./run.sh

Examples

#include "client.hpp"

using namespace open62541;

struct EventHandler : public ClientEventHandler {
  void on_state_changed(ClientState state) override {
    // ...
  }

  void on_subscription_inactivity(u_int32_t id) override {
    // ...
  }

  void on_inactivity(ClientState state) override {
    // ...
  }
};

int main() {
  std::string url = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer";
  auto handler = std::make_unique<EventHandler>();
  Client client(std::move(handler));
  client.connect(url);
  auto endpoints = client.get_endpoints(url);
}

About

C++ wrapper for open62541

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy