Parcourir la source

Undid everything methodCall related and ported the changes to a new branch.

ichrispa il y a 9 ans
Parent
commit
3d3e99a50b

+ 0 - 9
CMakeLists.txt

@@ -179,15 +179,6 @@ endif()
 ## logging
 set(UA_LOGLEVEL 300 CACHE STRING "Level at which logs shall be reported")
 
-# Enable Methodcall service
-option(ENABLE_METHODCALLS "Enable CallMethod/MethodCall service set" OFF)
-if(ENABLE_METHODCALLS)
-    add_definitions(-DENABLE_METHODCALLS)
-    list(APPEND lib_sources ${PROJECT_SOURCE_DIR}/src/server/ua_services_call.c)
-    list(APPEND lib_sources ${PROJECT_SOURCE_DIR}/src/server/ua_methodcall_manager.c)
-    list(APPEND internal_headers ${PROJECT_SOURCE_DIR}/src/server/ua_methodcall_manager.h)
-endif()
-
 ## multithreading
 option(ENABLE_MULTITHREADING "Enable multithreading (experimental)" OFF)
 if(ENABLE_MULTITHREADING)

+ 0 - 7
src/server/ua_server.c

@@ -473,13 +473,6 @@ UA_Server * UA_Server_new(UA_ServerConfig config) {
 #define HUNDRED_NANOSEC_PER_SEC (HUNDRED_NANOSEC_PER_USEC * 1000000LL)
     server->buildDate = (mktime(&ct) + UNIX_EPOCH_BIAS_SEC) * HUNDRED_NANOSEC_PER_SEC;
 
-#ifdef ENABLE_METHODCALLS
-    /**************************/
-    /* Method Hook Management */
-    /**************************/
-    server->methodCallManager = UA_MethodCallManager_new();
-#endif
-
     /**************/
     /* References */
     /**************/

+ 0 - 9
src/server/ua_server_binary.c

@@ -8,10 +8,6 @@
 #include "ua_session_manager.h"
 #include "ua_nodeids.h"
 
-#ifdef ENABLE_METHODCALLS
-#include "ua_methodcall_manager.h"
-#endif
-
 /** Max size of messages that are allocated on the stack */
 #define MAX_STACK_MESSAGE 65536
 
@@ -325,11 +321,6 @@ static void processMSG(UA_Connection *connection, UA_Server *server, const UA_By
     case UA_NS0ID_DELETEMONITOREDITEMSREQUEST:
         INVOKE_SERVICE(DeleteMonitoredItems, UA_TYPES_DELETEMONITOREDITEMSRESPONSE);
         break;
-#endif
-#ifdef ENABLE_METHODCALLS
-    case UA_NS0ID_CALLREQUEST:
-        INVOKE_SERVICE(Call, UA_TYPES_CALLRESPONSE);
-        break;
 #endif
     default: {
         if(requestType.namespaceIndex == 0 && requestType.identifier.numeric==787)

+ 0 - 9
src/server/ua_server_internal.h

@@ -11,10 +11,6 @@
 #include "ua_subscription_manager.h"
 #endif
 
-#ifdef ENABLE_METHODCALLS
-#include "ua_methodcall_manager.h"
-#endif
-
 #define PRODUCT_URI "http://open62541.org"
 #define ANONYMOUS_POLICY "open62541-anonymous-policy"
 #define USERNAME_POLICY "open62541-username-policy"
@@ -59,11 +55,6 @@ struct UA_Server {
     /* Jobs with a repetition interval */
     LIST_HEAD(RepeatedJobsList, RepeatedJobs) repeatedJobs;
 
-    /* Method hooks  */
-#ifdef ENABLE_METHODCALLS
-    UA_MethodCall_Manager *methodCallManager;
-#endif
-
 #ifdef UA_MULTITHREADING
     /* Dispatch queue head for the worker threads (the tail should not be in the same cache line) */
 	struct cds_wfcq_head dispatchQueue_head;

+ 0 - 5
src/server/ua_services.h

@@ -285,9 +285,4 @@ void Service_Publish(UA_Server *server, UA_Session *session,
 /** @} */
 #endif
 
-#ifdef ENABLE_METHODCALLS
-void Service_Call(UA_Server *server, UA_Session *session,
-                  const UA_CallRequest *request,
-                  UA_CallResponse *response);
-#endif
 #endif /* UA_SERVICES_H_ */

+ 1 - 1
tools/generate_datatypes.py

@@ -58,7 +58,7 @@ minimal_types = ["InvalidType", "Node", "NodeClass", "ReferenceNode", "Applicati
                  "NodeAttributesMask","DeleteNodesItem", "DeleteNodesRequest", "DeleteNodesResponse",
                  "DeleteReferencesItem", "DeleteReferencesRequest", "DeleteReferencesResponse",
                  "RegisterNodesRequest", "RegisterNodesResponse", "UnregisterNodesRequest", "UnregisterNodesResponse", 
-                 "UserIdentityToken", "UserNameIdentityToken", "AnonymousIdentityToken", "CallMethodRequest", "CallMethodResult", "CallResponse", "CallRequest" ];
+                 "UserIdentityToken", "UserNameIdentityToken", "AnonymousIdentityToken" ];
 
 subscription_types = [ "DeleteMonitoredItemsRequest", "DeleteMonitoredItemsResponse", "NotificationMessage",
                   "MonitoredItemNotification", "DataChangeNotification", "ModifySubscriptionRequest", "ModifySubscriptionResponse" ];