ua_server_config.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. /* Available endpoints */
  48. UA_Endpoints endpoints;
  49. /* Global Node Lifecycle */
  50. UA_GlobalNodeLifecycle nodeLifecycle;
  51. /* Access Control */
  52. UA_AccessControl accessControl;
  53. /* Limits for SecureChannels */
  54. UA_UInt16 maxSecureChannels;
  55. UA_UInt32 maxSecurityTokenLifetime; /* in ms */
  56. /* Limits for Sessions */
  57. UA_UInt16 maxSessions;
  58. UA_Double maxSessionTimeout; /* in ms */
  59. /* Limits for Subscriptions */
  60. UA_DurationRange publishingIntervalLimits;
  61. UA_UInt32Range lifeTimeCountLimits;
  62. UA_UInt32Range keepAliveCountLimits;
  63. UA_UInt32 maxNotificationsPerPublish;
  64. UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
  65. /* Limits for MonitoredItems */
  66. UA_DurationRange samplingIntervalLimits;
  67. UA_UInt32Range queueSizeLimits; /* Negotiated with the client */
  68. /* Discovery */
  69. #ifdef UA_ENABLE_DISCOVERY
  70. /* Timeout in seconds when to automatically remove a registered server from
  71. * the list, if it doesn't re-register within the given time frame. A value
  72. * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
  73. * bigger than 10 seconds, because cleanup is only triggered approximately
  74. * ervery 10 seconds. The server will still be removed depending on the
  75. * state of the semaphore file. */
  76. UA_UInt32 discoveryCleanupTimeout;
  77. #endif
  78. };
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif /* UA_SERVER_CONFIG_H_ */