ua_server_config.h 3.5 KB

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