ua_config_standard.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 = { .max = 10000, .min = 0, .current = 0 },
  40. .lifeTimeCountLimits = { .max = 15000, .min = 0, .current = 0 },
  41. .keepAliveCountLimits = { .max = 100, .min = 0, .current = 0 },
  42. .notificationsPerPublishLimits = { .max = 1000, .min = 1, .current = 0 },
  43. .samplingIntervalLimits = { .max = 1000, .min = 5, .current = 0 },
  44. .queueSizeLimits = { .max = 100, .min = 0, .current = 0 }
  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 };