dbpclient OK

This commit is contained in:
2022-11-08 13:49:53 +08:00
commit 53d6c7efe7
13 changed files with 1000 additions and 0 deletions

48
DBPclient/DBPclient.h Normal file
View File

@@ -0,0 +1,48 @@
//
// Created by test on 2022/11/3.
//
#ifndef OPCUA_EXPORTER_DBPCLIENT_H
#define OPCUA_EXPORTER_DBPCLIENT_H
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <iostream>
#include <minwindef.h>
#include "dbpapi_j.h"
#include <array>
#include <chrono>
class DBPclient {
public:
explicit DBPclient(std::string endpoint, std::string username, std::string password);
~DBPclient();
void stop();
void run();
bool connect();
void disconnect();
void readValue(std::vector <std::string> const &node_ids);
private:
std::string dbp_endpoint;
std::string dbp_username;
std::string dbp_password;
DWORD m_dwHandle;
bool running{true};
std::map<std::string, double> dbp_read_value;
};
#endif //OPCUA_EXPORTER_DBPCLIENT_H