-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from oroulet/master
add partial support for filters, theoretical event support, more work on subscription interface
- Loading branch information
Showing
32 changed files
with
1,575 additions
and
740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.