ua_pubsub_manager.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include "ua_pubsub.h"
  13. #include "ua_server_pubsub.h"
  14. typedef struct UA_PubSubManager{
  15. //Connections and PublishedDataSets can exist alone (own lifecycle) -> top level components
  16. size_t connectionsSize;
  17. UA_PubSubConnection *connections;
  18. size_t publishedDataSetsSize;
  19. UA_PublishedDataSet *publishedDataSets;
  20. } UA_PubSubManager;
  21. void
  22. UA_PubSubManager_delete(UA_Server *server, UA_PubSubManager *pubSubManager);
  23. void
  24. UA_PubSubManager_generateUniqueNodeId(UA_Server *server, UA_NodeId *nodeId);
  25. UA_UInt32
  26. UA_PubSubConfigurationVersionTimeDifference(void);
  27. /***********************************/
  28. /* PubSub Jobs abstraction */
  29. /***********************************/
  30. UA_StatusCode
  31. UA_PubSubManager_addRepeatedCallback(UA_Server *server, UA_ServerCallback callback,
  32. void *data, UA_UInt32 interval, UA_UInt64 *callbackId);
  33. UA_StatusCode
  34. UA_PubSubManager_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId,
  35. UA_UInt32 interval);
  36. UA_StatusCode
  37. UA_PubSubManager_removeRepeatedPubSubCallback(UA_Server *server, UA_UInt64 callbackId);
  38. #ifdef __cplusplus
  39. } // extern "C"
  40. #endif
  41. #endif /* UA_PUBSUB_MANAGER_H_ */