21 #include <gtest/gtest.h> 22 #include <gmock/gmock.h> 28 using namespace OpcUa;
36 const bool debug =
false;
59 if (ref.TargetNodeId == targetNode && ref.ReferenceTypeId == referenceId)
74 id.Attribute = attribute;
76 std::vector<DataValue> values =
NameSpace->Read(params);
79 if (values.size() != 1)
119 ASSERT_THROW(loader.
Load(ConfigPath(
"invalid_version.xml")), std::exception);
338 ASSERT_TRUE(HasReference(references, ReferenceId::HasHistoricalEventConfiguration, targetNode));
339 ASSERT_TRUE(HasReference(references, ReferenceId::HasSubStateMachine, targetNode));
340 ASSERT_TRUE(HasReference(references, ReferenceId::HasEventHistory, targetNode));
341 ASSERT_TRUE(HasReference(references, ReferenceId::AlwaysGeneratesEvent, targetNode));
342 ASSERT_TRUE(HasReference(references, ReferenceId::HasTrueSubState, targetNode));
343 ASSERT_TRUE(HasReference(references, ReferenceId::HasFalseSubState, targetNode));
345 ASSERT_FALSE(HasReference(references, ReferenceId::Unknown, targetNode));
std::vector< OpcUa::ReadValueId > AttributesToRead
const char HasModellingRule[]
TEST_F(TestInfoTest, Names)
const char HasTypeDefinition[]
std::vector< BrowseDescription > NodesToBrowse
Server::AddressSpace::UniquePtr NameSpace
TypeWithSize< 4 >::UInt UInt32
const char HasModelParent[]
std::vector< T > Browse(const NodeId &node, NodeClass nodeClassMask, Services::SharedPtr services)
bool HasAttribute(const NodeId &object, OpcUa::AttributeId attribute, T value)
const char NonHierarchicalReferences[]
static Server::AddressSpace::SharedPtr NameSpace
void Load(const char *fileName)
const char HasHistoricalConfiguration[]
const char HasDescription[]
bool HasReference(std::vector< ReferenceDescription > refs, ReferenceId referenceId, NodeId targetNode) const
#define ASSERT_THROW(statement, expected_exception)
std::vector< ReferenceDescription > Browse(const NodeId &id) const
const char HasEventSource[]
const char GeneratesEvent[]
#define ASSERT_NO_THROW(statement)
OPC UA Address space part. GNU LGPL.
const char HasCondition[]
const char HierarchicalReferences[]
#define ASSERT_TRUE(condition)
const char HasComponent[]
const char HasOrderedComponent[]
std::string ConfigPath(const char *name)
AddressSpace::UniquePtr CreateAddressSpace(const Common::Logger::SharedPtr &logger)
NodeId NumericNodeId(uint32_t value, uint16_t namespaceIndex=0)
#define EXPECT_EQ(expected, actual)
#define ASSERT_FALSE(condition)