ua_server.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2014 the contributors as stated in the AUTHORS file
  3. *
  4. * This file is part of open62541. open62541 is free software: you can
  5. * redistribute it and/or modify it under the terms of the GNU Lesser General
  6. * Public License, version 3 (as published by the Free Software Foundation) with
  7. * a static linking exception as stated in the LICENSE file provided with
  8. * open62541.
  9. *
  10. * open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
  11. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  13. * details.
  14. */
  15. #ifndef UA_SERVER_H_
  16. #define UA_SERVER_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include "ua_types.h"
  21. #include "ua_types_generated.h"
  22. #include "ua_connection.h"
  23. #include "ua_log.h"
  24. /** @defgroup server Server */
  25. struct UA_SecureChannelManager;
  26. typedef struct UA_SecureChannelManager UA_SecureChannelManager;
  27. struct UA_SessionManager;
  28. typedef struct UA_SessionManager UA_SessionManager;
  29. struct UA_NodeStore;
  30. typedef struct UA_NodeStore UA_NodeStore;
  31. typedef struct UA_Server {
  32. UA_ApplicationDescription description;
  33. UA_SecureChannelManager *secureChannelManager;
  34. UA_SessionManager *sessionManager;
  35. UA_NodeStore *nodestore;
  36. UA_Logger logger;
  37. UA_ByteString serverCertificate;
  38. } UA_Server;
  39. void UA_LIBEXPORT UA_Server_init(UA_Server *server, UA_String *endpointUrl);
  40. UA_Int32 UA_LIBEXPORT UA_Server_deleteMembers(UA_Server *server);
  41. UA_Int32 UA_LIBEXPORT UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, const UA_ByteString *msg);
  42. /* Services for local use */
  43. UA_AddNodesResult UA_Server_addNode(UA_Server *server, UA_Node **node, UA_ExpandedNodeId *parentNodeId,
  44. UA_NodeId *referenceTypeId);
  45. void UA_Server_addReferences(UA_Server *server, const UA_AddReferencesRequest *request,
  46. UA_AddReferencesResponse *response);
  47. #ifdef __cplusplus
  48. } // extern "C"
  49. #endif
  50. #endif /* UA_SERVER_H_ */