Ver código fonte

Merge branch 'master' into inline_setattribute

Conflicts:
	include/ua_server.h
	include/ua_types.h
	src/server/ua_server_internal.h
Julius Pfrommer 9 anos atrás
pai
commit
811b1c3ab4
4 arquivos alterados com 13 adições e 23 exclusões
  1. 1 1
      README.md
  2. 5 20
      include/ua_server.h
  3. 6 1
      src/server/ua_server_binary.c
  4. 1 1
      src/server/ua_server_internal.h

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
README.md


+ 5 - 20
include/ua_server.h

@@ -541,16 +541,9 @@ UA_StatusCode UA_EXPORT
 UA_Server_getNodeAttribute_method(UA_Server *server, UA_NodeId methodNodeId, UA_MethodCallback *method);
 #endif
 
-#ifndef __cplusplus /* the external nodestore does not work with c++ so far */
-
 /**
- * @ingroup nodestore
- *
- * @defgroup external_nodestore External Nodestore
- *
- * @brief An external application that manages its own data and data model
- *
- * To plug in outside data sources, one can use
+ * An external application that manages its own data and data model. To plug in
+ * outside data sources, one can use
  *
  * - VariableNodes with a data source (functions that are called for read and write access)
  * - An external nodestore that is mapped to specific namespaces
@@ -615,15 +608,7 @@ typedef struct UA_ExternalNodeStore {
 
 #ifdef UA_EXTERNAL_NAMESPACES
 UA_StatusCode UA_EXPORT
-UA_Server_addExternalNamespace(UA_Server *server, UA_UInt16 namespaceIndex,
-                               const UA_String *url, UA_ExternalNodeStore *nodeStore);
-#endif /* UA_EXTERNAL_NAMESPACES*/
-/** @} */
-
-#endif /* external nodestore */
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
+UA_Server_addExternalNamespace(UA_Server *server, UA_UInt16 namespaceIndex, const UA_String *url,
+                               UA_ExternalNodeStore *nodeStore);
+#endif /* __cplusplus */
 #endif /* UA_SERVER_H_ */

+ 6 - 1
src/server/ua_server_binary.c

@@ -404,7 +404,12 @@ static void processCLO(UA_Connection *connection, UA_Server *server, const UA_By
     Service_CloseSecureChannel(server, secureChannelId);
 }
 
-void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, UA_ByteString *msg) {
+/**
+ * process binary message received from socket
+ * dose not modify UA_ByteString you have to free it youself.
+ * use of connection->getSendBuffer() and connection->sent() to answer Message
+ */
+void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, const UA_ByteString *msg) {
     size_t pos = 0;
     UA_TcpMessageHeader tcpMessageHeader;
     do {

+ 1 - 1
src/server/ua_server_internal.h

@@ -86,7 +86,7 @@ typedef UA_StatusCode (*UA_EditNodeCallback)(UA_Server *server, UA_Session*, UA_
 UA_StatusCode UA_Server_editNode(UA_Server *server, UA_Session *session, const UA_NodeId *nodeId,
                                  UA_EditNodeCallback callback, const void *data);
 
-void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, UA_ByteString *msg);
+void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, const UA_ByteString *msg);
 
 UA_StatusCode UA_Server_addDelayedJob(UA_Server *server, UA_Job job);