ua_config_standard.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #include "ua_config_standard.h"
  2. #define MANUFACTURER_NAME "open62541.org"
  3. #define PRODUCT_NAME "open62541 OPC UA Server"
  4. #define PRODUCT_URI "urn:unconfigured:open62541"
  5. #define APPLICATION_NAME "open62541-based OPC UA Application"
  6. #define APPLICATION_URI "urn:unconfigured:application"
  7. #define UA_STRING_STATIC(s) {sizeof(s)-1, (UA_Byte*)s}
  8. #define UA_STRING_STATIC_NULL {0, NULL}
  9. UA_UsernamePasswordLogin usernamePasswords[2] = {
  10. { UA_STRING_STATIC("user1"), UA_STRING_STATIC("password") },
  11. { UA_STRING_STATIC("user2"), UA_STRING_STATIC("password1") } };
  12. const UA_ServerConfig UA_ServerConfig_standard = {
  13. .nThreads = 1,
  14. .logger = Logger_Stdout,
  15. .buildInfo = {
  16. .productUri = UA_STRING_STATIC(PRODUCT_URI),
  17. .manufacturerName = UA_STRING_STATIC(MANUFACTURER_NAME),
  18. .productName = UA_STRING_STATIC(PRODUCT_NAME),
  19. .softwareVersion = UA_STRING_STATIC("0"),
  20. .buildNumber = UA_STRING_STATIC("0"),
  21. .buildDate = 0 },
  22. .applicationDescription = {
  23. .applicationUri = UA_STRING_STATIC(APPLICATION_URI),
  24. .productUri = UA_STRING_STATIC(PRODUCT_URI),
  25. .applicationName = { .locale = UA_STRING_STATIC(""),
  26. .text = UA_STRING_STATIC(APPLICATION_NAME) },
  27. .applicationType = UA_APPLICATIONTYPE_SERVER,
  28. .gatewayServerUri = UA_STRING_STATIC_NULL,
  29. .discoveryProfileUri = UA_STRING_STATIC_NULL,
  30. .discoveryUrlsSize = 0,
  31. .discoveryUrls = NULL },
  32. .serverCertificate = UA_STRING_STATIC_NULL,
  33. .networkLayersSize = 0,
  34. .networkLayers = NULL,
  35. .enableAnonymousLogin = true,
  36. .enableUsernamePasswordLogin = true,
  37. .usernamePasswordLogins = usernamePasswords,
  38. .usernamePasswordLoginsSize = 2,
  39. .publishingIntervalLimits = { .min = 100.0, .max = 3600.0 * 1000.0 },
  40. .lifeTimeCountLimits = { .max = 15000, .min = 3 },
  41. .keepAliveCountLimits = { .max = 100, .min = 1 },
  42. .maxNotificationsPerPublish = 1000,
  43. .samplingIntervalLimits = { .min = 50.0, .max = 24.0 * 3600.0 * 1000.0 },
  44. .queueSizeLimits = { .max = 100, .min = 1 }
  45. };
  46. const UA_EXPORT UA_ClientConfig UA_ClientConfig_standard = {
  47. .timeout = 5000,
  48. .secureChannelLifeTime = 600000,
  49. .logger = Logger_Stdout,
  50. .localConnectionConfig = {
  51. .protocolVersion = 0,
  52. .sendBufferSize = 65536,
  53. .recvBufferSize = 65536,
  54. .maxMessageSize = 65536,
  55. .maxChunkCount = 1 },
  56. .connectionFunc = UA_ClientConnectionTCP
  57. };