ChimeraTK-ControlSystemAdapter-OPCUAAdapter  04.00.01
node_historizing.h
Go to the documentation of this file.
1 /*
2  * This file is part of ChimeraTKs ControlSystem-OPC-UA-Adapter.
3  *
4  * ChimeraTKs ControlSystem-OPC-UA-Adapter is free software: you can
5  * redistribute it and/or modify it under the terms of the Lesser GNU
6  * General Public License as published by the Free Software Foundation,
7  * either version 3 of the License, or (at your option) any later version.
8  *
9  * ChimeraTKs ControlSystem-OPC-UA-Adapter is distributed in the hope
10  * that it will be useful, but WITHOUT ANY WARRANTY; without even the
11  * implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the Lesser GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Foobar. If not, see https://www.gnu.org/licenses/lgpl.html
16  *
17  * Copyright (c) 2023-2024 Fraunhofer IOSB (Author: Florian Düwel)
18  */
19 
20 #pragma once
21 
22 #include "ChimeraTK/ControlSystemAdapter/ControlSystemPVManager.h"
23 #include "csa_additionalvariable.h"
24 #include "csa_processvariable.h"
25 #include "ua_mapped_class.h"
26 #include "xml_file_handler.h"
27 #include <open62541/plugin/historydata/history_data_backend_memory.h>
28 #include <open62541/plugin/historydata/history_data_gathering.h>
29 #include <open62541/plugin/historydata/history_data_gathering_default.h>
30 #include <open62541/plugin/historydata/history_database_default.h>
31 
32 #include <vector>
33 
34 namespace ChimeraTK {
37  UA_NodeId folder_id;
38  };
39 
42  UA_NodeId variable_id;
43  };
44 
46  string name;
47  size_t buffer_length{100};
48  size_t entries_per_response{100};
49  size_t interval{1000};
50  };
51 
52  UA_HistoryDataGathering add_historizing_nodes(vector<UA_NodeId>& historizing_nodes, vector<string>& historizing_setup,
53  UA_Server* mappedServer, UA_ServerConfig* server_config, vector<AdapterHistorySetup> history,
54  vector<AdapterFolderHistorySetup> historyfolders, vector<AdapterPVHistorySetup> historyvariables);
55 
56  void clear_history(UA_HistoryDataGathering gathering, vector<UA_NodeId>& historizing_nodes,
57  vector<string>& historizing_setup, UA_Server* mappedServer, vector<AdapterFolderHistorySetup> historyfolders,
58  vector<AdapterPVHistorySetup> historyvariables, UA_ServerConfig* server_config);
59 
72  vector<UA_NodeId>& historizing_nodes, vector<string>& historizing_setup, UA_ServerConfig* server_config);
73 
74  void remove_nodes_with_incomplete_historizing_setup(vector<UA_NodeId>& historizing_nodes,
75  vector<string>& historizing_setup, UA_ServerConfig* server_config, vector<AdapterHistorySetup> history);
76 } // namespace ChimeraTK
ChimeraTK::AdapterHistorySetup::name
string name
Definition: node_historizing.h:46
ChimeraTK::AdapterFolderHistorySetup
Definition: node_historizing.h:35
ChimeraTK::AdapterPVHistorySetup
Definition: node_historizing.h:40
xml_file_handler.h
ua_mapped_class.h
ChimeraTK::clear_history
void clear_history(UA_HistoryDataGathering gathering, vector< UA_NodeId > &historizing_nodes, vector< string > &historizing_setup, UA_Server *mappedServer, vector< AdapterFolderHistorySetup > historyfolders, vector< AdapterPVHistorySetup > historyvariables, UA_ServerConfig *server_config)
Definition: node_historizing.cpp:218
ChimeraTK::add_historizing_nodes
UA_HistoryDataGathering add_historizing_nodes(vector< UA_NodeId > &historizing_nodes, vector< string > &historizing_setup, UA_Server *mappedServer, UA_ServerConfig *server_config, vector< AdapterHistorySetup > history, vector< AdapterFolderHistorySetup > historyfolders, vector< AdapterPVHistorySetup > historyvariables)
Definition: node_historizing.cpp:173
csa_processvariable.h
ChimeraTK::remove_nodes_with_incomplete_historizing_setup
void remove_nodes_with_incomplete_historizing_setup(vector< UA_NodeId > &historizing_nodes, vector< string > &historizing_setup, UA_ServerConfig *server_config, vector< AdapterHistorySetup > history)
Definition: node_historizing.cpp:141
csa_additionalvariable.h
ChimeraTK::AdapterFolderHistorySetup::folder_id
UA_NodeId folder_id
Definition: node_historizing.h:37
ChimeraTK::AdapterPVHistorySetup::variable_historizing
string variable_historizing
Definition: node_historizing.h:41
ChimeraTK::AdapterHistorySetup::buffer_length
size_t buffer_length
Definition: node_historizing.h:47
ChimeraTK::AdapterFolderHistorySetup::folder_historizing
string folder_historizing
Definition: node_historizing.h:36
ChimeraTK::check_historizing_nodes
void check_historizing_nodes(vector< UA_NodeId > &historizing_nodes, vector< string > &historizing_setup, UA_ServerConfig *server_config)
This assumes both lists have the same size.
Definition: node_historizing.cpp:111
ChimeraTK::AdapterHistorySetup::entries_per_response
size_t entries_per_response
Definition: node_historizing.h:48
ChimeraTK::AdapterPVHistorySetup::variable_id
UA_NodeId variable_id
Definition: node_historizing.h:42
ChimeraTK
Definition: csa_additionalvariable.h:28
ChimeraTK::AdapterHistorySetup
Definition: node_historizing.h:45
ChimeraTK::AdapterHistorySetup::interval
size_t interval
Definition: node_historizing.h:49