13 #include <opc/ua/client/remote_server.h> 14 #include <opc/ua/object_ids.h> 18 using namespace OpcUa;
26 Query.Description.NodeToBrowse.Encoding =
EV_TWO_BYTE;
27 Query.Description.NodeToBrowse.TwoByteData.Identifier =
static_cast<uint8_t
>(
ObjectId::RootFolder);
29 Query.Description.ReferenceTypeId.Encoding =
EV_TWO_BYTE;
31 Query.Description.IncludeSubtypes =
true;
34 Query.MaxReferenciesCount = 1;
47 Server->CreateSession(session);
55 Service = std::unique_ptr<ViewServices>();
75 using namespace OpcUa;
78 const std::vector<ReferenceDescription> refs = Service->Browse(Query);
84 using namespace OpcUa;
87 Service->Browse(Query);
88 const std::vector<ReferenceDescription> refs = Service->BrowseNext();
94 using namespace OpcUa;
97 Service->Browse(Query);
98 std::vector<ReferenceDescription> browsedRefs;
103 const std::vector<ReferenceDescription> refs = Service->BrowseNext();
110 browsedRefs.insert(browsedRefs.end(), refs.begin(), refs.end());
ApplicationDescription ClientDescription
std::unique_ptr< Services > Server
std::vector< T > Browse(const NodeId &node, NodeClass nodeClassMask, Services::SharedPtr services)
#define EXPECT_TRUE(condition)
std::shared_ptr< ViewServices > Service
OPC UA Address space part. GNU LGPL.
#define ASSERT_TRUE(condition)
#define ASSERT_EQ(val1, val2)
#define EXPECT_EQ(expected, actual)
EndpointDescription GetEndpoint(OpcUa::Binary::IOStream &stream)
std::unique_ptr< RemoteConnection > Connect(const std::string &host, unsigned port, const Common::Logger::SharedPtr &logger)