ua_pubsub_manager.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. //TODO connection and pds store to linked list
  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_Double interval_ms, UA_UInt64 *callbackId);
  33. UA_StatusCode
  34. UA_PubSubManager_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId,
  35. UA_Double interval_ms);
  36. void
  37. UA_PubSubManager_removeRepeatedPubSubCallback(UA_Server *server, UA_UInt64 callbackId);
  38. #endif /* UA_ENABLE_PUBSUB */
  39. _UA_END_DECLS
  40. #endif /* UA_PUBSUB_MANAGER_H_ */