ua_pubsub.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_H_
  8. #define UA_PUBSUB_H_
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include <queue.h>
  13. #include "ua_plugin_pubsub.h"
  14. #include "ua_pubsub_networkmessage.h"
  15. #include "ua_server.h"
  16. #include "ua_server_pubsub.h"
  17. /* The configuration structs (public part of PubSub entities) are defined in include/ua_plugin_pubsub.h */
  18. /**********************************************/
  19. /* PublishedDataSet */
  20. /**********************************************/
  21. typedef struct{
  22. UA_PublishedDataSetConfig config;
  23. UA_DataSetMetaDataType dataSetMetaData;
  24. LIST_HEAD(UA_ListOfPubSubDataSetField, UA_PubSubDataSetField) fields;
  25. UA_NodeId identifier;
  26. UA_UInt16 fieldSize;
  27. UA_UInt16 promotedFieldsCount;
  28. } UA_PublishedDataSet;
  29. UA_StatusCode
  30. UA_PublishedDataSetConfig_copy(const UA_PublishedDataSetConfig *src, UA_PublishedDataSetConfig *dst);
  31. UA_PublishedDataSet *
  32. UA_PublishedDataSet_findPDSbyId(UA_Server *server, UA_NodeId identifier);
  33. void
  34. UA_PublishedDataSet_delete(UA_PublishedDataSet *publishedDataSet);
  35. /**********************************************/
  36. /* Connection */
  37. /**********************************************/
  38. //the connection config (public part of connection) object is defined in include/ua_plugin_pubsub.h
  39. typedef struct{
  40. UA_PubSubConnectionConfig *config;
  41. //internal fields
  42. UA_PubSubChannel *channel;
  43. UA_NodeId identifier;
  44. } UA_PubSubConnection;
  45. UA_StatusCode
  46. UA_PubSubConnectionConfig_copy(const UA_PubSubConnectionConfig *src, UA_PubSubConnectionConfig *dst);
  47. UA_PubSubConnection *
  48. UA_PubSubConnection_findConnectionbyId(UA_Server *server, UA_NodeId connectionIdentifier);
  49. void
  50. UA_PubSubConnectionConfig_deleteMembers(UA_PubSubConnectionConfig *connectionConfig);
  51. void
  52. UA_PubSubConnection_delete(UA_PubSubConnection *connection);
  53. #ifdef __cplusplus
  54. } // extern "C"
  55. #endif
  56. #endif /* UA_PUBSUB_H_ */