ua_pubsub_manager.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. *
  5. * Copyright (c) 2017-2018 Fraunhofer IOSB (Author: Andreas Ebner)
  6. */
  7. #ifndef UA_PUBSUB_MANAGER_H_
  8. #define UA_PUBSUB_MANAGER_H_
  9. #include <open62541/server_pubsub.h>
  10. #include "ua_pubsub.h"
  11. _UA_BEGIN_DECLS
  12. #ifdef UA_ENABLE_PUBSUB /* conditional compilation */
  13. typedef struct UA_PubSubManager{
  14. //Connections and PublishedDataSets can exist alone (own lifecycle) -> top level components
  15. size_t connectionsSize;
  16. UA_PubSubConnection *connections;
  17. size_t publishedDataSetsSize;
  18. UA_PublishedDataSet *publishedDataSets;
  19. } UA_PubSubManager;
  20. void
  21. UA_PubSubManager_delete(UA_Server *server, UA_PubSubManager *pubSubManager);
  22. void
  23. UA_PubSubManager_generateUniqueNodeId(UA_Server *server, UA_NodeId *nodeId);
  24. UA_UInt32
  25. UA_PubSubConfigurationVersionTimeDifference(void);
  26. /***********************************/
  27. /* PubSub Jobs abstraction */
  28. /***********************************/
  29. UA_StatusCode
  30. UA_PubSubManager_addRepeatedCallback(UA_Server *server, UA_ServerCallback callback,
  31. void *data, UA_Double interval_ms, UA_UInt64 *callbackId);
  32. UA_StatusCode
  33. UA_PubSubManager_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId,
  34. UA_Double interval_ms);
  35. void
  36. UA_PubSubManager_removeRepeatedPubSubCallback(UA_Server *server, UA_UInt64 callbackId);
  37. #endif /* UA_ENABLE_PUBSUB */
  38. _UA_END_DECLS
  39. #endif /* UA_PUBSUB_MANAGER_H_ */