Git Product home page Git Product logo

ogamma-sdk's People

Contributors

raviln avatar timosmd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ogamma-sdk's Issues

Monitoring Nodes

Hello,

currently I am reading all of my Nodes (around 40) in a while-loop and appending them to a buffer when read.

But I experienced a decreased sample rate when adding nodes to my reading-loop.
e.g.: 1 Node to read -> Sample rate = 200Hz (adding 200 values to my buffer per second).
4 Nodes to read -> Sample rate = 40Hz

Also I thought about just reading/storing node-values as soon as the value changed.

Looking through your code I think this should be possible, but I couldn't manage to make it run - Could you maybe provide me a short example of how to use the notification on value change?

Thanks in advance!

Endpoints not matching

Hello,

I am currently trying to connect to two different OPC-UA Servers with your SDK and "Hello World" example.

For the first one it works totally fine and I can access and read all nodes.

With the second one I am encountering a connection problem where I receive the wrong endpoint from the server. Connecting to this particular server works fine with UaExpert (it somehow ignores the wrong returned endpoint-url).

This is the Code I am using:

#include <opcua/Connection.h>
#include <iostream>
#include <conio.h>

using namespace std;
using namespace OWA::OpcUa;
int main (int argc, char** argv)
{
  (void)argc;
  (void)argv;

  bool succeeded = false;
  {
        auto connection = Connection::create("opc.tcp://128.130.57.75:4840", true);
        if (connection->connect().get().isGood())
        {

             cout << "Connection established" << endl;

             NodeId nodeId("NS1|String|DISPLAY_CURRENT", 1);
             nodeId.setStringIdentifier("DISPLAY_CURRENT", 1);
      
             for (int i = 0; i < 100; i++) {
                 ReadRequest::Ptr readRequest(new ReadRequest(nodeId));
                 auto readResponse = connection->send(readRequest).get();
                 if (readResponse->isGood() && readResponse->results.size() == 1 && Utils::isGood(readResponse->results[0].statusCode))
                 {
                     cout << "READREQUEST # " << i << endl;
                     // We know that data type of the value is String, therefore convert it to string should succeed:
                     float currentValue = readResponse->results[0].value;
                     DateTime tstamp = readResponse->results[0].sourceTimestamp;
                     //string newValue = (currentValue == value1) ? value2 : value1;
                     cout << "DISPLAY_CURRENT: " << currentValue << endl;
                     const string abc;
                     cout << "TSTAMP: " << tstamp.toString() << endl;

                     succeeded = true;
                 }
             }

         _getch();
        }
  }

  OWA::OpcUa::Utils::closeSdk();
  if (!succeeded)
  {
    std::cout << "Reading value failed!" << std::endl;
    return -1;
  }
  else
  {
    return 0;
  }
}

Console Output:

image

Hope you can support me with this problem.

Thanks in advance!

Timezone of Server-Timestamp

Is there a way to change the timezone in which the server- & source-timestamp is returned from the nodes? The timestamp I receive from the OpcUa-Server differs to the one that is shown in UaExpert by 2 hours.

Thanks in advance!

Multi-chunk messaging is not supported.

MaxChunkCount parameter of OPC UA TCP Hello message is hard coded, not configurable.
As a result, larger messages cannot be sent by server side, causing BadTcpMessageTooLarge error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.