85 throw (std::runtime_error(
"Server is not started"));
93 std::vector<std::string> uris = namespacearray.
GetValue().
As<std::vector<std::string>>();
94 uint32_t index = uris.size();
96 namespacearray.SetValue(uris);
104 std::vector<std::string> uris = namespacearray.
GetValue().
As<std::vector<std::string>>();;
106 for (uint32_t i = 0; i < uris.size(); ++i)
114 throw (std::runtime_error(
"Error namespace uri does not exists in server"));
146 ServerArray.SetValue(std::vector<std::string>({
Endpoint}));
198 uint8_t notifierval = 0;
212 return std::make_shared<Subscription>(
Registry->GetServer(), params, callback,
Logger);
OpcUa::MessageSecurityMode SecurityMode
void SetEndpoint(const std::string &endpoint)
set endpoint uri on wich server will listen. opc.tcp://localhost:4841/opcua/server opc...
Node GetRootNode() const
helper methods for node you will probably want to access
std::vector< OpcUa::UserTokenPolicy > UserIdentityTokens
static const uint8_t SubscribeToEvents
const char SubscriptionServiceAddonId[]
Common::AddonsManager::SharedPtr Addons
Server::ServicesRegistry::SharedPtr Registry
void SetServerURI(const std::string &uri)
double RequestedPublishingInterval
void EnableEventNotification()
Enable event notification on Server node this is necessary if you want to be able to send custom even...
std::string SecurityPolicyUri
Server::SubscriptionService::SharedPtr SubscriptionService
Node GetNodeFromPath(const std::vector< QualifiedName > &path) const
Get a node using its browsepath.
const char ServicesRegistryAddonId[]
Node GetServerNode() const
void SetAttribute(AttributeId attr, const DataValue &dval) const
Node GetNode(const NodeId &nodeid) const
Get a specific node by nodeid.
EndpointDescription Endpoint
void SetSourceTimestamp(const DateTime &t)
uint32_t RegisterNamespace(std::string uri)
Register your application namespace.
void Start()
Start and Stop server.
std::shared_ptr< logger > get(const std::string &name)
OpcUa::ApplicationDescription Server
std::string TransportProfileUri
#define LOG_INFO(__logger__,...)
void TriggerEvent(Event event)
Trigger and event.
OpcUa::ApplicationType ApplicationType
AddonsManager::UniquePtr CreateAddonsManager(const Common::Logger::SharedPtr &logger)
Get instance of addons core.
void SetProductURI(const std::string &uri)
setup server description
UaServer()
create high level server
OpcUa::MessageSecurityMode SecurityMode
OPC UA Address space part. GNU LGPL.
std::string ApplicationUri
Node GetChild(const std::vector< OpcUa::QualifiedName > &path) const
ServerOperations CreateServerOperations()
Create a server operations object.
OpcUa::LocalizedText ApplicationName
void RegisterCommonAddons(const Parameters ¶ms, Common::AddonsManager &addons)
parameters of server. can be used at embedded.
A Node object represent an OPC-UA node. It is high level object intended for developper who want to e...
NodeId ToNodeId(const std::string &str, uint32_t defaultNamespace=0)
static DateTime Current()
Node GetObjectsNode() const
OpcUa::UserTokenType TokenType
Common::Logger::SharedPtr Logger
uint32_t GetNamespaceIndex(std::string uri)
std::vector< std::string > XmlAddressSpaces
void AddAddressSpace(const std::string &path)
load xml addressspace. This is not implemented yet!!!
std::shared_ptr< logger > stderr_color_mt(const std::string &logger_name)
void SetServerName(const std::string &name)
void CheckStarted() const
Subscription::SharedPtr CreateSubscription(unsigned int period, SubscriptionHandler &callback)
Create a subscription objects.