ua_server_config.h 2.7 KB

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