ua_pubsub_manager.h 1.7 KB

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