ua_server_config.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. #ifndef UA_SERVER_CONFIG_H_
  5. #define UA_SERVER_CONFIG_H_
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include "ua_server.h"
  10. #include "ua_plugin_log.h"
  11. #include "ua_plugin_network.h"
  12. #include "ua_plugin_access_control.h"
  13. #include "ua_plugin_securitypolicy.h"
  14. #include "ua_plugin_nodestore.h"
  15. /**
  16. * Server Configuration
  17. * ====================
  18. * The configuration structure is passed to the server during initialization. */
  19. typedef struct {
  20. UA_UInt32 min;
  21. UA_UInt32 max;
  22. } UA_UInt32Range;
  23. typedef struct {
  24. UA_Duration min;
  25. UA_Duration max;
  26. } UA_DurationRange;
  27. struct UA_ServerConfig {
  28. UA_UInt16 nThreads; /* only if multithreading is enabled */
  29. UA_Logger logger;
  30. /* Server Description */
  31. UA_BuildInfo buildInfo;
  32. UA_ApplicationDescription applicationDescription;
  33. UA_ByteString serverCertificate;
  34. #ifdef UA_ENABLE_DISCOVERY
  35. UA_String mdnsServerName;
  36. size_t serverCapabilitiesSize;
  37. UA_String *serverCapabilities;
  38. #endif
  39. /* Custom DataTypes */
  40. size_t customDataTypesSize;
  41. UA_DataType *customDataTypes;
  42. /* Nodestore */
  43. UA_Nodestore nodestore;
  44. /* Networking */
  45. size_t networkLayersSize;
  46. UA_ServerNetworkLayer *networkLayers;
  47. UA_String customHostname;
  48. /* Available endpoints */
  49. size_t endpointsSize;
  50. UA_Endpoint *endpoints;
  51. /* Global Node Lifecycle */
  52. UA_GlobalNodeLifecycle nodeLifecycle;
  53. /* Access Control */
  54. UA_AccessControl accessControl;
  55. /* Limits for SecureChannels */
  56. UA_UInt16 maxSecureChannels;
  57. UA_UInt32 maxSecurityTokenLifetime; /* in ms */
  58. /* Limits for Sessions */
  59. UA_UInt16 maxSessions;
  60. UA_Double maxSessionTimeout; /* in ms */
  61. /* Limits for Subscriptions */
  62. UA_DurationRange publishingIntervalLimits;
  63. UA_UInt32Range lifeTimeCountLimits;
  64. UA_UInt32Range keepAliveCountLimits;
  65. UA_UInt32 maxNotificationsPerPublish;
  66. UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
  67. /* Limits for MonitoredItems */
  68. UA_DurationRange samplingIntervalLimits;
  69. UA_UInt32Range queueSizeLimits; /* Negotiated with the client */
  70. /* Discovery */
  71. #ifdef UA_ENABLE_DISCOVERY
  72. /* Timeout in seconds when to automatically remove a registered server from
  73. * the list, if it doesn't re-register within the given time frame. A value
  74. * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
  75. * bigger than 10 seconds, because cleanup is only triggered approximately
  76. * ervery 10 seconds. The server will still be removed depending on the
  77. * state of the semaphore file. */
  78. UA_UInt32 discoveryCleanupTimeout;
  79. #endif
  80. };
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84. #endif /* UA_SERVER_CONFIG_H_ */