Files
dbp-exporter/DBPclient/DBPclient.h
2022-11-08 13:49:53 +08:00

49 lines
808 B
C++

//
// 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