ChimeraTK-ControlSystemAdapter-OPCUAAdapter  04.00.01
ua_map_types.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) 2016 Chris Iatrou <Chris_Paul.Iatrou@tu-dresden.de>
18  * Copyright (c) 2016 Julian Rahm <Julian.Rahm@tu-dresden.de>
19  * Copyright (c) 2019-2023 Andreas Ebner <Andreas.Ebner@iosb.fraunhofer.de>
20  */
21 
22 #pragma once
23 
24 #include "ua_typeconversion.h"
25 #include <open62541/server.h>
26 
27 #include <iostream>
28 #include <list>
29 
30 using namespace std;
31 
32 namespace ChimeraTK {
38  typedef struct UA_NodeId_pair_t {
39  UA_NodeId sourceNodeId; // Model NodeId
40  UA_NodeId targetNodeId; // Stack NodeId
42  typedef std::list<UA_NodeId_pair*> nodePairList;
43 
50  typedef struct UA_DataSource_Map_Element_t {
51  UA_NodeId typeTemplateId;
52  UA_NodeId concreteNodeId;
53  UA_LocalizedText description; // individual description for every variable
54  UA_DataSource dataSource;
56  typedef std::list<UA_DataSource_Map_Element> UA_DataSource_Map;
57 
58 #define NODE_PAIR_PUSH(_p_listname, _p_srcId, _p_targetId) \
59  do { \
60  UA_NodeId_pair* tmp = new UA_NodeId_pair; \
61  UA_NodeId_copy(&_p_srcId, &tmp->sourceNodeId); \
62  UA_NodeId_copy(&_p_targetId, &tmp->targetNodeId); \
63  _p_listname.push_back(tmp); \
64  } while(0);
65 
75  UA_StatusCode ua_mapInstantiatedNodes(UA_NodeId objectId, UA_NodeId definitionId, void* handle);
76 } // namespace ChimeraTK
ChimeraTK::ua_mapInstantiatedNodes
UA_StatusCode ua_mapInstantiatedNodes(UA_NodeId objectId, UA_NodeId definitionId, void *handle)
Node function and proxy mapping for new nodes.
Definition: ua_map_types.cpp:30
ChimeraTK::UA_DataSource_Map_Element_t::typeTemplateId
UA_NodeId typeTemplateId
Definition: ua_map_types.h:51
ChimeraTK::UA_NodeId_pair_t::sourceNodeId
UA_NodeId sourceNodeId
Definition: ua_map_types.h:39
ChimeraTK::UA_DataSource_Map_Element_t::concreteNodeId
UA_NodeId concreteNodeId
Definition: ua_map_types.h:52
ChimeraTK::UA_DataSource_Map_Element
struct ChimeraTK::UA_DataSource_Map_Element_t UA_DataSource_Map_Element
ChimeraTK::nodePairList
std::list< UA_NodeId_pair * > nodePairList
Definition: ua_map_types.h:42
ChimeraTK::UA_NodeId_pair
struct ChimeraTK::UA_NodeId_pair_t UA_NodeId_pair
ChimeraTK::UA_DataSource_Map
std::list< UA_DataSource_Map_Element > UA_DataSource_Map
Definition: ua_map_types.h:56
ChimeraTK::UA_DataSource_Map_Element_t::description
UA_LocalizedText description
Definition: ua_map_types.h:53
ChimeraTK::UA_NodeId_pair_t::targetNodeId
UA_NodeId targetNodeId
Definition: ua_map_types.h:40
ua_typeconversion.h
ChimeraTK::UA_DataSource_Map_Element_t
For generic callback use, this sturct contains the methode pointer and a NodeId of the model....
Definition: ua_map_types.h:50
ChimeraTK
Definition: csa_additionalvariable.h:28
ChimeraTK::UA_NodeId_pair_t
This struct contains a NodeId generated from the open62541-stack and the NodeId of the model side.
Definition: ua_map_types.h:38
ChimeraTK::UA_DataSource_Map_Element_t::dataSource
UA_DataSource dataSource
Definition: ua_map_types.h:54