Skip to content

Commit

Permalink
Merge pull request #9 from oroulet/master
Browse files Browse the repository at this point in the history
add partial support for filters, theoretical event support, more work on subscription interface
  • Loading branch information
arykovanov committed Aug 2, 2014
2 parents e6c23a2 + 347c181 commit 4de3c98
Show file tree
Hide file tree
Showing 32 changed files with 1,575 additions and 740 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ opcuainclude_HEADERS = \
include/opc/ua/connection_listener.h \
include/opc/ua/endpoints.h \
include/opc/ua/errors.h \
include/opc/ua/event.h \
include/opc/ua/node.h \
include/opc/ua/node_management.h \
include/opc/ua/server.h \
Expand Down Expand Up @@ -296,6 +297,7 @@ libopcuacore_la_SOURCES = \
src/core/common/value.cpp \
src/core/common/exception.cpp \
src/core/common/common_errors.cpp \
src/core/event.cpp \
src/core/node.cpp \
src/core/opcua_errors.cpp \
src/core/socket_channel.cpp \
Expand Down
43 changes: 37 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ am_libopcuacore_la_OBJECTS = libopcuacore_la-application.lo \
libopcuacore_la-dynamic_addon_factory.lo \
libopcuacore_la-dynamic_library.lo libopcuacore_la-value.lo \
libopcuacore_la-exception.lo libopcuacore_la-common_errors.lo \
libopcuacore_la-node.lo libopcuacore_la-opcua_errors.lo \
libopcuacore_la-socket_channel.lo
libopcuacore_la-event.lo libopcuacore_la-node.lo \
libopcuacore_la-opcua_errors.lo \
libopcuacore_la-socket_channel.lo \
libopcuacore_la-subscription.lo
libopcuacore_la_OBJECTS = $(am_libopcuacore_la_OBJECTS)
libopcuacore_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
Expand All @@ -175,7 +177,7 @@ am_libopcuaprotocol_la_OBJECTS = \
libopcuaprotocol_la-binary_secure_channel.lo \
libopcuaprotocol_la-input_from_buffer.lo \
libopcuaprotocol_la-monitored_items.lo \
libopcuaprotocol_la-nodeid.lo \
libopcuaprotocol_la-nodeid.lo libopcuaprotocol_la-session.lo \
libopcuaprotocol_la-subscriptions.lo \
libopcuaprotocol_la-string_utils.lo \
libopcuaprotocol_la-types.lo \
Expand Down Expand Up @@ -660,6 +662,7 @@ libopcuaprotocol_la_SOURCES = \
src/protocol/input_from_buffer.cpp \
src/protocol/monitored_items.cpp \
src/protocol/nodeid.cpp \
src/protocol/session.cpp \
src/protocol/subscriptions.cpp \
src/protocol/string_utils.cpp \
src/protocol/types.cpp \
Expand Down Expand Up @@ -698,11 +701,13 @@ opcuainclude_HEADERS = \
include/opc/ua/connection_listener.h \
include/opc/ua/endpoints.h \
include/opc/ua/errors.h \
include/opc/ua/event.h \
include/opc/ua/node.h \
include/opc/ua/node_management.h \
include/opc/ua/server.h \
include/opc/ua/socket_channel.h \
include/opc/ua/subscriptions.h \
include/opc/ua/subscription.h \
include/opc/ua/view.h

commondir = $(opcincludedir)/common
Expand Down Expand Up @@ -741,9 +746,11 @@ libopcuacore_la_SOURCES = \
src/core/common/value.cpp \
src/core/common/exception.cpp \
src/core/common/common_errors.cpp \
src/core/event.cpp \
src/core/node.cpp \
src/core/opcua_errors.cpp \
src/core/socket_channel.cpp
src/core/socket_channel.cpp \
src/core/subscription.cpp

libopcuacore_la_CPPFLAGS = -I$(top_srcdir)/include -I/usr/include/libxml2 $(GCOV_FLAGS)
libopcuacore_la_LIBADD = libopcuaprotocol.la
Expand Down Expand Up @@ -813,13 +820,13 @@ example_client_SOURCES = \

example_client_CPPFLAGS = -I$(top_srcdir)/include -I/usr/include/libxml2
example_client_LDADD = libopcuaclient.la libopcuaprotocol.la libopcuacore.la
example_client_LDFLAGS = -ldl -lpthread -lxml2
example_client_LDFLAGS = -ldl -lpthread -lxml2 -lboost_system
example_server_SOURCES = \
src/examples/example_server.cpp

example_server_CPPFLAGS = -I$(top_srcdir)/include -I/usr/include/libxml2
example_server_LDADD = libopcuaserver.la libopcuaprotocol.la libopcuacore.la
example_server_LDFLAGS = -ldl -lpthread -lxml2
example_server_LDFLAGS = -ldl -lpthread -lxml2 -lboost_system

#############################################################
# Extra configs and sources have to be in the distribution.
Expand Down Expand Up @@ -1077,11 +1084,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-dynamic_addon_factory.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-dynamic_library.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-errors_addon_manager.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-event.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-exception.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-node.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-object_id.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-opcua_errors.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-socket_channel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-subscription.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-thread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuacore_la-value.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-binary_attribute.Plo@am__quote@
Expand All @@ -1098,6 +1107,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-input_from_buffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-monitored_items.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-nodeid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-status_codes.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-string_utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopcuaprotocol_la-subscriptions.Plo@am__quote@
Expand Down Expand Up @@ -1283,6 +1293,13 @@ libopcuacore_la-common_errors.lo: src/core/common/common_errors.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuacore_la-common_errors.lo `test -f 'src/core/common/common_errors.cpp' || echo '$(srcdir)/'`src/core/common/common_errors.cpp

libopcuacore_la-event.lo: src/core/event.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuacore_la-event.lo -MD -MP -MF $(DEPDIR)/libopcuacore_la-event.Tpo -c -o libopcuacore_la-event.lo `test -f 'src/core/event.cpp' || echo '$(srcdir)/'`src/core/event.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuacore_la-event.Tpo $(DEPDIR)/libopcuacore_la-event.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/core/event.cpp' object='libopcuacore_la-event.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuacore_la-event.lo `test -f 'src/core/event.cpp' || echo '$(srcdir)/'`src/core/event.cpp

libopcuacore_la-node.lo: src/core/node.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuacore_la-node.lo -MD -MP -MF $(DEPDIR)/libopcuacore_la-node.Tpo -c -o libopcuacore_la-node.lo `test -f 'src/core/node.cpp' || echo '$(srcdir)/'`src/core/node.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuacore_la-node.Tpo $(DEPDIR)/libopcuacore_la-node.Plo
Expand All @@ -1304,6 +1321,13 @@ libopcuacore_la-socket_channel.lo: src/core/socket_channel.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuacore_la-socket_channel.lo `test -f 'src/core/socket_channel.cpp' || echo '$(srcdir)/'`src/core/socket_channel.cpp

libopcuacore_la-subscription.lo: src/core/subscription.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuacore_la-subscription.lo -MD -MP -MF $(DEPDIR)/libopcuacore_la-subscription.Tpo -c -o libopcuacore_la-subscription.lo `test -f 'src/core/subscription.cpp' || echo '$(srcdir)/'`src/core/subscription.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuacore_la-subscription.Tpo $(DEPDIR)/libopcuacore_la-subscription.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/core/subscription.cpp' object='libopcuacore_la-subscription.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuacore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuacore_la-subscription.lo `test -f 'src/core/subscription.cpp' || echo '$(srcdir)/'`src/core/subscription.cpp

libopcuaprotocol_la-binary_variant.lo: src/protocol/binary_variant.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuaprotocol_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuaprotocol_la-binary_variant.lo -MD -MP -MF $(DEPDIR)/libopcuaprotocol_la-binary_variant.Tpo -c -o libopcuaprotocol_la-binary_variant.lo `test -f 'src/protocol/binary_variant.cpp' || echo '$(srcdir)/'`src/protocol/binary_variant.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuaprotocol_la-binary_variant.Tpo $(DEPDIR)/libopcuaprotocol_la-binary_variant.Plo
Expand Down Expand Up @@ -1402,6 +1426,13 @@ libopcuaprotocol_la-nodeid.lo: src/protocol/nodeid.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuaprotocol_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuaprotocol_la-nodeid.lo `test -f 'src/protocol/nodeid.cpp' || echo '$(srcdir)/'`src/protocol/nodeid.cpp

libopcuaprotocol_la-session.lo: src/protocol/session.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuaprotocol_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuaprotocol_la-session.lo -MD -MP -MF $(DEPDIR)/libopcuaprotocol_la-session.Tpo -c -o libopcuaprotocol_la-session.lo `test -f 'src/protocol/session.cpp' || echo '$(srcdir)/'`src/protocol/session.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuaprotocol_la-session.Tpo $(DEPDIR)/libopcuaprotocol_la-session.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/protocol/session.cpp' object='libopcuaprotocol_la-session.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuaprotocol_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libopcuaprotocol_la-session.lo `test -f 'src/protocol/session.cpp' || echo '$(srcdir)/'`src/protocol/session.cpp

libopcuaprotocol_la-subscriptions.lo: src/protocol/subscriptions.cpp
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopcuaprotocol_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libopcuaprotocol_la-subscriptions.lo -MD -MP -MF $(DEPDIR)/libopcuaprotocol_la-subscriptions.Tpo -c -o libopcuaprotocol_la-subscriptions.lo `test -f 'src/protocol/subscriptions.cpp' || echo '$(srcdir)/'`src/protocol/subscriptions.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libopcuaprotocol_la-subscriptions.Tpo $(DEPDIR)/libopcuaprotocol_la-subscriptions.Plo
Expand Down
47 changes: 47 additions & 0 deletions include/opc/ua/event.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

#pragma once

#include <opc/ua/protocol/nodeid.h>
#include <opc/ua/protocol/types.h>
#include <opc/ua/protocol/variant.h>
#include <opc/ua/protocol/attribute.h>

#include <map>



namespace OpcUa
{
typedef std::map<std::vector<QualifiedName>, Variant> PathMap;
typedef std::map<AttributeID, Variant> AttributeMap;

class Event
{

public:
//Instanciate a new event object
//The optional argument is the type of the event
//If not set BaseEventType is used
//If you want to send custom data, you need custom event type on server
Event(const NodeID& type);
Event();
//Set value of a variable(or object)
//This value will be used when the event is fired
//You can set arbitrary data, but clients will not be able to discover them thus subscribe to them
void SetValue(const std::vector<QualifiedName>& path, Variant value);
void SetValue(AttributeID attribute, Variant value);
void SetValue(const std::string& qualifiedname, Variant value); //helper method for the most common case

//Return value og variable identified by its relative path
//or value of attribute identified by its ID
//returns null variant if no match
Variant GetValue(const std::vector<QualifiedName>& path);
Variant GetValue(AttributeID attribute);
Variant GetValue(const std::string& qualifiedname); //helper method for the most common case

protected:
NodeID Type;
PathMap PathValues;
AttributeMap AttributeValues;
};
}
8 changes: 6 additions & 2 deletions include/opc/ua/protocol/expanded_object_ids.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// @author Alexander Rykovanov 2013
/// @email rykovanov.as@gmail.com
/// @author Olivier Roulet-Dubonnet 2013
/// @brief Well known attributes identifiers.
/// @license GNU LGPL
///
Expand Down Expand Up @@ -30,6 +29,11 @@ namespace OpcUa
DataChangeNotification = 811,
EventNotificationList = 812,
StatusChangeNotification = 813,

DataChangeFilter = 724,
EventFilter = 727,
AggregateFilter = 730

};
}

Expand Down
3 changes: 3 additions & 0 deletions include/opc/ua/protocol/message_identifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ namespace OpcUa
CREATE_MONITORED_ITEMS_REQUEST = 0x2EF, // 751
CREATE_MONITORED_ITEMS_RESPONSE = 0x2F2, // 754

DELETE_MONITORED_ITEMS_REQUEST = 0x30d, // 781
DELETE_MONITORED_ITEMS_RESPONSE = 0x310, // 784

CREATE_SUBSCRIPTION_REQUEST = 0x313, //787
CREATE_SUBSCRIPTION_RESPONSE = 0x316, //790

Expand Down
42 changes: 30 additions & 12 deletions include/opc/ua/protocol/monitored_items.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ namespace OpcUa
struct SimpleAttributeOperand
{
NodeID TypeID;
QualifiedName BrowsePath;
IntegerID AttributeID;
std::vector<QualifiedName> BrowsePath;
AttributeID Attribute;
std::vector<std::string> IndexRange;
};

Expand Down Expand Up @@ -124,27 +124,19 @@ namespace OpcUa
bool SteppedSlopedExtrapolation;
};

/* that one is wrong this paramter if of type extensible
struct MonitoringFilter
{
ExtensionObjectHeader Header;
DataChangeFilter DataChange;
EventFilter Event;
AggregateFilter Aggregate;
};
*/
struct ExtensionObjectMonitoringFilter
{
NodeID typeID;
ExtensionObjectEncoding Encoding;
};


struct MonitoringParameters
{
IntegerID ClientHandle;
Duration SamplingInterval;
ExtensionObjectMonitoringFilter Filter;
MonitoringFilter Filter;
uint32_t QueueSize;
bool DiscardOldest;
};
Expand Down Expand Up @@ -172,14 +164,40 @@ namespace OpcUa
CreateMonitoredItemsRequest();
};


struct DeleteMonitoredItemsParameters
{
IntegerID SubscriptionId;
std::vector<IntegerID> MonitoredItemsIds;
};

struct DeleteMonitoredItemsRequest
{
NodeID TypeID;
RequestHeader Header;
DeleteMonitoredItemsParameters Parameters;

DeleteMonitoredItemsRequest();
};

struct DeleteMonitoredItemsResponse
{
NodeID TypeID;
ResponseHeader Header;
std::vector<StatusCode> Results;

DeleteMonitoredItemsResponse();
};


///////////////////////////////////////////////////////////////////////
struct CreateMonitoredItemsResult
{
OpcUa::StatusCode Status;
uint32_t MonitoredItemID;
Duration RevisedSamplingInterval;
uint32_t RevizedQueueSize;
ExtensionObjectHeader FilterResult;
MonitoringFilter Filter;

CreateMonitoredItemsResult();
};
Expand Down
2 changes: 1 addition & 1 deletion include/opc/ua/protocol/string_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace OpcUa

Guid ToGuid(const std::string& str);
NodeID ToNodeID(const std::string& str, uint32_t defaultNamespace = 0);
QualifiedName ToQualifiedName(const std::string& str, uint16_t default_ns);
QualifiedName ToQualifiedName(const std::string& str, uint16_t default_ns = 0);

inline std::ostream& operator<<(std::ostream& os, const OpcUa::NodeID& nodeid)
{
Expand Down
6 changes: 4 additions & 2 deletions include/opc/ua/protocol/subscriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ namespace OpcUa
NodeID TypeID;
ResponseHeader Header;
std::vector<StatusCode> Results;
DiagnosticInfo Diagnostic;
DiagnosticInfoList Diagnostic;

DeleteSubscriptionResponse();
};

////////////////////////////////////////////////////////
Expand Down Expand Up @@ -140,7 +142,7 @@ namespace OpcUa
struct EventFieldList
{
IntegerID ClientHandle;
//std::vector<BaseDataType> EventFields; FIXME
std::vector<Variant> EventFields;
};

struct EventNotificationList
Expand Down
2 changes: 2 additions & 0 deletions include/opc/ua/protocol/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ namespace OpcUa
{
return NamespaceIndex == name.NamespaceIndex && Name == name.Name;
}

bool operator< (const QualifiedName& name) const;
};

struct RelativePathElement
Expand Down
3 changes: 3 additions & 0 deletions include/opc/ua/server/address_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <opc/ua/view.h>
#include <opc/ua/attributes.h>
#include <opc/ua/event.h>
#include <opc/ua/node_management.h>
#include <opc/ua/subscriptions.h>

Expand All @@ -29,6 +30,8 @@ namespace OpcUa
{
public:
DEFINE_CLASS_POINTERS(AddressSpace);

virtual void TriggerEvent(NodeID node, Event event) = 0;
};

AddressSpace::UniquePtr CreateAddressSpace(bool debug);
Expand Down
Loading

0 comments on commit 4de3c98

Please sign in to comment.