model_node.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2013-2014 by Alexander Rykovanov *
3  * rykovanov.as@gmail.com *
4  * *
5  * This library is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU Lesser General Public License as *
7  * published by the Free Software Foundation; version 3 of the License. *
8  * *
9  * This library is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU Lesser General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU Lesser General Public License *
15  * along with this library; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18  ******************************************************************************/
19 
20 #include <opc/ua/model.h>
21 
22 namespace OpcUa
23 {
24 namespace Model
25 {
26 Node::Node(NodeId id, Services::SharedPtr services)
27  : Id(id)
28  , OpcUaServices(services)
29 {
30  ReadParameters attrs;
33  std::vector<DataValue> values = services->Attributes()->Read(attrs);
34  DisplayName = values[0].Value.As<LocalizedText>();
35  BrowseName = values[1].Value.As<QualifiedName>();
36 }
37 
38 Node::Node(Services::SharedPtr services)
39  : OpcUaServices(services)
40 {
41 }
42 
44 {
45  return Id;
46 }
47 
49 {
50  return BrowseName;
51 }
52 
54 {
55  return DisplayName;
56 }
57 
58 std::vector<Reference> Node::GetReferencies() const
59 {
60  return std::vector<Reference>();
61 }
62 
63 }
64 }
std::vector< OpcUa::ReadValueId > AttributesToRead
QualifiedName BrowseName
Definition: model.h:57
ReadValueId ToReadValueId(NodeId id, AttributeId attr)
Definition: protocol.h:7
Node(NodeId id, Services::SharedPtr services)
Definition: model_node.cpp:26
OPC UA Address space part. GNU LGPL.
QualifiedName GetBrowseName() const
Definition: model_node.cpp:48
std::vector< Reference > GetReferencies() const
Definition: model_node.cpp:58
LocalizedText DisplayName
Definition: model.h:58
NodeId GetId() const
Definition: model_node.cpp:43
Services::SharedPtr OpcUaServices
Definition: model.h:59
LocalizedText GetDisplayName() const
Definition: model_node.cpp:53


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:06