Merge branch '1.14.x'

Change-Id: I61116a2e1f076303c37b7d713460cd50ba299921
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11c8f02..dad976d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,6 +126,11 @@
     mark_as_advanced(FORTE_ADDITIONAL_CXX_FLAGS)

     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FORTE_ADDITIONAL_CXX_FLAGS}")

   endif(MSVC)

+
+  option(FORTE_WINDOWS_XP_COMPAT OFF "Enable some workarounds for Windows XP compatibility")
+  if (FORTE_WINDOWS_XP_COMPAT)
+    add_definitions(-DWINDOWS_XP_COMPAT=1)
+  endif()
 endif(WIN32)

 

 #######################################################################################

@@ -148,6 +153,12 @@
   unset(LUAJIT_MATH_LIBRARY CACHE)

 endif(NOT ("${FORTE_USE_LUATYPES}" STREQUAL "None"))

 

+#######################################################################################
+# Early definition of option how to generate stringlist for every source file
+#######################################################################################
+SET(FORTE_LINKED_STRINGDICT ON CACHE BOOL "FORTE will resolve references to the stringdict at link-stage and not compile-stage. This will reduce compiletime if the stringdict changes.")
+mark_as_advanced(FORTE_LINKED_STRINGDICT)
+
 #######################################################################################

 # Add subdirectories

 #######################################################################################

@@ -189,9 +200,9 @@
 mark_as_advanced(FORTE_CommunicationInterruptQueueSize)

 

 if(FORTE_DYNAMIC_TYPE_LOAD)

-SET(FORTE_IPLayerRecvBufferSize "20000" CACHE STRING "FORTE ip layer recv buffer size" FORCE)

+SET(FORTE_IPLayerRecvBufferSize "20000" CACHE STRING "FORTE ip layer recv buffer size")

 else()

-SET(FORTE_IPLayerRecvBufferSize "1500" CACHE STRING "FORTE ip layer recv buffer size" FORCE)

+SET(FORTE_IPLayerRecvBufferSize "1500" CACHE STRING "FORTE ip layer recv buffer size")

 endif(FORTE_DYNAMIC_TYPE_LOAD)

 mark_as_advanced(FORTE_IPLayerRecvBufferSize)

 

@@ -269,12 +280,9 @@
 ENDFOREACH(FBLIB_FILE)

 LIST(REMOVE_DUPLICATES SOURCE_FILES)

 

-#######################################################################################

-# Generate stringlist for every source file

-#######################################################################################

-SET(FORTE_LINKED_STRINGDICT ON CACHE BOOL "FORTE will resolve references to the stringdict at link-stage and not compile-stage. This will reduce compiletime if the stringdict changes.")

-mark_as_advanced(FORTE_LINKED_STRINGDICT)

-

+#######################################################################################
+# Generate stringlist for every source file
+#######################################################################################
 SET(FORTE_MODIFY_SOURCES_ON_MISSING_GENERATED_INCLUDES ON CACHE BOOL "FORTE change the source-files if includes for the generated includes are missing.")

 mark_as_advanced(FORTE_MODIFY_SOURCES_ON_MISSING_GENERATED_INCLUDES)

 

diff --git a/buildsupport/check_compiler_features.cmake b/buildsupport/check_compiler_features.cmake
index bd166c7..8a0d6cf 100644
--- a/buildsupport/check_compiler_features.cmake
+++ b/buildsupport/check_compiler_features.cmake
@@ -1,5 +1,5 @@
 #********************************************************************************
-# Copyright (c) 2020 TU Wien/ACIN
+# Copyright (c) 2020 TU Wien/ACIN, OFFIS e.V.
 # This program and the accompanying materials are made available under the
 # terms of the Eclipse Public License 2.0 which is available at
 # http://www.eclipse.org/legal/epl-2.0.
@@ -9,15 +9,21 @@
 # Contributors:
 #    Martin Melik Merkumians
 #      - initial API and implementation and/or initial documentation
+#   Jörg Walter - fix detection to honor C++ standard settings
 # *******************************************************************************/
+cmake_policy(PUSH)
+cmake_policy(SET CMP0067 NEW)
+
 include(CheckCXXSourceCompiles)
 
-MACRO(TEST_NEEDED_FORTE_COMPILER_FEATURES)
-CHECK_CXX_SOURCE_COMPILES("int main() { void* p = nullptr; }"
+function(TEST_NEEDED_FORTE_COMPILER_FEATURES)
+  check_cxx_source_compiles("int main() { void* p = nullptr; }"
     NULLPTR_SUPPORTED
     FAIL_REGEX "use of undeclared identifier 'nullptr'")
-if(NOT NULLPTR_SUPPORTED)
+  if(NOT NULLPTR_SUPPORTED)
     message(WARNING "`nullptr` not supported, replacing it with 0 via precprocessor")
     forte_add_definition("-Dnullptr=0")
-endif()
-ENDMACRO(TEST_NEEDED_FORTE_COMPILER_FEATURES)
\ No newline at end of file
+  endif()
+endfunction()
+
+cmake_policy(POP)
diff --git a/buildsupport/forte.cmake b/buildsupport/forte.cmake
index d3b129d..48af9d8 100644
--- a/buildsupport/forte.cmake
+++ b/buildsupport/forte.cmake
@@ -1,13 +1,15 @@
 #*******************************************************************************

 # Copyright (c) 2010 -2014 Profactor GmbH, ACIN, fortiss GmbH

-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
+#               2020 Johannes Kepler University Linz

+# This program and the accompanying materials are made available under the

+# terms of the Eclipse Public License 2.0 which is available at

+# http://www.eclipse.org/legal/epl-2.0.

+#

 # SPDX-License-Identifier: EPL-2.0

-# 
-# Contributors:
+#

+# Contributors:

 #     Michael Hofmann, Alois Zoitl, Gerhard Ebenhofer, Matthias Plash, Patrick Smejkal - initial API and implementation and/or initial documentation

+#     Ernst Blecha - add directory-based module creation

 # *******************************************************************************/

 

 MACRO(forte_add_subdirectory DIRECTORY)

@@ -205,9 +207,9 @@
   ENDFOREACH(ARG)

 ENDFUNCTION(forte_add_architecture)

 

-MACRO(forte_add_network_layer NAME ONOFF CONFIGNAME CLASSNAME FILENAME DISCRIPTION)

+MACRO(forte_add_network_layer NAME ONOFF CONFIGNAME CLASSNAME FILENAME DESCRIPTION)

 # TODO: parse filename from filename

-  set(FORTE_COM_${NAME} ${ONOFF} CACHE BOOL "${DISCRIPTION}")

+  set(FORTE_COM_${NAME} ${ONOFF} CACHE BOOL "${DESCRIPTION}")

   IF(FORTE_COM_${NAME})

     FORTE_ADD_SOURCEFILE_HCPP(${FILENAME})

     set_property(GLOBAL APPEND PROPERTY FORTE_LAYER_CLASS ${CLASSNAME})

@@ -222,20 +224,35 @@
     set_property(GLOBAL APPEND PROPERTY FORTE_HANDLER_FILENAME "${FILENAME}.h")

 ENDMACRO(forte_add_handler)

 

-#MACRO(forte_add_module NAME DIRECTORY DISCRIPTION)

+#MACRO(forte_add_module NAME DIRECTORY DESCRIPTION)

 # Additional parameters are interpreted as dependencies

-MACRO(forte_add_module NAME DISCRIPTION)

-  set(FORTE_MODULE_${NAME} OFF CACHE BOOL "${DISCRIPTION}")

+MACRO(forte_add_module NAME DESCRIPTION)

+  # create module with value from cache (does not set the description if the entry exists)

+  SET(FORTE_MODULE_${NAME} OFF CACHE BOOL "${DESCRIPTION}")

+  # update the module description stored in cache

+  SET(FORTE_MODULE_${NAME} ${FORTE_MODULE_${NAME}} CACHE BOOL "${DESCRIPTION}" FORCE)

+

   FOREACH(dependencies ${ARGN})

-  if(NOT ${dependencies})

-  return()

-  endif(NOT ${dependencies})

+    IF(NOT ${dependencies})

+      RETURN()

+    ENDIF(NOT ${dependencies})

   ENDFOREACH(dependencies)

-  if(NOT FORTE_MODULE_${NAME})

-    return()

-  endif(NOT FORTE_MODULE_${NAME})

+  IF(NOT FORTE_MODULE_${NAME})

+    RETURN()

+  ENDIF(NOT FORTE_MODULE_${NAME})

 ENDMACRO(forte_add_module)

 

+MACRO(forte_add_directory_module)

+  # use the current directory name as basis for naming the module

+  GET_FILENAME_COMPONENT(MODULENAME ${CMAKE_CURRENT_LIST_DIR} NAME)

+  SET(MODULENAME "EXTERNAL_${MODULENAME}")

+

+  forte_directory_listing(DESCRIPTION "*.cpp" "*.c" "*.h")

+

+  # add the module (stops execution if module is disabled!)

+  forte_add_module(${MODULENAME} ${DESCRIPTION})

+ENDMACRO(forte_add_directory_module)

+

 #MACRO(forte_add_io NAME DIRECTORY DESCRIPTION)

 MACRO(forte_add_io NAME DESCRIPTION)

   set(FORTE_IO_${NAME} OFF CACHE BOOL "${DESCRIPTION}")

@@ -269,6 +286,40 @@
   ENDFOREACH(ARG)

 ENDFUNCTION(forte_add_post_build_command)

 

+FUNCTION(forte_directory_listing VARIABLE EXTENSION)

+  # retrieve all files matching the given extension(s)

+  file(GLOB FILES LIST_DIRECTORIES false CONFIGURE_DEPENDS ${EXTENSION} ${ARGN})

+  # loop over the files, extract the name

+  FOREACH(FILE ${FILES})

+    get_filename_component(FILENAME ${FILE} NAME)

+    list(APPEND FILENAMES ${FILENAME})

+  ENDFOREACH()

+  # create a newline-seperated list of files

+  list(JOIN FILENAMES "\n" FILENAMESTRING)

+  set(${VARIABLE} "${CMAKE_CURRENT_LIST_DIR}\n${FILENAMESTRING}" PARENT_SCOPE)

+ENDFUNCTION(forte_directory_listing)

+

+FUNCTION(forte_add_all_sourcefiles)

+  forte_add_all_sourcefiles_h()

+  forte_add_all_sourcefiles_c()

+  forte_add_all_sourcefiles_cpp()

+ENDFUNCTION(forte_add_all_sourcefiles)

+

+FUNCTION(forte_add_all_sourcefiles_h)

+  file(GLOB FILES LIST_DIRECTORIES false CONFIGURE_DEPENDS "*.h")

+  forte_add_sourcefile_with_path_h(${FILES})

+ENDFUNCTION(forte_add_all_sourcefiles_h)

+

+FUNCTION(forte_add_all_sourcefiles_c)

+  file(GLOB FILES LIST_DIRECTORIES false CONFIGURE_DEPENDS "*.c")

+  forte_add_sourcefile_with_path_c(${FILES})

+ENDFUNCTION(forte_add_all_sourcefiles_c)

+

+FUNCTION(forte_add_all_sourcefiles_cpp)

+  file(GLOB FILES LIST_DIRECTORIES false CONFIGURE_DEPENDS "*.cpp")

+  forte_add_sourcefile_with_path_cpp(${FILES})

+ENDFUNCTION(forte_add_all_sourcefiles_cpp)

+

 ## forte_add_systemtest_hard (test_name bootfile_name timeout)

 ## Fails if any error has been logged

 FUNCTION(forte_add_systemtest_hard arg1 arg2 arg3)

diff --git a/forte_config.h.in b/forte_config.h.in
index 7436e9f..b4163cb 100644
--- a/forte_config.h.in
+++ b/forte_config.h.in
@@ -13,9 +13,6 @@
 #ifndef _CONFIG_H_

 #define _CONFIG_H_

 

-#undef IN

-#undef OUT

-

 

 #include <datatype.h>

 

@@ -31,7 +28,7 @@
  *  For Smaller devices which do not use 64 bit datatypes a time base of 1000 (i.e., 1ms) 

  *  or 1000000 (i.e., 1micro s) may be suitable. 

  */

-const uint_fast32_t cgForteTimeBaseUnitsPerSecond = ${FORTE_TimeBaseUnitsPerSecond};

+const uint_fast64_t cgForteTimeBaseUnitsPerSecond = ${FORTE_TimeBaseUnitsPerSecond};

 

 

 /*! Define the initial size of the event chain list used in the event chain execution thread.

diff --git a/setup_lmsEv3.sh b/setup_lmsEv3.sh
index 59f454c..181fb5d 100755
--- a/setup_lmsEv3.sh
+++ b/setup_lmsEv3.sh
@@ -31,7 +31,7 @@
   
   cd "./$forte_bin_dir"
   
-  cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/cabral/work/arm-linux-gnueabi.cmake" -DFORTE_MODULE_LMS_EV3=ON -DFORTE_ARCHITECTURE=Posix -DFORTE_COM_ETH=ON -DFORTE_COM_FBDK=ON -DFORTE_COM_LOCAL=ON -DFORTE_TESTS=OFF -DFORTE_TESTS_INC_DIRS=${forte_boost_test_inc_dirs} -DFORTE_TESTS_LINK_DIRS=${forte_boost_test_inc_dirs} -DFORTE_MODULE_CONVERT=ON -DFORTE_MODULE_MATH=ON -DFORTE_MODULE_IEC61131=ON -DFORTE_MODULE_OSCAT=ON -DFORTE_MODULE_Test=ON -DFORTE_MODULE_UTILS=ON ../../
+  cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/compiler/toolchain-armel.cmake" -DFORTE_MODULE_LMS_EV3=ON -DFORTE_ARCHITECTURE=Posix -DFORTE_COM_ETH=ON -DFORTE_COM_FBDK=ON -DFORTE_COM_LOCAL=ON -DFORTE_TESTS=OFF -DFORTE_TESTS_INC_DIRS=${forte_boost_test_inc_dirs} -DFORTE_TESTS_LINK_DIRS=${forte_boost_test_inc_dirs} -DFORTE_MODULE_CONVERT=ON -DFORTE_MODULE_MATH=ON -DFORTE_MODULE_IEC61131=ON -DFORTE_MODULE_OSCAT=ON -DFORTE_MODULE_Test=ON -DFORTE_MODULE_UTILS=ON ../../
 else
   echo "unable to create ${forte_bin_dir}"
   exit 1
diff --git a/src/arch/be_m1/CMakeLists.txt b/src/arch/be_m1/CMakeLists.txt
index 629b047..d7b7806 100644
--- a/src/arch/be_m1/CMakeLists.txt
+++ b/src/arch/be_m1/CMakeLists.txt
@@ -22,7 +22,8 @@
   forte_set_timer(../posix/pctimeha)
   
   forte_add_sourcefile_hcpp(forte_thread ../vxworks/forte_sync ../vxworks/forte_sem)
-  forte_add_sourcefile_hcpp(fortemodule ../genforte_printer.cpp)
+  forte_add_sourcefile_hcpp(fortemodule)
+  forte_add_sourcefile_cpp(../genforte_printer.cpp)
   forte_add_sourcefile_hcpp(../utils/timespec_utils)
   
   forte_add_sourcefile_h(stdint.h ../forte_architecture_time.h)
diff --git a/src/arch/be_m1/forte_thread.cpp b/src/arch/be_m1/forte_thread.cpp
index 7324c29..7a90ad2 100644
--- a/src/arch/be_m1/forte_thread.cpp
+++ b/src/arch/be_m1/forte_thread.cpp
@@ -31,7 +31,7 @@
   //TODO implement priority assignment similar to threadx and ecos
 }
 
-forte::arch::CThreadBase<int>::TThreadHandleType CTXThread::CBEThread(long ){
+forte::arch::CThreadBase<int>::TThreadHandleType CBEThread::createThread(long ){
   int retVal = 1;
   if(Spawn(0, 0, 130, VX_FP_TASK, APP_TSK_STACK) == ERROR){
     retVal = 0;
diff --git a/src/arch/posix/forte_sem.cpp b/src/arch/posix/forte_sem.cpp
index ef7cefb..9cf2ca8 100644
--- a/src/arch/posix/forte_sem.cpp
+++ b/src/arch/posix/forte_sem.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016, 2018 fortiss GmbH, TU Vienna/ACIN
+ * Copyright (c) 2016, 2020 fortiss GmbH, TU Vienna/ACIN, OFFIS e.V.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -10,58 +10,106 @@
  *  Alois Zoitl - initial API and implementation and/or initial documentation
  *  Peter Gsellmann, Martin Melik-Merkumians - adds timed wait and try and no wait
  *    and documentation
+ *  Jörg Walter - make timed wait work withoout busy-loop, switch to binary
+ *    semaphore
+ *
  *******************************************************************************/
 
-#include <errno.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
+#include <cerrno>
+#include <cstring>
+#include <ctime>
+#include <cassert>
 
 #include "forte_sem.h"
 #include "../devlog.h"
 #include "../utils/timespec_utils.h"
+#include <criticalregion.h>
 
 namespace forte {
   namespace arch {
 
-    CPThreadSemaphore::CPThreadSemaphore(unsigned int paInitialValue){
-      if(-1 == sem_init(&mSemaphore, 0, paInitialValue)){
-        DEVLOG_ERROR("Could not initialize suspend sempaphore: %s\n", strerror(errno));
+    CPThreadSemaphore::CPThreadSemaphore(bool paInitialValue) : mPosted(paInitialValue){
+      pthread_condattr_t condAttr;
+
+      if (pthread_condattr_init(&condAttr) != 0) {
+        DEVLOG_ERROR("Could not initialize cv attributes\n");
       }
+      if (pthread_condattr_setclock(&condAttr, CLOCK_MONOTONIC) != 0) {
+        DEVLOG_ERROR("Could not set cv clock\n");
+      }
+      if (pthread_cond_init(&mCond, &condAttr) != 0) {
+        DEVLOG_ERROR("Could not initialize condition variable\n");
+      }
+      pthread_condattr_destroy(&condAttr);
     }
 
+    
     CPThreadSemaphore::~CPThreadSemaphore(){
-      sem_destroy(&mSemaphore);
+      pthread_cond_destroy(&mCond);
     }
 
+
     void CPThreadSemaphore::inc(){
-      sem_post(&mSemaphore);
+      CCriticalRegion cr(mMutex);
+      mPosted = true;
+      pthread_cond_signal(&mCond);
     }
 
+
     void CPThreadSemaphore::waitIndefinitely(){
-      while((-1 == sem_wait(&mSemaphore)) && (errno == EINTR)); //handle interrupts from signals
+      CCriticalRegion cr(mMutex);
+      while (!mPosted) {
+        pthread_cond_wait(&mCond, mMutex.getPosixMutex());
+      }
+      mPosted = false;
     }
 
+
     bool CPThreadSemaphore::timedWait(const TForteUInt64 paRelativeTimeout){
-      timespec timeoutSpec = { static_cast<time_t>(paRelativeTimeout / scmSecondInNanoSeconds), static_cast<time_t>(paRelativeTimeout % scmSecondInNanoSeconds) };
+      CCriticalRegion cr(mMutex);
+
+      if (mPosted) {
+        mPosted = false;
+        return true;
+      }
+
+      timespec timeoutSpec = {
+        static_cast<time_t>(paRelativeTimeout / 1000000000ULL),
+        static_cast<time_t>(paRelativeTimeout % 1000000000ULL)
+      };
+
       timespec currentTime = { 0, 0 };
       clock_gettime(CLOCK_MONOTONIC, &currentTime);
 
-      timespec expectedAbsoluteTimeoutTime = {0, 0};
+      timespec expectedAbsoluteTimeoutTime = { 0, 0 };
       timespecAdd(&currentTime, &timeoutSpec, &expectedAbsoluteTimeoutTime);
 
-      do{
-        if(0 == sem_trywait(&mSemaphore)){
-          return true;
-        }
-        clock_gettime(CLOCK_MONOTONIC, &currentTime);
+      int rc = 0;
+      while (!mPosted && rc == 0) {
+        rc = pthread_cond_timedwait(&mCond, mMutex.getPosixMutex(), &expectedAbsoluteTimeoutTime);
+      }
 
-      } while(timespecLessThan(&currentTime, &expectedAbsoluteTimeoutTime));
-      return false;
+      if (rc != 0 && rc != ETIMEDOUT) {
+        DEVLOG_ERROR("Unexpected error during condition variable wait: %i\n", rc);
+      }
+
+      assert(!(rc == 0 && !mPosted)
+             && (bool)"should have been posted when waiting successfully");
+
+      bool success = (mPosted && rc == 0);
+      if (success) {
+        mPosted = false;
+      }
+
+      return success;
     }
 
+
     bool CPThreadSemaphore::tryNoWait(){
-      return (0 == sem_trywait(&mSemaphore));
+      CCriticalRegion cr(mMutex);
+      bool success = mPosted;
+      mPosted = false;
+      return success;
     }
   } /* namespace arch */
 } /* namespace forte */
diff --git a/src/arch/posix/forte_sem.h b/src/arch/posix/forte_sem.h
index 2ce6be9..f99ec98 100644
--- a/src/arch/posix/forte_sem.h
+++ b/src/arch/posix/forte_sem.h
@@ -1,5 +1,6 @@
 /*******************************************************************************
- * Copyright (c) 2016, 2018 fortiss GmbH, TU Vienna/ACIN
+ * Copyright (c) 2016 fortiss GmbH, TU Vienna/ACIN,
+ *               2020 OFFIS e.V., Johannes Kepler University Linz
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -10,25 +11,29 @@
  *  Alois Zoitl - initial API and implementation and/or initial documentation
  *  Peter Gsellmann, Martin Melik-Merkumians - adds timed wait and try and no wait
  *    and documentation
+ *  Jörg Walter - make timed wait work without busy-loop, switch to binary
+ *    semaphore
+ *  Alois Zoitl - changed from pthread mutex to CPThreadSyncObject
  *******************************************************************************/
 
 #ifndef SRC_ARCH_POSIX_SEMAPHORE_H_
 #define SRC_ARCH_POSIX_SEMAPHORE_H_
 
-#include <semaphore.h>
+#include <pthread.h>
 #include "datatype.h"
+#include "forte_sync.h"
 
 namespace forte {
   namespace arch {
 
-    /*!\brief counting semaphore for syncing operation in FORTE
+    /*!\brief binary semaphore for syncing operation in FORTE
      *
      * The semaphore is initialized with the value given.
      */
     class CPThreadSemaphore{
       public:
 
-        explicit CPThreadSemaphore(unsigned int paInitialValue = 0);
+        explicit CPThreadSemaphore(bool paInitialValue = false);
         ~CPThreadSemaphore();
 
         /** @brief Unlocks (increments) the semaphore
@@ -55,8 +60,24 @@
         bool tryNoWait();
 
       private:
-        sem_t mSemaphore;
-        static const TForteUInt64 scmSecondInNanoSeconds = (TForteUInt64)1E9;
+        /* TODO: in C++11, this class should be properly made non-copyable since
+         * mutexes cannot be copied after initialisation
+
+        CPThreadSemaphore(const CPThreadSemaphore &) = delete;
+        CPThreadSemaphore &operator=(const CPThreadSemaphore &) = delete;
+        */
+        CPThreadSemaphore(const CPThreadSemaphore &);
+        CPThreadSemaphore &operator=(const CPThreadSemaphore &);
+
+        /* Implementation is based on POSIX condition variables instead of POSIX
+         * semaphores, because POSIX semaphores cannot safely wait without busy
+         * looping. Derived from https://stackoverflow.com/a/57496953 */
+
+        CPThreadSyncObject mMutex;
+        pthread_cond_t mCond;
+
+        bool mPosted;
+
     };
 
     typedef CPThreadSemaphore CSemaphore;
diff --git a/src/arch/posix/forte_sync.cpp b/src/arch/posix/forte_sync.cpp
index 8a76eef..0cdf440 100644
--- a/src/arch/posix/forte_sync.cpp
+++ b/src/arch/posix/forte_sync.cpp
@@ -11,11 +11,11 @@
  *******************************************************************************/
 #include "forte_sync.h"
 
-CPCSyncObject::CPCSyncObject(){
-  pthread_mutex_init(&m_oMutexHandle, 0);
+CPThreadSyncObject::CPThreadSyncObject(){
+  pthread_mutex_init(&mMutex, 0);
 }
 
-CPCSyncObject::~CPCSyncObject(){
-  pthread_mutex_destroy(&m_oMutexHandle);
+CPThreadSyncObject::~CPThreadSyncObject(){
+  pthread_mutex_destroy(&mMutex);
   //TODO handle return value
 }
diff --git a/src/arch/posix/forte_sync.h b/src/arch/posix/forte_sync.h
index 5dfa7d2..6d5927e 100644
--- a/src/arch/posix/forte_sync.h
+++ b/src/arch/posix/forte_sync.h
@@ -1,5 +1,5 @@
 /*******************************************************************************

- * Copyright (c) 2005 - 2011 ACIN

+ * Copyright (c) 2005, 2020 ACIN, OFFIS e.V.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -8,12 +8,20 @@
  *

  * Contributors:

  *  Alois Zoitl - initial API and implementation and/or initial documentation

+ *  Jörg Walter - make objects non-copyable
  *******************************************************************************/

 #ifndef _FORTE_SYNC_H_

 #define _FORTE_SYNC_H_

 

 #include <pthread.h>

 

+namespace forte {

+  namespace arch {

+    //forward declaration of CPThreadSemaphore so that we can use it in friend

+    class CPThreadSemaphore;

+  }

+}

+

 

 /*! \ingroup posix_hal

  * \brief The sync object implementation for the posix thread interface.

@@ -22,31 +30,43 @@
  * 

  */

  

-class CPCSyncObject{

+class CPThreadSyncObject{

   public:

-    CPCSyncObject();

-    ~CPCSyncObject();

+    CPThreadSyncObject();

+    ~CPThreadSyncObject();

 

     /*!\brief Lock the resource coming after the lock command

      *

      * This function blocks until it will get the lock for the coming critical section.

      */

     void lock(void){

-      pthread_mutex_lock(&m_oMutexHandle);

+      pthread_mutex_lock(&mMutex);

       //TODO handle return value

     }

 

-    //!Freee the resource coming after the lock command

+    //!Free the resource coming after the lock command

     void unlock(void){

-      pthread_mutex_unlock(&m_oMutexHandle);

+      pthread_mutex_unlock(&mMutex);

       //TODO handle return value

     }

 

+

   private:

+    //! Accessor method to the mutex allowing platform specific code to use this sync object class.

+    pthread_mutex_t *getPosixMutex(){

+      return &mMutex;

+    }

+

+    // prevent copies, since pthread_mutex_t may not be copied
+    CPThreadSyncObject(const CPThreadSyncObject &); /* = delete; */
+    CPThreadSyncObject &operator=(const CPThreadSyncObject &); /* = delete; */
+
     //! The posix thread mutex handle of the operating system.

-    pthread_mutex_t m_oMutexHandle;

+    pthread_mutex_t mMutex;

+

+    friend class forte::arch::CPThreadSemaphore;

 };

 

-typedef CPCSyncObject CSyncObject; //allows that doxygen can generate better documenation

+typedef CPThreadSyncObject CSyncObject; //allows that doxygen can generate better documenation

 

 #endif /*FORTE_SYNC_H_*/

diff --git a/src/arch/posix/posixsercommlayer.cpp b/src/arch/posix/posixsercommlayer.cpp
index 7d815eb..621d73a 100644
--- a/src/arch/posix/posixsercommlayer.cpp
+++ b/src/arch/posix/posixsercommlayer.cpp
@@ -106,8 +106,8 @@
       default: return forte::com_infra::e_InitInvalidId; break;
     }
 
-    stNewTIO.c_ispeed = mOldTIO.c_ispeed;
-    stNewTIO.c_ospeed = mOldTIO.c_ospeed;
+    cfsetispeed(&stNewTIO, cfgetispeed(&mOldTIO));
+    cfsetospeed(&stNewTIO, cfgetospeed(&mOldTIO));
 
     switch (paSerialParameters.byteSize) {
       case e5: stNewTIO.c_cflag |= CS5;  break;
diff --git a/src/arch/posix/posixsercommlayer.h b/src/arch/posix/posixsercommlayer.h
index dcc0184..9788a8f 100644
--- a/src/arch/posix/posixsercommlayer.h
+++ b/src/arch/posix/posixsercommlayer.h
@@ -12,9 +12,9 @@
 #ifndef _SERCOMMLAYER_H_
 #define _SERCOMMLAYER_H_
 
+#include <termios.h>
 #include "../../core/cominfra/serialcomlayerbase.h"
 #include "../gensockhand.h"
-#include <termios.h>
 
 class CPosixSerCommLayer : public CSerialComLayerBase<FORTE_SOCKET_TYPE, FORTE_INVALID_SOCKET>{
   public:
diff --git a/src/arch/timerha.cpp b/src/arch/timerha.cpp
index 78b4749..0e2d790 100644
--- a/src/arch/timerha.cpp
+++ b/src/arch/timerha.cpp
@@ -1,5 +1,6 @@
 /*******************************************************************************
  * Copyright (c) 2005 - 2015 ACIN, Profactor GmbH, fortiss GmbH
+ *               2020 Johannes Kepler University Linz
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -8,18 +9,22 @@
  *
  * Contributors:
  *   Alois Zoitl, Rene Smodic, Thomas Strasser, Ingo Hegny
- *    - initial API and implementation and/or initial documentation
+ *      - initial API and implementation and/or initial documentation
+ *   Alois Zoitl - worked on reducing the jitter and overhead of timer handler
+ *                 Bug #568902
  *******************************************************************************/
 #include "timerha.h"
 #include "../core/datatypes/forte_time.h"
 #include "../core/devexec.h"
 #include "../core/esfb.h"
 #include "../core/utils/criticalregion.h"
+#include <algorithm>
+#include <functional>
 
 DEFINE_HANDLER(CTimerHandler)
 
 CTimerHandler::CTimerHandler(CDeviceExecution& paDeviceExecution) : CExternalEventHandler(paDeviceExecution),
-    mForteTime(0), mTimedFBList(0){
+    mForteTime(0), mTimedFBList(nullptr), mAddFBList(nullptr){
 }
 
 CTimerHandler::~CTimerHandler(){
@@ -28,20 +33,21 @@
 void CTimerHandler::registerTimedFB(STimedFBListEntry *paTimerListEntry, const CIEC_TIME &paTimeInterval) {
   //calculate the correct interval based on time-base and timer ticks per seconds
   paTimerListEntry->mInterval = static_cast<TForteUInt32>((paTimeInterval * getTicksPerSecond()) / cgForteTimeBaseUnitsPerSecond);
+  // Correct null intervals that can lead to event queue overflow to at least 1 timer tick
+  if(0 == paTimerListEntry->mInterval) {
+    paTimerListEntry->mInterval = 1;
+  }
+  // set the first next activation time right here to reduce jitter, see Bug #568902 for details
+  paTimerListEntry->mTimeOut = mForteTime + paTimerListEntry->mInterval;
   {
-    CCriticalRegion criticalRegion(mSync);
-    addTimedFBEntry(paTimerListEntry);
+    CCriticalRegion criticalRegion(mAddListSync);
+    paTimerListEntry->mNext = mAddFBList;
+    mAddFBList = paTimerListEntry;
   }
 }
 
 void CTimerHandler::addTimedFBEntry(STimedFBListEntry *paTimerListEntry) {
-  paTimerListEntry->mTimeOut = mForteTime + paTimerListEntry->mInterval; // the next activation time of this FB
   paTimerListEntry->mNext = 0;
-
-  // Correct null intervals that can lead to event queue overflow to 10 ms
-  if(paTimerListEntry->mInterval == 0) {
-    paTimerListEntry->mTimeOut += (getTicksPerSecond() > 100) ? getTicksPerSecond() / 100 : 1;
-  }
   if (0 == mTimedFBList) {
     mTimedFBList = paTimerListEntry;
   } else {
@@ -64,7 +70,11 @@
 }
 
 void CTimerHandler::unregisterTimedFB(CEventSourceFB *paTimedFB) {
-  CCriticalRegion criticalRegion(mSync);
+  CCriticalRegion criticalRegion(mRemoveListSync);
+  mRemoveFBList.push_back(paTimedFB);
+}
+
+void CTimerHandler::removeTimedFB(CEventSourceFB *paTimedFB) {
   if (0 != mTimedFBList) {
     STimedFBListEntry *buffer = 0;
     if (mTimedFBList->mTimedFB == paTimedFB) {
@@ -91,29 +101,65 @@
 void CTimerHandler::nextTick(void) {
   ++mForteTime;
   mDeviceExecution.notifyTime(mForteTime); //notify the device execution that one tick passed by.
-  if(0 != mTimedFBList){
-    //only check the list if there are entries in the list
-    CCriticalRegion criticalRegion(mSync);
-    while (0 != mTimedFBList) {
-      if (mTimedFBList->mTimeOut > mForteTime) {
-        break;
-      }
-      mDeviceExecution.startNewEventChain(mTimedFBList->mTimedFB);
-      STimedFBListEntry *buffer = mTimedFBList;
-      mTimedFBList = mTimedFBList->mNext;
 
-      switch (buffer->mType) {
-        case e_Periodic:
-          addTimedFBEntry(buffer); //re-register the timed FB
-          break;
-        case e_SingleShot:
-          // nothing special is to do up to now
-        default:
-          buffer->mNext = 0;
-          buffer->mTimeOut = 0;
-          break;
-      }
+  if(!mRemoveFBList.empty()){
+    processRemoveList();
+  }
+
+  processTimedFBList();
+
+  if(0 != mAddFBList){
+    processAddList();
+  }
+}
+
+void  CTimerHandler::processTimedFBList(){
+  while (0 != mTimedFBList) {
+    if (mTimedFBList->mTimeOut > mForteTime) {
+      break;
+    }
+    STimedFBListEntry *buffer = mTimedFBList;
+    mTimedFBList = buffer->mNext;  //remove buffer from the list
+    triggerTimedFB(buffer);
+  }
+}
+
+void CTimerHandler::triggerTimedFB(STimedFBListEntry *paTimerListEntry){
+  mDeviceExecution.startNewEventChain(paTimerListEntry->mTimedFB);
+
+  switch (paTimerListEntry->mType) {
+    case e_Periodic:
+      paTimerListEntry->mTimeOut = mForteTime + paTimerListEntry->mInterval;  // the next activation time of this FB
+      addTimedFBEntry(paTimerListEntry); //re-register the timed FB
+      break;
+    case e_SingleShot:
+      // nothing special is to do up to now, therefore go to default
+    default:
+      paTimerListEntry->mNext = 0;
+      paTimerListEntry->mTimeOut = 0;
+      break;
+  }
+}
+
+void CTimerHandler::processAddList(){
+  CCriticalRegion criticalRegion(mAddListSync);
+  while(0 != mAddFBList){
+    STimedFBListEntry *buffer = mAddFBList;
+    mAddFBList = buffer->mNext; //remove buffer from the list
+    if(buffer->mTimeOut < mForteTime){
+      // the time already passed trigger the fb
+      triggerTimedFB(buffer);
+    }
+    else{
+      addTimedFBEntry(buffer);
     }
   }
 }
 
+void CTimerHandler::processRemoveList(){
+  CCriticalRegion criticalRegion(mRemoveListSync);
+  std::for_each(mRemoveFBList.begin(), mRemoveFBList.end(), std::bind1st(std::mem_fun(&CTimerHandler::removeTimedFB), this));
+  mRemoveFBList.clear();
+}
+
+
diff --git a/src/arch/timerha.h b/src/arch/timerha.h
index 2f471d5..6b380c1 100644
--- a/src/arch/timerha.h
+++ b/src/arch/timerha.h
@@ -1,14 +1,18 @@
 /*******************************************************************************

  * Copyright (c) 2005 - 2015 ACIN, Profactor GmbH, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
+ *               2020 Johannes Kepler University Linz

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License 2.0 which is available at

+ * http://www.eclipse.org/legal/epl-2.0.

+ *

  * SPDX-License-Identifier: EPL-2.0

  *

  * Contributors:

  *   Alois Zoitl, Thomas Strasser, Rene Smodic, Monika Wenger, Ingo Hegny

  *    - initial API and implementation and/or initial documentation

+ *   Alois Zoitl - worked on reducing the jitter and overhead of timer handler

+ *                 Bug #568902

  *******************************************************************************/

 #ifndef _TIMERHA_H_

 #define _TIMERHA_H_

@@ -16,6 +20,7 @@
 #include <forte_config.h>

 #include "../core/extevhan.h"

 #include <forte_sync.h>

+#include <vector>

 

 class CEventSourceFB;

 class CIEC_TIME;

@@ -37,7 +42,8 @@
  *  \ingroup EXTEVHAND

  */

 class CTimerHandler : public CExternalEventHandler{

-  DECLARE_HANDLER(CTimerHandler);

+  DECLARE_HANDLER(CTimerHandler)

+    ;

   public:

 

     /*!\brief create the timer handler and set the parameter pointer with the the new timer handler.

@@ -45,7 +51,7 @@
      * This function is not implemented in the standardtimerhandler and has to be implemented in the specific implementation.

      * implementations should check that not two timerhanlders can be created.

      */

-    static CTimerHandler* createTimerHandler(CDeviceExecution& paDeviceExecution);

+    static CTimerHandler* createTimerHandler(CDeviceExecution &paDeviceExecution);

 

     /*!\brief Sets the priority of the event source

      *

@@ -87,18 +93,34 @@
       return mForteTime;

     }

 

-  protected:

-    CSyncObject mSync;

-

   private:

     //!Add an entry to the timed list.

     void addTimedFBEntry(STimedFBListEntry *paTimerListEntry);

 

+    void processTimedFBList();

+    void processAddList();

+    void processRemoveList();

+

+    //!Remove an entry from the timed list.

+    void removeTimedFB(CEventSourceFB *paTimedFB);

+

+    //! process one timed FB entry, trigger the external event and if needed readd into the list.

+    void triggerTimedFB(STimedFBListEntry *paTimerListEntry);

+

     //!The runtime time in ticks till the start of FORTE.

     uint_fast64_t mForteTime;

 

     //! List of function blocks currently registered to the timer handler

     STimedFBListEntry *mTimedFBList;

+

+    //! List of function blocks to be added to the timer handler

+    STimedFBListEntry *mAddFBList;

+    CSyncObject mAddListSync;

+

+    //! List of function blocks to be removed from the timer handler

+    std::vector<CEventSourceFB *> mRemoveFBList;

+    CSyncObject mRemoveListSync;

+

 };

 

 #endif /*TIMERHA_H_*/

diff --git a/src/arch/win32/CMakeLists.txt b/src/arch/win32/CMakeLists.txt
index 53f625f..be144a7 100644
--- a/src/arch/win32/CMakeLists.txt
+++ b/src/arch/win32/CMakeLists.txt
@@ -20,7 +20,13 @@
   forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})  

   

   forte_add_sourcefile_h(fortealloc.h ../forte_architecture_time.h)

-  forte_add_sourcefile_hcpp(forte_thread forte_sync forte_sem)

+  forte_add_sourcefile_hcpp(forte_thread forte_sem)

+  forte_add_sourcefile_h(forte_sync.h)
+  if(FORTE_WINDOWS_XP_COMPAT)
+    forte_add_sourcefile_cpp(forte_sync_xp.cpp)
+  else()
+    forte_add_sourcefile_cpp(forte_sync.cpp)
+  endif()
   forte_add_sourcefile_cpp(forte_architecture.cpp forte_architecture_time.cpp winforte_printer.cpp)

   forte_add_sourcefile_cpp(../genforte_realFunctions.cpp)

   

diff --git a/src/arch/win32/forte_sync.h b/src/arch/win32/forte_sync.h
index bde0fa6..9694231 100644
--- a/src/arch/win32/forte_sync.h
+++ b/src/arch/win32/forte_sync.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 - 2013, 2017 ACIN, Profactor GmbH, fortiss GmbH
+ * Copyright (c) 2010, 2020 ACIN, Profactor GmbH, fortiss GmbH, OFFIS e.V.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *  Alois Zoitl, Gerhard Ebenhofer, Martin Melik-Merkumians - initial API and implementation and/or initial documentation
+ *  Jörg Walter - Windows XP compatibility
  *******************************************************************************/
 #ifndef _FORTE_SYNC_H_
 #define _FORTE_SYNC_H_
@@ -41,7 +42,14 @@
     void unlock(void);
 
   private:
+    CPCSyncObject(const CPCSyncObject &); /* = delete; */
+    CPCSyncObject &operator=(const CPCSyncObject &); /* = delete; */
+
+#ifdef WINDOWS_XP_COMPAT
+    CRITICAL_SECTION mLock;
+#else
     SRWLOCK mLock;
+#endif
 };
 
 #endif /*FORTE_SYNC_H_*/
diff --git a/src/arch/win32/forte_sync_xp.cpp b/src/arch/win32/forte_sync_xp.cpp
new file mode 100644
index 0000000..5c69df1
--- /dev/null
+++ b/src/arch/win32/forte_sync_xp.cpp
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2020 ACIN, Profactor GmbH, fortiss GmbH, OFFIS e.V.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *  Alois Zoitl, Gerhard Ebenhofer - initial API and implementation and/or initial documentation
+ *  Jörg Walter - Windows XP compatibility
+ *******************************************************************************/
+
+#include "forte_sync.h"
+
+
+CPCSyncObject::CPCSyncObject(){
+  InitializeCriticalSection(&mLock);
+}
+
+CPCSyncObject::~CPCSyncObject(){
+  DeleteCriticalSection(&mLock);
+}
+
+void CPCSyncObject::lock(void){
+  EnterCriticalSection(&mLock);
+}
+
+//!Free the resource coming after the lock command
+void CPCSyncObject::unlock(void){
+  LeaveCriticalSection(&mLock);
+}
diff --git a/src/arch/win32/serlayer/cwin32sercomlayer.cpp b/src/arch/win32/serlayer/cwin32sercomlayer.cpp
index 5f72a2e..38286ea 100644
--- a/src/arch/win32/serlayer/cwin32sercomlayer.cpp
+++ b/src/arch/win32/serlayer/cwin32sercomlayer.cpp
@@ -41,7 +41,7 @@
 

 forte::com_infra::EComResponse CWin32SerComLayer::sendData(void *paData, unsigned int paSize)

 {

-  DWORD dwBytesWritten= 0, dwWaitResult = 0;

+  DWORD dwBytesWritten= 0;

   char *pcData = static_cast<char*> (paData);

   unsigned int nToBeSent = paSize;

   //Send payload

@@ -82,7 +82,7 @@
     return forte::com_infra::e_ProcessDataInvalidObject;

   }

 

-  DCB dcbSerialParams = { 0 };

+  DCB dcbSerialParams = DCB();

 

   dcbSerialParams.DCBlength = sizeof(dcbSerialParams);

 

@@ -111,7 +111,7 @@
       default: return forte::com_infra::e_InitInvalidId; break;

     }

 

-  dcbSerialParams.ByteSize = static_cast<DWORD>(paSerialParameters.byteSize);

+  dcbSerialParams.ByteSize = paSerialParameters.byteSize;

 

   switch (paSerialParameters.stopBits){

     case EForteSerialStopBits::eOneBit:

@@ -148,7 +148,7 @@
   }

 

   //Timeouts for non-blocking behaviour

-  COMMTIMEOUTS timeouts = { 0 };

+  COMMTIMEOUTS timeouts = COMMTIMEOUTS();

   //Read timeouts

   timeouts.ReadIntervalTimeout = 50;

   timeouts.ReadTotalTimeoutConstant = 50;

diff --git a/src/arch/win32/win32socketinterf.cpp b/src/arch/win32/win32socketinterf.cpp
index 05218bf..9b7dd0c 100644
--- a/src/arch/win32/win32socketinterf.cpp
+++ b/src/arch/win32/win32socketinterf.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 - 2015 ACIN, Profactor GmbH, AIT, fortiss GmbH
+ * Copyright (c) 2010, 2020 ACIN, Profactor GmbH, AIT, fortiss GmbH, OFFIS e.V.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -9,19 +9,9 @@
  * Contributors:
  *   Alois Zoitl, Ingo Hegny, Gerhard Ebenhofer, Thomas Strasser
  *     - initial API and implementation and/or initial documentation
+ *  Jörg Walter - Windows XP compatibility
  *******************************************************************************/
 
-#ifdef __GNUC__
-#ifdef __MINGW32__
-
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-#define _WIN32_WINNT 0x0600 //windows vista version, which included InepPton
-
-#endif //__MINGW32__
-#endif //__GNUC__
-
 #include <sockhand.h>      //needs to be first pulls in the platform specific includes
 #include "win32socketinterf.h"
 #include "devlog.h"
@@ -85,12 +75,13 @@
   DEVLOG_INFO("CWin32SocketInterface: Opening TCP-Client connection at: %s:%d\n", pa_acIPAddr, pa_nPort);
 
   if(INVALID_SOCKET != nSocket) {
-    struct sockaddr_in stSockAddr = { };
+    sockaddr_in stSockAddr = {};
+    int stSockAddrSz = sizeof(stSockAddr);
+    if(WSAStringToAddressA(pa_acIPAddr, AF_INET, NULL, (LPSOCKADDR)&stSockAddr, &stSockAddrSz)) {
+      DEVLOG_ERROR("CWin32SocketInterface: WSAStringToAddressA() failed: %d - %s\n", stSockAddr.sin_addr.s_addr, pa_acIPAddr);
+    }
     stSockAddr.sin_family = AF_INET;
     stSockAddr.sin_port = htons(pa_nPort);
-    if(1 != InetPton(stSockAddr.sin_family, pa_acIPAddr, &(stSockAddr.sin_addr))) {
-      DEVLOG_ERROR("CWin32SocketInterface: InetPton() failed: %d - %s\n", stSockAddr.sin_addr.s_addr, pa_acIPAddr);
-    }
 
     if(SOCKET_ERROR == connect(nSocket, (struct sockaddr*) &stSockAddr, sizeof(struct sockaddr))) {
       int nLastError = WSAGetLastError();
@@ -167,11 +158,14 @@
   TSocketDescriptor nRetVal = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
 
   if(INVALID_SOCKET != nRetVal) {
+    *m_ptDestAddr = TUDPDestAddr();
+    int m_ptDestAddrSz = sizeof(*m_ptDestAddr);
+    if(WSAStringToAddressA(pa_acIPAddr, AF_INET, NULL, (LPSOCKADDR)m_ptDestAddr, &m_ptDestAddrSz)) {
+      DEVLOG_ERROR("CWin32SocketInterface: WSAStringToAddressA() failed: %d - %s\n", m_ptDestAddr->sin_addr.s_addr, pa_acIPAddr);
+    }
     m_ptDestAddr->sin_family = AF_INET;
     m_ptDestAddr->sin_port = htons(pa_nPort);
-    InetPton(m_ptDestAddr->sin_family, pa_acIPAddr, &(m_ptDestAddr->sin_addr));
-    memset(&(m_ptDestAddr->sin_zero), '\0', sizeof(m_ptDestAddr->sin_zero));
-  }
+ }
   else{
     int nLastError = WSAGetLastError();
     LPSTR pacErrorMessage = getErrorMessage(nLastError);
@@ -189,15 +183,20 @@
   if(INVALID_SOCKET != nSocket) {
     int nReuseAddrVal = 1;
     if(0 <= setsockopt(nSocket, SOL_SOCKET, SO_REUSEADDR, (char *) &nReuseAddrVal, sizeof(nReuseAddrVal))){
-      struct sockaddr_in stSockAddr;
+      struct sockaddr_in stSockAddr = {};
       stSockAddr.sin_family = AF_INET;
       stSockAddr.sin_port = htons(pa_nPort);
       stSockAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-      memset(&(stSockAddr.sin_zero), '\0', sizeof(stSockAddr.sin_zero));
       if(0 == bind(nSocket, (struct sockaddr *) &stSockAddr, sizeof(struct sockaddr))){
         // setting up multicast group
-        struct ip_mreq stMReq;
-        InetPton(stSockAddr.sin_family, pa_acIPAddr, &(stMReq.imr_multiaddr));
+        sockaddr_in stMCastAddr = {};
+        int stMCastAddrSz = sizeof(stMCastAddr);
+        if(WSAStringToAddressA(pa_acIPAddr, AF_INET, NULL, (LPSOCKADDR)&stMCastAddr, &stMCastAddrSz)) {
+          DEVLOG_ERROR("CWin32SocketInterface: WSAStringToAddressA() failed: %d - %s\n", stMCastAddr.sin_addr.s_addr, pa_acIPAddr);
+        }
+
+        struct ip_mreq stMReq = {};
+        stMReq.imr_multiaddr = stMCastAddr.sin_addr;
         stMReq.imr_interface.s_addr = htonl(INADDR_ANY);
         setsockopt(nSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*) &stMReq, sizeof(stMReq));
         //if this fails we may have given a non multicasting addr. For now we accept this. May need to be changed in the future.
diff --git a/src/com/modbus/modbuslayer.cpp b/src/com/modbus/modbuslayer.cpp
index c31e6e1..3cc0cbe 100644
--- a/src/com/modbus/modbuslayer.cpp
+++ b/src/com/modbus/modbuslayer.cpp
@@ -312,25 +312,18 @@
       // we need to swap order of each 16 bit data package

 

       unsigned int nrUint16s = currentDataSize / 2;

-      TForteUInt16 *destAr = new TForteUInt16[nrUint16s];

+      TForteUInt16 *destAr = (TForteUInt16*)(&retVal);
       TForteUInt16 *sourceAr = (TForteUInt16*) pa_acDataArray;

 

       for(unsigned int i = 0; i < nrUint16s; i++) {

         destAr[i] = sourceAr[nrUint16s - 1 - i];

       }

-

-      retVal = *((T*) destAr);

-

-      delete[] destAr;

     }

     else{

-      TForteByte *tempAr = new TForteByte[currentDataSize];

+      TForteByte *tempAr = (TForteByte*)(&retVal);
       for(unsigned int j = 0; j < currentDataSize; j++) {

         tempAr[j] = pa_acDataArray[j];

       }

-

-      retVal = *((T*) tempAr);

-      delete[] tempAr;

     }

   }

   else {

@@ -360,7 +353,7 @@
         DEVLOG_ERROR("CModbusComLayer:: Invalid input parameters\n");

       }

       else{

-        m_pModbusConnection = new CModbusClientConnection(getExtEvHandler<CModbusHandler>());

+        m_pModbusConnection = new CModbusClientConnection((CModbusHandler*)&getExtEvHandler<CModbusHandler>());
         if(strlen(tcpParams.m_acIp) > 0){

           m_pModbusConnection->setIPAddress(tcpParams.m_acIp);

           m_pModbusConnection->setPort(tcpParams.m_nPort);

diff --git a/src/com/modbus/modbustimedevent.cpp b/src/com/modbus/modbustimedevent.cpp
index 96afdc5..d76899b 100644
--- a/src/com/modbus/modbustimedevent.cpp
+++ b/src/com/modbus/modbustimedevent.cpp
@@ -10,11 +10,11 @@
  *   Filip Andren - initial API and implementation and/or initial documentation

  *******************************************************************************/

 #include "modbustimedevent.h"

+#include "../../core/iec61131_functions.h"
 

 CModbusTimedEvent::CModbusTimedEvent(TForteUInt32 pa_nUpdateInterval) 

   : m_bIsStarted(false){

   m_nUpdateInterval = pa_nUpdateInterval;

-  m_oUpdateInterval += (m_nUpdateInterval * cg_nForteTicksPerSecond) / 1000;

 

   if(pa_nUpdateInterval == 0){

     m_bSingleShotEvent = true;

@@ -27,13 +27,10 @@
 

 void CModbusTimedEvent::setUpdateInterval(TForteUInt32 pa_nUpdateInterval){

   m_nUpdateInterval = pa_nUpdateInterval;

-  SForteTime newTime;

-  newTime += (m_nUpdateInterval * cg_nForteTicksPerSecond) / 1000;

-  m_oUpdateInterval = newTime;

 }

 

 void CModbusTimedEvent::activate(){

-  m_oStartTime = CTimerHandler::sm_poFORTETimer->getForteTime();

+  m_nStartTime = NOW_MONOTONIC().getInMilliSeconds();

   m_bIsStarted = true;

 }

 

@@ -42,13 +39,13 @@
 }

 

 bool CModbusTimedEvent::readyToExecute() const{

-  SForteTime currentTime = CTimerHandler::sm_poFORTETimer->getForteTime();

-  if (m_oUpdateInterval > currentTime) {

+  uint_fast64_t currentTime = NOW_MONOTONIC().getInMilliSeconds();

+  if (m_nUpdateInterval > currentTime) {

     return false;

   }

-  currentTime -= m_oUpdateInterval;

+  currentTime -= m_nUpdateInterval;

 

-  if(isStarted() && (currentTime > m_oStartTime || currentTime == m_oStartTime)){

+  if(isStarted() && (currentTime > m_nStartTime || currentTime == m_nStartTime)){

     return true;

   }

 

diff --git a/src/com/modbus/modbustimedevent.h b/src/com/modbus/modbustimedevent.h
index fe3bfed..4c0153c 100644
--- a/src/com/modbus/modbustimedevent.h
+++ b/src/com/modbus/modbustimedevent.h
@@ -42,8 +42,7 @@
     void restartTimer();

 

   private:

-    SForteTime m_oStartTime;

-    SForteTime m_oUpdateInterval;

+    uint_fast64_t m_nStartTime;

 

     TForteUInt32 m_nUpdateInterval; // Polling interval in milliseconds (0 => single shot event)

 

diff --git a/src/com/mqtt_paho/MQTTClientConfigParser.cpp b/src/com/mqtt_paho/MQTTClientConfigParser.cpp
index c7eb28b..36c74ba 100644
--- a/src/com/mqtt_paho/MQTTClientConfigParser.cpp
+++ b/src/com/mqtt_paho/MQTTClientConfigParser.cpp
@@ -25,7 +25,7 @@
 
   CConfigFileParser configFileParser(paFileLocation);
   bool endpointFound = false;
-  std::string endpointKey = mConfigKeysNames[MQTTConfigKeys::eEndoint];
+  std::string endpointKey = mConfigKeysNames[eEndoint];
 
   if(CConfigFileParser::lookForKeyValueInFile(configFileParser, endpointKey, paEndpoint, endpointFound)) {
     if(endpointFound) {
@@ -36,11 +36,11 @@
 
         switch(configFileParser.parseNextLine(resultPair)){
           case CConfigFileParser::eOk:
-            if(0 == resultPair.first.compare(mConfigKeysNames[MQTTConfigKeys::eEndoint])) {
+            if(0 == resultPair.first.compare(mConfigKeysNames[eEndoint])) {
               moreLinesToRead = false;
-            } else if(0 == resultPair.first.compare(mConfigKeysNames[MQTTConfigKeys::eUsername])) {
+            } else if(0 == resultPair.first.compare(mConfigKeysNames[eUsername])) {
               paResult.mUsername = resultPair.second;
-            } else if(0 == resultPair.first.compare(mConfigKeysNames[MQTTConfigKeys::ePassword])) {
+            } else if(0 == resultPair.first.compare(mConfigKeysNames[ePassword])) {
               paResult.mPassword = resultPair.second;
             }
             else {
diff --git a/src/com/mqtt_paho/MQTTClientConfigParser.h b/src/com/mqtt_paho/MQTTClientConfigParser.h
index 39900f7..4ed3f99 100644
--- a/src/com/mqtt_paho/MQTTClientConfigParser.h
+++ b/src/com/mqtt_paho/MQTTClientConfigParser.h
@@ -68,7 +68,7 @@
     /**
      * Strings for the allowed keys in the configuration file for the mqtt clients
      */
-    static const char *const mConfigKeysNames[MQTTConfigKeys::eUnknown];
+    static const char *const mConfigKeysNames[eUnknown];
 
 };
 
diff --git a/src/com/mqtt_paho/MQTTHandler.cpp b/src/com/mqtt_paho/MQTTHandler.cpp
index 6041eac..9aff856 100644
--- a/src/com/mqtt_paho/MQTTHandler.cpp
+++ b/src/com/mqtt_paho/MQTTHandler.cpp
@@ -25,7 +25,7 @@
 MQTTAsync_connectOptions MQTTHandler::smClientConnectionOptions =
     MQTTAsync_connectOptions_initializer;
 
-CSyncObject MQTTHandler::smMQTTMutex = CSyncObject();
+CSyncObject MQTTHandler::smMQTTMutex;
 
 MQTTAsync MQTTHandler::smClient = 0;
 CIEC_STRING MQTTHandler::smClientId;
@@ -35,7 +35,7 @@
 
 
 MQTTStates MQTTHandler::smMQTTS_STATE = NOT_CONNECTED;
-forte::arch::CSemaphore MQTTHandler::mStateSemaphore = forte::arch::CSemaphore();
+forte::arch::CSemaphore MQTTHandler::mStateSemaphore;
 bool MQTTHandler::mIsSemaphoreEmpty = true;
 
 MQTTHandler::MQTTHandler(CDeviceExecution& paDeviceExecution) : CExternalEventHandler(paDeviceExecution)  {
diff --git a/src/com/opc/CMakeLists.txt b/src/com/opc/CMakeLists.txt
index a9df038..9f89e55 100644
--- a/src/com/opc/CMakeLists.txt
+++ b/src/com/opc/CMakeLists.txt
@@ -1,39 +1,42 @@
-#*******************************************************************************

-# Copyright (c) 2012, 2015 AIT, ACIN, fortiss GmbH

+#*******************************************************************************
+# Copyright (c) 2012, 2021 AIT, ACIN, fortiss GmbH, Hit robot group
 # This program and the accompanying materials are made available under the
 # terms of the Eclipse Public License 2.0 which is available at
 # http://www.eclipse.org/legal/epl-2.0.
 #
-# SPDX-License-Identifier: EPL-2.0

+# SPDX-License-Identifier: EPL-2.0
 # 
 # Contributors:
-#    Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

-# *******************************************************************************/

-#############################################################################

-# OPC Com Layer

-#############################################################################

-

-forte_add_network_layer(OPC OFF "opc" COpcComLayer opccomlayer "Enable OPC communication")

-SET(FORTE_COM_OPC_LIB_ROOT "" CACHE PATH "Path to OPC library root directory")

-SET(FORTE_COM_OPC_BOOST_ROOT "" CACHE PATH "Path to Boost library root directory")

-

-if(FORTE_COM_OPC)  

-  forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})

-  

-  forte_add_handler(COpcEventHandler opceventhandler)

-  

-  if("${FORTE_ARCHITECTURE}" STREQUAL "Win32")

-    forte_add_sourcefile_hcpp( opcconnection opcconnectionhandler opceventhandler 

-                   opcconnectionimpl opcprocessvar Cmd_AddConnection 

-                   Cmd_AddOPCProcessVar Cmd_SetProcessVarValue )

-  

-    forte_add_include_directories( ${FORTE_COM_OPC_BOOST_ROOT} )

-    

-    forte_add_include_directories( ${FORTE_COM_OPC_LIB_ROOT}/include )

-    forte_add_link_directories( ${FORTE_COM_OPC_LIB_ROOT}/lib )

-    forte_add_link_library( OPCClientToolKit.lib )

-  else()

-    # Generate error since OPC only works with Windows

-    MESSAGE(SEND_ERROR "Win32 has to be slected for FORTE_ARCHITECTURE for the OPC Com Layer")

-  endif()  

-endif(FORTE_COM_OPC)

+#    Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation
+#    Tibalt Zhao - Ease the workload to compile OPC DA
+# *******************************************************************************/
+#############################################################################
+# OPC Com Layer
+#############################################################################
+
+forte_add_network_layer(OPC OFF "opc" COpcComLayer opccomlayer "Enable OPC communication")
+SET(FORTE_COM_OPC_LIB_ROOT "" CACHE PATH "Path to OPC library root directory")
+SET(FORTE_COM_OPC_BOOST_ROOT "" CACHE PATH "Path to Boost library root directory")
+
+if(FORTE_COM_OPC)  
+  forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+  
+  forte_add_handler(COpcEventHandler opceventhandler)
+  
+  if("${FORTE_ARCHITECTURE}" STREQUAL "Win32")
+    forte_add_sourcefile_hcpp( opcconnection opcconnectionhandler opceventhandler 
+                   opcconnectionimpl opcprocessvar Cmd_AddConnection 
+                   Cmd_AddOPCProcessVar Cmd_SetProcessVarValue )
+  
+    forte_add_include_directories( ${FORTE_COM_OPC_BOOST_ROOT} )
+    
+    forte_add_include_directories( ${FORTE_COM_OPC_LIB_ROOT}/include )
+    forte_add_link_directories( ${FORTE_COM_OPC_LIB_ROOT}/lib )
+
+    forte_add_link_library( OPCClientToolKit.lib )
+    
+  else()
+    # Generate error since OPC only works with Windows
+    MESSAGE(SEND_ERROR "Win32 has to be slected for FORTE_ARCHITECTURE for the OPC Com Layer")
+  endif()  
+endif(FORTE_COM_OPC)
diff --git a/src/com/opc/opccomlayer.cpp b/src/com/opc/opccomlayer.cpp
index 4bf43d9..8dca31b 100644
--- a/src/com/opc/opccomlayer.cpp
+++ b/src/com/opc/opccomlayer.cpp
@@ -1,13 +1,14 @@
 /*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
+ * Copyright (c) 2012 -2021 AIT, ACIN, fortiss GmbH, Hit robot group

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License 2.0 which is available at

+ * http://www.eclipse.org/legal/epl-2.0.

+ *

  * SPDX-License-Identifier: EPL-2.0

  *

  * Contributors:

  *   Filip Andren, Patrick Smejkal, Alois Zoitl, Martin Melik-Merkumians - initial API and implementation and/or initial documentation

+ *   ys guo - Fix opc module compilation errors and deadlock bug

  *******************************************************************************/

 #include "opccomlayer.h"

 #include "../../arch/devlog.h"

@@ -387,7 +388,7 @@
   }

 

   void COpcComLayer::convertInputData(void *pa_pData, unsigned int pa_nSize){

-    //CIEC_ANY *apoSDs =  static_cast<CIEC_ANY*>(pa_pData);

+    CIEC_ANY *apoSDs =  static_cast<CIEC_ANY*>(pa_pData);

     unsigned int nrSDs = pa_nSize;

     unsigned int sdIndex = 0;

 

@@ -395,11 +396,10 @@
     TOpcProcessVarList::Iterator itEnd = m_lFBInputVars.end();

 

     while(sdIndex < nrSDs && it_var != itEnd){

- //     CIEC_ANY *dataIn = &apoSDs[sdIndex];

+      CIEC_ANY *dataIn = &apoSDs[sdIndex];

       Variant newVariant;

-      //unsigned int valueSize = 0;

 

-    //valueSize = getInputValueSize(dataIn, &newVariant);;

+      getInputValueSize(dataIn, &newVariant);

 

       it_var->setNewValue(newVariant);

 

diff --git a/src/com/opc/opcconnection.cpp b/src/com/opc/opcconnection.cpp
index 32d636a..6aa4810 100644
--- a/src/com/opc/opcconnection.cpp
+++ b/src/com/opc/opcconnection.cpp
@@ -1,13 +1,14 @@
 /*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
+ * Copyright (c) 2012 -2014 AIT, fortiss GmbH, Hit robot group

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License 2.0 which is available at

+ * http://www.eclipse.org/legal/epl-2.0.

+ *

  * SPDX-License-Identifier: EPL-2.0

  *

  * Contributors:

  *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

+ *   ys guo - Fix opc module compilation errors and deadlock bug

  *******************************************************************************/

 #include "opcconnection.h"

 #include "opcconnectionimpl.h"

@@ -156,20 +157,17 @@
     //m_eConnectionEvent = e_Disconnected;

 

   if(!m_bBlockingConnect){

-    m_oSync.lock();

 

     TOpcGroupMapList::Iterator itEnd = m_lOpcGroupMapList.end();

     for(TOpcGroupMapList::Iterator it = m_lOpcGroupMapList.begin(); it != itEnd; ++it){

       m_eventHandler->executeComCallback((*it)->m_nCallbackDesc);

     }

 

-    m_oSync.unlock();

   }

 }

 

 void COpcConnection::response_dataReceived(const char *pa_acGroupName, TItemDataList & pa_lItemDataList){

   // Loop through OpcGroups

-  m_oSync.lock();

   TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

   for(TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin(); it_group != itEnd_group; ++it_group){

 

@@ -213,7 +211,6 @@
       break;

     }

   }

-  m_oSync.unlock();

 }

 

 void COpcConnection::response_itemAdded(COpcProcessVar* pa_pOpcItem){

diff --git a/src/com/opc/opcconnectionhandler.cpp b/src/com/opc/opcconnectionhandler.cpp
index 910b930..8ddddca 100644
--- a/src/com/opc/opcconnectionhandler.cpp
+++ b/src/com/opc/opcconnectionhandler.cpp
@@ -1,18 +1,21 @@
 /*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
+ * Copyright (c) 2012 -2014 AIT, fortiss GmbH, Hit robot group

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License 2.0 which is available at

+ * http://www.eclipse.org/legal/epl-2.0.

+ *

  * SPDX-License-Identifier: EPL-2.0

  *

  * Contributors:

  *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

+ *   ys guo - Fix opc module compilation errors and deadlock bug

  *******************************************************************************/

 #include "opcconnectionhandler.h"

 #include "opcconnection.h"

 #include <extevhandlerhelper.h>

 

+#include "opceventhandler.h"

+#include "commfb.h"

 using namespace forte::com_infra;

 

 DEFINE_SINGLETON(COpcConnectionHandler);

@@ -32,7 +35,7 @@
 

   COpcConnection *newConnection = findOpcConnection(pa_acHost, pa_acServerName);

   if(newConnection == NULL){

-    newConnection = new COpcConnection(pa_acHost, pa_acServerName, getExtEvHandler<COpcEventHandler>(*pa_pComCallback->getCommFB()));

+    newConnection = new COpcConnection(pa_acHost, pa_acServerName, &(getExtEvHandler<COpcEventHandler>(*pa_pComCallback->getCommFB())));

 

     m_lOpcConnectionList.pushBack(newConnection);

   }

diff --git a/src/com/opc/opceventhandler.cpp b/src/com/opc/opceventhandler.cpp
index f2ec4fc..cc40f78 100644
--- a/src/com/opc/opceventhandler.cpp
+++ b/src/com/opc/opceventhandler.cpp
@@ -1,13 +1,14 @@
 /*******************************************************************************

- * Copyright (c) 2012 - 2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
+ * Copyright (c) 2012 - 2014 AIT, fortiss GmbH, Hit robot group

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License 2.0 which is available at

+ * http://www.eclipse.org/legal/epl-2.0.

+ *

  * SPDX-License-Identifier: EPL-2.0

  *

  * Contributors:

  *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

+ *   ys guo - Fix opc module compilation errors and deadlock bug

  *******************************************************************************/

 #include "opceventhandler.h"

 #include "../core/devexec.h"

@@ -22,7 +23,7 @@
 COpcEventHandler::COpcEventHandler(CDeviceExecution& pa_poDeviceExecution) : CExternalEventHandler(pa_poDeviceExecution)  {

   this->start();

   // Sleep to allow new thread to start

-  CThread::sleep(100);

+  CThread::sleepThread(100);

 }

 

 COpcEventHandler::~COpcEventHandler(){

diff --git a/src/com/opc_ua/FBs/LocalizedText2LocalizedText.cpp b/src/com/opc_ua/FBs/LocalizedText2LocalizedText.cpp
index ca9b098..29d443d 100644
--- a/src/com/opc_ua/FBs/LocalizedText2LocalizedText.cpp
+++ b/src/com/opc_ua/FBs/LocalizedText2LocalizedText.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_LocalizedText2LocalizedText::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID) {
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/com/opc_ua/FBs/LocalizedText2LocalizedText.h b/src/com/opc_ua/FBs/LocalizedText2LocalizedText.h
index b99ab23..71ee251 100644
--- a/src/com/opc_ua/FBs/LocalizedText2LocalizedText.h
+++ b/src/com/opc_ua/FBs/LocalizedText2LocalizedText.h
@@ -22,13 +22,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_LocalizedText &IN() {
+  CIEC_LocalizedText &st_IN() {
     return *static_cast<CIEC_LocalizedText*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LocalizedText &OUT() {
+  CIEC_LocalizedText &st_OUT() {
     return *static_cast<CIEC_LocalizedText*>(getDO(0));
   };
 
diff --git a/src/core/fmi/processinterface.h b/src/core/fmi/processinterface.h
index 87b5191..18d0c88 100644
--- a/src/core/fmi/processinterface.h
+++ b/src/core/fmi/processinterface.h
@@ -18,14 +18,6 @@
 #include <string>
 #include <fstream>
 
-#ifdef OUT
-#undef OUT
-#endif
-
-#ifdef IN
-#undef IN
-#endif
-
 class CFMUProcessInterface : public CProcessInterfaceBase{
   public:
     CFMUProcessInterface(CResource *paSrcRes, const SFBInterfaceSpec *paInterfaceSpec, const CStringDictionary::TStringId paInstanceNameId, TForteByte *paFBConnData, TForteByte *paFBVarsData);
diff --git a/src/core/funcbloc.h b/src/core/funcbloc.h
index d89b452..e2a3c51 100644
--- a/src/core/funcbloc.h
+++ b/src/core/funcbloc.h
@@ -520,14 +520,6 @@
  fbBaseClass( pa_poSrcRes, &scm_stFBInterfaceSpec, pa_nInstanceNameId, m_anFBConnData, m_anFBVarsData)
 
 
-#ifdef IN
-#undef IN
-#endif
-
-#ifdef OUT
-#undef OUT
-#endif
-
 #ifdef OPTIONAL
 #undef OPTIONAL
 #endif
diff --git a/src/modules/IEC61131-3/Arithmetic/F_ADD.h b/src/modules/IEC61131-3/Arithmetic/F_ADD.h
index d227228..fb2d006 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_ADD.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_ADD.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_MAGNITUDE &OUT() {

+  CIEC_ANY_MAGNITUDE &st_OUT() {

     return *static_cast<CIEC_ANY_MAGNITUDE*>(getDO(0));
   };
 

@@ -59,7 +59,7 @@
     T &roIn1(static_cast<T&>(IN1()));

     T oIn2;

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(ADD(roIn1,oIn2));

+    st_OUT().saveAssign(ADD(roIn1,oIn2));

   }

 

   virtual ~FORTE_F_ADD(){};
diff --git a/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.cpp b/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.cpp
index a9975ea..b54be06 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_ADD_DT_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = ADD_DT_TIME(IN1(), IN2());

+    st_OUT() = ADD_DT_TIME(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.h b/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.h
index 7dd7c3c..ccdc947 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_ADD_DT_TIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DATE_AND_TIME &OUT() {

+  CIEC_DATE_AND_TIME &st_OUT() {

     return *static_cast<CIEC_DATE_AND_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.cpp b/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.cpp
index 64b8312..89834ae 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_ADD_TOD_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = ADD_TOD_TIME(IN1(), IN2());

+    st_OUT() = ADD_TOD_TIME(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.h b/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.h
index 9521512..8580250 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_ADD_TOD_TIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME_OF_DAY &OUT() {

+  CIEC_TIME_OF_DAY &st_OUT() {

     return *static_cast<CIEC_TIME_OF_DAY*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_DIV.h b/src/modules/IEC61131-3/Arithmetic/F_DIV.h
index afe416b..e36a20e 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_DIV.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_DIV.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_NUM &OUT() {

+  CIEC_ANY_NUM &st_OUT() {

     return *static_cast<CIEC_ANY_NUM*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

 

-    OUT().saveAssign(DIV(oIn1,oIn2));

+    st_OUT().saveAssign(DIV(oIn1,oIn2));

   }

 

   virtual ~FORTE_F_DIV(){};
diff --git a/src/modules/IEC61131-3/Arithmetic/F_DIVTIME.h b/src/modules/IEC61131-3/Arithmetic/F_DIVTIME.h
index 8abaf87..49d8094 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_DIVTIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_DIVTIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

@@ -58,7 +58,7 @@
 

   template<typename T> void calculateValue(){

     T &roIn2(static_cast<T&>(IN2()));

-    OUT().saveAssign(DIVTIME(IN1(), roIn2));

+    st_OUT().saveAssign(DIVTIME(IN1(), roIn2));

   }

 

   virtual ~FORTE_F_DIVTIME(){};

diff --git a/src/modules/IEC61131-3/Arithmetic/F_EXPT.h b/src/modules/IEC61131-3/Arithmetic/F_EXPT.h
index 043542f..52a369a 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_EXPT.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_EXPT.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -60,7 +60,7 @@
     T &roIn1(static_cast<T&>(IN1()));

     T oIn2;

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(EXPT(roIn1,oIn2));

+    st_OUT().saveAssign(EXPT(roIn1,oIn2));

   }

 

   virtual ~FORTE_F_EXPT(){};

diff --git a/src/modules/IEC61131-3/Arithmetic/F_MOD.h b/src/modules/IEC61131-3/Arithmetic/F_MOD.h
index 0c061cb..f237996 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_MOD.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_MOD.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_NUM &OUT() {

+  CIEC_ANY_NUM &st_OUT() {

     return *static_cast<CIEC_ANY_NUM*>(getDO(0));
   };
 

@@ -60,7 +60,7 @@
     T &roIn1(static_cast<T&>(IN1()));

     T oIn2;

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(MOD(roIn1,oIn2));

+    st_OUT().saveAssign(MOD(roIn1,oIn2));

   }

 

   virtual ~FORTE_F_MOD(){};

diff --git a/src/modules/IEC61131-3/Arithmetic/F_MOVE.cpp b/src/modules/IEC61131-3/Arithmetic/F_MOVE.cpp
index 6cd2728..13c1c5c 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_MOVE.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_MOVE.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_MOVE::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyMagnitudeFBHelper<FORTE_F_MOVE>(IN().getDataTypeID(), *this);

+  anyMagnitudeFBHelper<FORTE_F_MOVE>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_MOVE.h b/src/modules/IEC61131-3/Arithmetic/F_MOVE.h
index 944b8cc..83e973e 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_MOVE.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_MOVE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY &IN() {

+  CIEC_ANY &st_IN() {

     return *static_cast<CIEC_ANY*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY &OUT() {

+  CIEC_ANY &st_OUT() {

     return *static_cast<CIEC_ANY*>(getDO(0));
   };
 

@@ -53,8 +53,8 @@
   };
 

   template<typename T> void calculateValue(){

-    T &roIn(static_cast<T&>(IN()));

-    OUT().saveAssign(MOVE(roIn));

+    T &roIn(static_cast<T&>(st_IN()));

+    st_OUT().saveAssign(MOVE(roIn));

   }

 

   virtual ~FORTE_F_MOVE(){};

diff --git a/src/modules/IEC61131-3/Arithmetic/F_MUL.h b/src/modules/IEC61131-3/Arithmetic/F_MUL.h
index eee61ff..3763d2e 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_MUL.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_MUL.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_NUM &OUT() {

+  CIEC_ANY_NUM &st_OUT() {

     return *static_cast<CIEC_ANY_NUM*>(getDO(0));
   };
 

@@ -59,7 +59,7 @@
     T &roIn1(static_cast<T&>(IN1()));

     T oIn2;

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(MUL(roIn1,oIn2));

+    st_OUT().saveAssign(MUL(roIn1,oIn2));

   }

 

   virtual ~FORTE_F_MUL(){};
diff --git a/src/modules/IEC61131-3/Arithmetic/F_MULTIME.h b/src/modules/IEC61131-3/Arithmetic/F_MULTIME.h
index b11ac33..3fc5839 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_MULTIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_MULTIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

@@ -58,7 +58,7 @@
 

   template<typename T> void calculateValue(){

     T &roIn2(static_cast<T&>(IN2()));

-    OUT().saveAssign(MULTIME(IN1(), roIn2));

+    st_OUT().saveAssign(MULTIME(IN1(), roIn2));

   }

 

   virtual ~FORTE_F_MULTIME(){};

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB.h b/src/modules/IEC61131-3/Arithmetic/F_SUB.h
index 8e6f60e..8b1347b 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_MAGNITUDE &OUT() {

+  CIEC_ANY_MAGNITUDE &st_OUT() {

     return *static_cast<CIEC_ANY_MAGNITUDE*>(getDO(0));
   };
 

@@ -59,7 +59,7 @@
     T &roIn1(static_cast<T&>(IN1()));

     T oIn2;

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(SUB(roIn1,oIn2));

+    st_OUT().saveAssign(SUB(roIn1,oIn2));

   }

 

   virtual ~FORTE_F_SUB(){};
diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.cpp b/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.cpp
index 73cf9e2..84f8607 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SUB_DATE_DATE::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SUB_DATE_DATE(IN1(), IN2());

+    st_OUT() = SUB_DATE_DATE(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.h b/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.h
index 3a04aee..9f2bfef 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DATE_DATE.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.cpp b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.cpp
index a7a2e77..650aeb1 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SUB_DT_DT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SUB_DT_DT(IN1(), IN2());

+    st_OUT() = SUB_DT_DT(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.h b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.h
index 94d150f..53a90b0 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_DT.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.cpp b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.cpp
index 4f2c9ef..697ca63 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SUB_DT_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SUB_DT_TIME(IN1(), IN2());

+    st_OUT() = SUB_DT_TIME(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.h b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.h
index c166afe..8c0ce91 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_DT_TIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DATE_AND_TIME &OUT() {

+  CIEC_DATE_AND_TIME &st_OUT() {

     return *static_cast<CIEC_DATE_AND_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.cpp b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.cpp
index dca5169..72c70db 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SUB_TOD_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SUB_TOD_TIME(IN1(), IN2());

+    st_OUT() = SUB_TOD_TIME(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.h b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.h
index 0ae995f..d73bb52 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TIME.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME_OF_DAY &OUT() {

+  CIEC_TIME_OF_DAY &st_OUT() {

     return *static_cast<CIEC_TIME_OF_DAY*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.cpp b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.cpp
index c53085c..5936d8a 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SUB_TOD_TOD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SUB_TOD_TOD(IN1(), IN2());

+    st_OUT() = SUB_TOD_TOD(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.h b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.h
index 2aa0794..8753afe 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_SUB_TOD_TOD.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/F_TRUNC.cpp b/src/modules/IEC61131-3/Arithmetic/F_TRUNC.cpp
index ebf46d1..2a82609 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_TRUNC.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/F_TRUNC.cpp
@@ -44,12 +44,12 @@
 
 void FORTE_F_TRUNC::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    switch(IN().getDataTypeID()){

+    switch(st_IN().getDataTypeID()){

       case CIEC_ANY::e_REAL:

-        OUT().setSignedValue(TRUNC(static_cast<CIEC_REAL &>(IN())));

+        st_OUT().setSignedValue(TRUNC(static_cast<CIEC_REAL &>(st_IN())));

         break;

       default:

-        OUT().setSignedValue(TRUNC(static_cast<CIEC_LREAL &>(IN())));

+        st_OUT().setSignedValue(TRUNC(static_cast<CIEC_LREAL &>(st_IN())));

         break;

     }

     sendOutputEvent(scm_nEventCNFID);
diff --git a/src/modules/IEC61131-3/Arithmetic/F_TRUNC.h b/src/modules/IEC61131-3/Arithmetic/F_TRUNC.h
index c52a9a3..d96e7ef 100644
--- a/src/modules/IEC61131-3/Arithmetic/F_TRUNC.h
+++ b/src/modules/IEC61131-3/Arithmetic/F_TRUNC.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_INT &OUT() {

+  CIEC_ANY_INT &st_OUT() {

     return *static_cast<CIEC_ANY_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Arithmetic/GEN_ADD.cpp b/src/modules/IEC61131-3/Arithmetic/GEN_ADD.cpp
index 6cd308b..ede0235 100644
--- a/src/modules/IEC61131-3/Arithmetic/GEN_ADD.cpp
+++ b/src/modules/IEC61131-3/Arithmetic/GEN_ADD.cpp
@@ -50,7 +50,7 @@
   switch (paEIID){
     case scm_nEventREQID:
 
-      anyMagnitudeFBHelper<GEN_ADD>(OUT().getDataTypeID(), *this);
+      anyMagnitudeFBHelper<GEN_ADD>(st_OUT().getDataTypeID(), *this);
       sendOutputEvent(scm_nEventCNFID);
 
       break;
diff --git a/src/modules/IEC61131-3/Arithmetic/GEN_ADD.h b/src/modules/IEC61131-3/Arithmetic/GEN_ADD.h
index b40a26c..8cfe4c8 100644
--- a/src/modules/IEC61131-3/Arithmetic/GEN_ADD.h
+++ b/src/modules/IEC61131-3/Arithmetic/GEN_ADD.h
@@ -27,7 +27,7 @@
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ANY_MAGNITUDE &OUT() {
+  CIEC_ANY_MAGNITUDE &st_OUT() {
     return *static_cast<CIEC_ANY_MAGNITUDE*>(getDO(0));
   }
 
@@ -62,10 +62,10 @@
       oIn.saveAssign(*static_cast<T*>(getDI(nInputIndex)));
 
       if (0 == nInputIndex) {
-        OUT().saveAssign(oIn);
+        st_OUT().saveAssign(oIn);
       } else {
-        oOut.saveAssign(OUT());
-        OUT().saveAssign(ADD(oOut, oIn));
+        oOut.saveAssign(st_OUT());
+        st_OUT().saveAssign(ADD(oOut, oIn));
       }
     }
   }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_AND.h b/src/modules/IEC61131-3/BitwiseOperators/F_AND.h
index a8f04bd..6be8e83 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_AND.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_AND.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -60,7 +60,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(AND(oIn1, oIn2));

+    st_OUT().saveAssign(AND(oIn1, oIn2));

   }

 

   virtual ~FORTE_F_AND(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_NOT.cpp b/src/modules/IEC61131-3/BitwiseOperators/F_NOT.cpp
index f6322bf..f73870c 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_NOT.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_NOT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_NOT::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyBitFBHelper<FORTE_F_NOT>(IN().getDataTypeID(), *this);

+    anyBitFBHelper<FORTE_F_NOT>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_NOT.h b/src/modules/IEC61131-3/BitwiseOperators/F_NOT.h
index 206a74f..08f8e8a 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_NOT.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_NOT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_BIT &IN() {

+  CIEC_ANY_BIT &st_IN() {

     return *static_cast<CIEC_ANY_BIT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -53,8 +53,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(NOT(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(NOT(oIn));

   }

 

   virtual ~FORTE_F_NOT(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_OR.h b/src/modules/IEC61131-3/BitwiseOperators/F_OR.h
index a615f7b..e8ba591 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_OR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_OR.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -60,7 +60,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(OR(oIn1, oIn2));

+    st_OUT().saveAssign(OR(oIn1, oIn2));

   }

 

   virtual ~FORTE_F_OR(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_ROL.cpp b/src/modules/IEC61131-3/BitwiseOperators/F_ROL.cpp
index 7fd8cfd..7e5adfc 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_ROL.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_ROL.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ROL::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyBitFBHelperWithoutBool<FORTE_F_ROL>(IN().getDataTypeID(), *this);

+  anyBitFBHelperWithoutBool<FORTE_F_ROL>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_ROL.h b/src/modules/IEC61131-3/BitwiseOperators/F_ROL.h
index c950568..4253057 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_ROL.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_ROL.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_BIT &IN() {

+  CIEC_ANY_BIT &st_IN() {

     return *static_cast<CIEC_ANY_BIT*>(getDI(0));
   };
 

@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -64,9 +64,9 @@
     CIEC_UDINT oN;

 #endif //FORTE_USE_64BIT_DATATYPES

 

-    oIn.saveAssign(IN());

+    oIn.saveAssign(st_IN());

     oN.saveAssign(N());

-    OUT().saveAssign(ROL(oIn, oN));

+    st_OUT().saveAssign(ROL(oIn, oN));

   }

 

   virtual ~FORTE_F_ROL(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_ROR.cpp b/src/modules/IEC61131-3/BitwiseOperators/F_ROR.cpp
index e3e1f9a..3840d22 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_ROR.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_ROR.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ROR::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyBitFBHelperWithoutBool<FORTE_F_ROR>(IN().getDataTypeID(), *this);

+  anyBitFBHelperWithoutBool<FORTE_F_ROR>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_ROR.h b/src/modules/IEC61131-3/BitwiseOperators/F_ROR.h
index a1c53da..535153d 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_ROR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_ROR.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_BIT &IN() {

+  CIEC_ANY_BIT &st_IN() {

     return *static_cast<CIEC_ANY_BIT*>(getDI(0));
   };
 

@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -63,9 +63,9 @@
 #else // FORTE_USE_64BIT_DATATYPES

     CIEC_UDINT oN;

 #endif // FORTE_USE_64BIT_DATATYPES

-    oIn.saveAssign(IN());

+    oIn.saveAssign(st_IN());

     oN.saveAssign(N());

-    OUT().saveAssign(ROR(oIn, oN));

+    st_OUT().saveAssign(ROR(oIn, oN));

   }

 

   virtual ~FORTE_F_ROR(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_SHL.cpp b/src/modules/IEC61131-3/BitwiseOperators/F_SHL.cpp
index ea1e4cf..66b4b13 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_SHL.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_SHL.cpp
@@ -43,7 +43,7 @@
 

  void FORTE_F_SHL::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyBitFBHelperWithoutBool<FORTE_F_SHL>(IN().getDataTypeID(), *this);

+    anyBitFBHelperWithoutBool<FORTE_F_SHL>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_SHL.h b/src/modules/IEC61131-3/BitwiseOperators/F_SHL.h
index 67c2d83..e4c6150 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_SHL.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_SHL.h
@@ -21,7 +21,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_BIT &IN() {

+  CIEC_ANY_BIT &st_IN() {

     return *static_cast<CIEC_ANY_BIT*>(getDI(0));
   };
 

@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -62,9 +62,9 @@
 #else //FORTE_USE_64BIT_DATATYPES

       CIEC_UDINT oN;

 #endif //FORTE_USE_64BIT_DATATYPES

-    oIn.saveAssign(IN());

+    oIn.saveAssign(st_IN());

     oN.saveAssign(N());

-    OUT().saveAssign(SHL(oIn, oN));

+    st_OUT().saveAssign(SHL(oIn, oN));

   }

 

   virtual ~FORTE_F_SHL(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_SHR.cpp b/src/modules/IEC61131-3/BitwiseOperators/F_SHR.cpp
index 5d882c9..e699923 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_SHR.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_SHR.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_SHR::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyBitFBHelperWithoutBool<FORTE_F_SHR>(IN().getDataTypeID(), *this);

+  anyBitFBHelperWithoutBool<FORTE_F_SHR>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_SHR.h b/src/modules/IEC61131-3/BitwiseOperators/F_SHR.h
index 26c3e9b..314022c 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_SHR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_SHR.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_BIT &IN() {

+  CIEC_ANY_BIT &st_IN() {

     return *static_cast<CIEC_ANY_BIT*>(getDI(0));
   };
 

@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -63,9 +63,9 @@
 #else //FORTE_USE_64BIT_DATATYPES

       CIEC_UDINT oN;

 #endif //FORTE_USE_64BIT_DATATYPES

-    oIn.saveAssign(IN());

+    oIn.saveAssign(st_IN());

     oN.saveAssign(N());

-    OUT().saveAssign(SHR(oIn, oN));

+    st_OUT().saveAssign(SHR(oIn, oN));

   }

 

   virtual ~FORTE_F_SHR(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/F_XOR.h b/src/modules/IEC61131-3/BitwiseOperators/F_XOR.h
index 5661239..179664d 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/F_XOR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/F_XOR.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_BIT &OUT() {

+  CIEC_ANY_BIT &st_OUT() {

     return *static_cast<CIEC_ANY_BIT*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(XOR(oIn1, oIn2));

+    st_OUT().saveAssign(XOR(oIn1, oIn2));

   }

 

   virtual ~FORTE_F_XOR(){};

diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.cpp b/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.cpp
index c540647..086e8f4 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.cpp
@@ -33,7 +33,7 @@
   switch (paEIID) {
   case scm_nEventREQID:
 
-    anyBitFBHelper<GEN_AND>(OUT().getDataTypeID(), *this);
+    anyBitFBHelper<GEN_AND>(st_OUT().getDataTypeID(), *this);
     sendOutputEvent(scm_nEventCNFID);
 
     break;
diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.h b/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.h
index 37fed1f..7fd4b83 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_AND.h
@@ -36,10 +36,10 @@
     for (unsigned int nInputIndex = 0; nInputIndex < getFBInterfaceSpec()->m_nNumDIs; nInputIndex++) {
       oIn.saveAssign(*static_cast<T*>(getDI(nInputIndex)));
       if (0 == nInputIndex) {
-        OUT().saveAssign(oIn);
+        st_OUT().saveAssign(oIn);
       } else {
-        oOut.saveAssign(OUT());
-        OUT().saveAssign(AND(oOut, oIn));
+        oOut.saveAssign(st_OUT());
+        st_OUT().saveAssign(AND(oOut, oIn));
       }
     }
   }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.cpp b/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.cpp
index 9a2706a..316a44b 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.cpp
@@ -32,7 +32,7 @@
   switch (paEIID) {
   case scm_nEventREQID:
 
-    anyBitFBHelper<GEN_OR>(OUT().getDataTypeID(), *this);
+    anyBitFBHelper<GEN_OR>(st_OUT().getDataTypeID(), *this);
     sendOutputEvent(scm_nEventCNFID);
 
     break;
diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.h b/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.h
index 5a16a7f..af7df37 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_OR.h
@@ -39,10 +39,10 @@
       oIn.saveAssign(*static_cast<T*>(getDI(nInputIndex)));
 
       if (0 == nInputIndex) {
-        OUT().saveAssign(oIn);
+        st_OUT().saveAssign(oIn);
       } else {
-        oOut.saveAssign(OUT());
-        OUT().saveAssign(OR(oOut, oIn));
+        oOut.saveAssign(st_OUT());
+        st_OUT().saveAssign(OR(oOut, oIn));
       }
     }
   }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.cpp b/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.cpp
index ce230f0..9d05130 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.cpp
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.cpp
@@ -33,7 +33,7 @@
   switch (paEIID) {
   case scm_nEventREQID:
 
-    anyBitFBHelper<GEN_XOR>(OUT().getDataTypeID(), *this);
+    anyBitFBHelper<GEN_XOR>(st_OUT().getDataTypeID(), *this);
     sendOutputEvent(scm_nEventCNFID);
 
     break;
diff --git a/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.h b/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.h
index 2844d79..d0e029e 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/GEN_XOR.h
@@ -41,7 +41,7 @@
        * iff (if and only if) one of the boolean
        * inputs is set to 'true'.
        */
-      if(CIEC_ANY::e_BOOL == OUT().getDataTypeID()){
+      if(CIEC_ANY::e_BOOL == st_OUT().getDataTypeID()){
         unsigned int nInputSet = 0;
         for(unsigned int nInputIndex = 0; nInputIndex < getFBInterfaceSpec()->m_nNumDIs; nInputIndex++){
           oIn.saveAssign(*static_cast<T*>(getDI(nInputIndex)));
@@ -49,7 +49,7 @@
           nInputSet = oIn ? nInputSet + 1 : nInputSet;
         }
 
-        OUT().saveAssign(static_cast<T>(1 == nInputSet));
+        st_OUT().saveAssign(static_cast<T>(1 == nInputSet));
       }
 
       /*
@@ -66,11 +66,11 @@
           oIn.saveAssign(*static_cast<T*>(getDI(nInputIndex)));
 
           if(0 == nInputIndex){
-            OUT().saveAssign(oIn);
+            st_OUT().saveAssign(oIn);
           }
           else{
-            oOut.saveAssign(OUT());
-            OUT().saveAssign(XOR(oOut, oIn));
+            oOut.saveAssign(st_OUT());
+            st_OUT().saveAssign(XOR(oOut, oIn));
           }
         }
       }
diff --git a/src/modules/IEC61131-3/BitwiseOperators/genbitbase.h b/src/modules/IEC61131-3/BitwiseOperators/genbitbase.h
index 7e84610..7537bc6 100644
--- a/src/modules/IEC61131-3/BitwiseOperators/genbitbase.h
+++ b/src/modules/IEC61131-3/BitwiseOperators/genbitbase.h
@@ -21,7 +21,7 @@
     CGenBitBase(const CStringDictionary::TStringId paInstanceNameId, CResource *paSrcRes);
     virtual ~CGenBitBase();
 
-    CIEC_ANY_BIT &OUT(){
+    CIEC_ANY_BIT &st_OUT(){
       return *static_cast<CIEC_ANY_BIT*>(getDO(0));
     }
 
diff --git a/src/modules/IEC61131-3/CharacterString/F_CONCAT.h b/src/modules/IEC61131-3/CharacterString/F_CONCAT.h
index 78ae710..42a5ee5 100644
--- a/src/modules/IEC61131-3/CharacterString/F_CONCAT.h
+++ b/src/modules/IEC61131-3/CharacterString/F_CONCAT.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(CONCAT(oIn1,oIn2));

+    st_OUT().saveAssign(CONCAT(oIn1,oIn2));

   }

 

   virtual ~FORTE_F_CONCAT(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.cpp b/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.cpp
index 8475a7c..5bb4a73 100644
--- a/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_CONCAT_DATE_TOD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = CONCAT_DATE_TOD(IN1(), IN2());

+    st_OUT() = CONCAT_DATE_TOD(IN1(), IN2());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.h b/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.h
index 7d629cd..22f4c8a 100644
--- a/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.h
+++ b/src/modules/IEC61131-3/CharacterString/F_CONCAT_DATE_TOD.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DATE_AND_TIME &OUT() {

+  CIEC_DATE_AND_TIME &st_OUT() {

     return *static_cast<CIEC_DATE_AND_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/CharacterString/F_DELETE.cpp b/src/modules/IEC61131-3/CharacterString/F_DELETE.cpp
index 52ae1b9..796a8bf 100644
--- a/src/modules/IEC61131-3/CharacterString/F_DELETE.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_DELETE.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_DELETE::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyStringFBHelper<FORTE_F_DELETE>(IN().getDataTypeID(), *this);

+    anyStringFBHelper<FORTE_F_DELETE>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/CharacterString/F_DELETE.h b/src/modules/IEC61131-3/CharacterString/F_DELETE.h
index 09be27f..3e8866d 100644
--- a/src/modules/IEC61131-3/CharacterString/F_DELETE.h
+++ b/src/modules/IEC61131-3/CharacterString/F_DELETE.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_STRING &IN() {

+  CIEC_ANY_STRING &st_IN() {

     return *static_cast<CIEC_ANY_STRING*>(getDI(0));
   };
 

@@ -36,7 +36,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -62,8 +62,8 @@
 

   template<typename T> void calculateValueString(){

      T oIn1;

-     oIn1.saveAssign(IN());

-     OUT().saveAssign(DELETE(oIn1,L(),P()));

+     oIn1.saveAssign(st_IN());

+     st_OUT().saveAssign(DELETE(oIn1,L(),P()));

    }

 

   virtual ~FORTE_F_DELETE(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_FIND.cpp b/src/modules/IEC61131-3/CharacterString/F_FIND.cpp
index 572c001..e1fb356 100644
--- a/src/modules/IEC61131-3/CharacterString/F_FIND.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_FIND.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_FIND::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    OUT().setSignedValue(FIND(IN1(),IN2()).getSignedValue());

+    st_OUT().setSignedValue(FIND(IN1(),IN2()).getSignedValue());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/CharacterString/F_FIND.h b/src/modules/IEC61131-3/CharacterString/F_FIND.h
index d759c7b..6056bf6 100644
--- a/src/modules/IEC61131-3/CharacterString/F_FIND.h
+++ b/src/modules/IEC61131-3/CharacterString/F_FIND.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_INT &OUT() {

+  CIEC_ANY_INT &st_OUT() {

     return *static_cast<CIEC_ANY_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/CharacterString/F_INSERT.h b/src/modules/IEC61131-3/CharacterString/F_INSERT.h
index 6b7e1d0..db19b61 100644
--- a/src/modules/IEC61131-3/CharacterString/F_INSERT.h
+++ b/src/modules/IEC61131-3/CharacterString/F_INSERT.h
@@ -36,7 +36,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -65,7 +65,7 @@
      T oIn2;

      oIn1.saveAssign(IN1());

      oIn2.saveAssign(IN2());

-     OUT().saveAssign(INSERT(oIn1,oIn2,P()));

+     st_OUT().saveAssign(INSERT(oIn1,oIn2,P()));

    }

 

   virtual ~FORTE_F_INSERT(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_LEFT.cpp b/src/modules/IEC61131-3/CharacterString/F_LEFT.cpp
index e63458c..726fbe9 100644
--- a/src/modules/IEC61131-3/CharacterString/F_LEFT.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_LEFT.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_LEFT::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyStringFBHelper<FORTE_F_LEFT>(IN().getDataTypeID(), *this);

+    anyStringFBHelper<FORTE_F_LEFT>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/CharacterString/F_LEFT.h b/src/modules/IEC61131-3/CharacterString/F_LEFT.h
index 492dbdd..7b44b0d 100644
--- a/src/modules/IEC61131-3/CharacterString/F_LEFT.h
+++ b/src/modules/IEC61131-3/CharacterString/F_LEFT.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_STRING &IN() {

+  CIEC_ANY_STRING &st_IN() {

     return *static_cast<CIEC_ANY_STRING*>(getDI(0));
   };
 

@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -57,8 +57,8 @@
   };

 

   template<typename T> void calculateValueString(){

-    T &roIn(static_cast<T&>(IN()));

-    OUT().saveAssign(LEFT(roIn,L()));

+    T &roIn(static_cast<T&>(st_IN()));

+    st_OUT().saveAssign(LEFT(roIn,L()));

   }

 

   virtual ~FORTE_F_LEFT(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_LEN.cpp b/src/modules/IEC61131-3/CharacterString/F_LEN.cpp
index 7bcdaa4..f6a538c 100644
--- a/src/modules/IEC61131-3/CharacterString/F_LEN.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_LEN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_LEN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyElementaryFBHelper<FORTE_F_LEN>(IN().getDataTypeID(), *this);

+  anyElementaryFBHelper<FORTE_F_LEN>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/CharacterString/F_LEN.h b/src/modules/IEC61131-3/CharacterString/F_LEN.h
index 8ffeb06..12b52fc 100644
--- a/src/modules/IEC61131-3/CharacterString/F_LEN.h
+++ b/src/modules/IEC61131-3/CharacterString/F_LEN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_STRING &IN() {

+  CIEC_ANY_STRING &st_IN() {

     return *static_cast<CIEC_ANY_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_INT &OUT() {

+  CIEC_ANY_INT &st_OUT() {

     return *static_cast<CIEC_ANY_INT*>(getDO(0));
   };
 

@@ -53,12 +53,12 @@
   };
 

   template<typename T> void calculateValue(){

-    OUT().saveAssign(CIEC_UDINT(0));

+    st_OUT().saveAssign(CIEC_UDINT(0));

   }

 

   template<typename T> void calculateValueString(){

-    T &roIn(static_cast<T&>(IN()));

-    OUT().saveAssign(LEN(roIn));

+    T &roIn(static_cast<T&>(st_IN()));

+    st_OUT().saveAssign(LEN(roIn));

   }

 

   virtual ~FORTE_F_LEN(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_MID.cpp b/src/modules/IEC61131-3/CharacterString/F_MID.cpp
index 16e5ee4..5397d28 100644
--- a/src/modules/IEC61131-3/CharacterString/F_MID.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_MID.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_MID::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyStringFBHelper<FORTE_F_MID>(IN().getDataTypeID(), *this);

+    anyStringFBHelper<FORTE_F_MID>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/CharacterString/F_MID.h b/src/modules/IEC61131-3/CharacterString/F_MID.h
index 0b7ce20..d8bfbba 100644
--- a/src/modules/IEC61131-3/CharacterString/F_MID.h
+++ b/src/modules/IEC61131-3/CharacterString/F_MID.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_STRING &IN() {

+  CIEC_ANY_STRING &st_IN() {

     return *static_cast<CIEC_ANY_STRING*>(getDI(0));
   };
 

@@ -36,7 +36,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -61,8 +61,8 @@
   };
 

   template<typename T> void calculateValueString(){

-    T &roIn(static_cast<T&>(IN()));

-    OUT().saveAssign(MID(roIn,L(),P()));

+    T &roIn(static_cast<T&>(st_IN()));

+    st_OUT().saveAssign(MID(roIn,L(),P()));

   }

 

   virtual ~FORTE_F_MID(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_REPLACE.h b/src/modules/IEC61131-3/CharacterString/F_REPLACE.h
index 93e3cf9..d3b4ad1 100644
--- a/src/modules/IEC61131-3/CharacterString/F_REPLACE.h
+++ b/src/modules/IEC61131-3/CharacterString/F_REPLACE.h
@@ -40,7 +40,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -69,7 +69,7 @@
      oIn1.saveAssign(IN1());

      T oIn2;

      oIn2.saveAssign(IN2());

-     OUT().saveAssign(REPLACE(oIn1,oIn2,L(),P()));

+     st_OUT().saveAssign(REPLACE(oIn1,oIn2,L(),P()));

    }

 

   virtual ~FORTE_F_REPLACE(){};

diff --git a/src/modules/IEC61131-3/CharacterString/F_RIGHT.cpp b/src/modules/IEC61131-3/CharacterString/F_RIGHT.cpp
index 42e892d..31c4695 100644
--- a/src/modules/IEC61131-3/CharacterString/F_RIGHT.cpp
+++ b/src/modules/IEC61131-3/CharacterString/F_RIGHT.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_RIGHT::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyStringFBHelper<FORTE_F_RIGHT>(IN().getDataTypeID(), *this);

+    anyStringFBHelper<FORTE_F_RIGHT>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/CharacterString/F_RIGHT.h b/src/modules/IEC61131-3/CharacterString/F_RIGHT.h
index d9021c2..24b8d7a 100644
--- a/src/modules/IEC61131-3/CharacterString/F_RIGHT.h
+++ b/src/modules/IEC61131-3/CharacterString/F_RIGHT.h
@@ -22,7 +22,7 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_STRING &IN() {

+  CIEC_ANY_STRING &st_IN() {

     return *static_cast<CIEC_ANY_STRING*>(getDI(0));
   };
 

@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_STRING &OUT() {

+  CIEC_ANY_STRING &st_OUT() {

     return *static_cast<CIEC_ANY_STRING*>(getDO(0));
   };
 

@@ -57,8 +57,8 @@
   };
 

   template<typename T> void calculateValueString(){

-    T &roIn(static_cast<T&>(IN()));

-    OUT().saveAssign(RIGHT(roIn,L()));

+    T &roIn(static_cast<T&>(st_IN()));

+    st_OUT().saveAssign(RIGHT(roIn,L()));

   }

 

   virtual ~FORTE_F_RIGHT(){};

diff --git a/src/modules/IEC61131-3/Comparison/F_EQ.h b/src/modules/IEC61131-3/Comparison/F_EQ.h
index 845d5ca..c3f4764 100644
--- a/src/modules/IEC61131-3/Comparison/F_EQ.h
+++ b/src/modules/IEC61131-3/Comparison/F_EQ.h
@@ -35,7 +35,7 @@
 

     static const CStringDictionary::TStringId scm_anDataOutputNames[];

     static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &OUT(){

+    CIEC_BOOL &st_OUT(){

       return *static_cast<CIEC_BOOL*>(getDO(0));

     }

     ;

@@ -68,7 +68,7 @@
     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

 

-    OUT().saveAssign(EQ(oIn1, oIn2));

+    st_OUT().saveAssign(EQ(oIn1, oIn2));

   }

 

   template<typename T> void calculateValueString() {

diff --git a/src/modules/IEC61131-3/Comparison/F_GE.h b/src/modules/IEC61131-3/Comparison/F_GE.h
index 1752773..c556d22 100644
--- a/src/modules/IEC61131-3/Comparison/F_GE.h
+++ b/src/modules/IEC61131-3/Comparison/F_GE.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(GE(oIn1, oIn2));

+    st_OUT().saveAssign(GE(oIn1, oIn2));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Comparison/F_GT.h b/src/modules/IEC61131-3/Comparison/F_GT.h
index 0705a46..3400317 100644
--- a/src/modules/IEC61131-3/Comparison/F_GT.h
+++ b/src/modules/IEC61131-3/Comparison/F_GT.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));

   };

 

@@ -64,7 +64,7 @@
       oIn1.saveAssign(IN1());

       oIn2.saveAssign(IN2());

 

-      OUT().saveAssign(GT(oIn1, oIn2));

+      st_OUT().saveAssign(GT(oIn1, oIn2));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Comparison/F_LE.h b/src/modules/IEC61131-3/Comparison/F_LE.h
index 949e382..8ddde8b 100644
--- a/src/modules/IEC61131-3/Comparison/F_LE.h
+++ b/src/modules/IEC61131-3/Comparison/F_LE.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
      T oIn2;

      oIn1.saveAssign(IN1());

      oIn2.saveAssign(IN2());

-     OUT().saveAssign(LE(oIn1, oIn2));

+     st_OUT().saveAssign(LE(oIn1, oIn2));

    }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Comparison/F_LT.h b/src/modules/IEC61131-3/Comparison/F_LT.h
index 39f445e..6ee8dbf 100644
--- a/src/modules/IEC61131-3/Comparison/F_LT.h
+++ b/src/modules/IEC61131-3/Comparison/F_LT.h
@@ -32,7 +32,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

@@ -61,7 +61,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(LT(oIn1, oIn2));

+    st_OUT().saveAssign(LT(oIn1, oIn2));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Comparison/F_NE.h b/src/modules/IEC61131-3/Comparison/F_NE.h
index c7b87fb..dde4bed 100644
--- a/src/modules/IEC61131-3/Comparison/F_NE.h
+++ b/src/modules/IEC61131-3/Comparison/F_NE.h
@@ -33,7 +33,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

@@ -62,7 +62,7 @@
     T oIn2;

     oIn1.saveAssign(IN1());

     oIn2.saveAssign(IN2());

-    OUT().saveAssign(NE(oIn1, oIn2));

+    st_OUT().saveAssign(NE(oIn1, oIn2));

   }

 

   template<typename T> void calculateValueString() {

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.cpp
index dc03e70..b27d57c 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_BCD_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = BYTE_BCD_TO_USINT(IN());

+    st_OUT() = BYTE_BCD_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.h b/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.h
index f34df81..1c141d4 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_BYTE_BCD_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.cpp
index 40af215..82e675f 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_BCD_TO_UDINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DWORD_BCD_TO_UDINT(IN());

+    st_OUT() = DWORD_BCD_TO_UDINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.h
index b72e3d1..323a6a7 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_DWORD_BCD_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.cpp
index 68ce1a7..1e88ca3 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_BCD_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LWORD_BCD_TO_ULINT(IN());

+    st_OUT() = LWORD_BCD_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.h
index e72cb90..5ef7012 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_LWORD_BCD_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.cpp
index 71d7072..aed2ac6 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_BCD_DWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = UDINT_TO_BCD_DWORD(IN());

+    st_OUT() = UDINT_TO_BCD_DWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.h b/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.h
index f34a786..02d4cf5 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_UDINT_TO_BCD_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.cpp
index f21d377..aa6e1f8 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UINT_TO_BCD_WORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = UINT_TO_BCD_WORD(IN());

+    st_OUT() = UINT_TO_BCD_WORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.h b/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.h
index 7ffe9b0..cf61109 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_UINT_TO_BCD_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.cpp
index 7e0afd4..30faf7b 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_ULINT_TO_BCD_LWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = ULINT_TO_BCD_LWORD(IN());

+    st_OUT() = ULINT_TO_BCD_LWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.h b/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.h
index 8bb6d62..4f53721 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_ULINT_TO_BCD_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.cpp
index b19f31a..fc925b1 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_USINT_TO_BCD_BYTE::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = USINT_TO_BCD_BYTE(IN());

+    st_OUT() = USINT_TO_BCD_BYTE(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.h b/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.h
index 170c0c7..016131e 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_USINT_TO_BCD_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.cpp
index eaa25e4..eb829f0 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WORD_BCD_TO_UINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WORD_BCD_TO_UINT(IN());

+    st_OUT() = WORD_BCD_TO_UINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.h b/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.h
index 76975c8..6899621 100644
--- a/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/BCD/F_WORD_BCD_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.cpp
index f4c828d..63618da 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_BYTE(IN());
+    st_OUT() = BOOL_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.h
index 14b106c..74325c6 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.cpp
index b5cb607..dc2fb1c 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_DINT(IN());
+    st_OUT() = BOOL_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.h
index f1a123f..e011c0d 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.cpp
index 3cea87e..2e464fa 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_DWORD(IN());
+    st_OUT() = BOOL_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.h
index a7eb8f5..ded2ec3 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.cpp
index cabf0ef..acc24f6 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_INT(IN());
+    st_OUT() = BOOL_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.h
index eebfa6a..b3035c6 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.cpp
index a7e7bb2..eec7b70 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_LINT(IN());
+    st_OUT() = BOOL_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.h
index f808acb..eb7bdfe 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.cpp
index 1d4fa61..875a0b2 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_LWORD(IN());
+    st_OUT() = BOOL_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.h
index 282e6e1..b003b25 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.cpp
index 461ccf2..0971f55 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_SINT(IN());
+    st_OUT() = BOOL_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.h
index 3b5aebd..7b75145 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.cpp
index 1b1d484..3ed4e58 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_STRING(IN());
+    st_OUT() = BOOL_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.h
index c08198f..88e19cd 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.cpp
index 432c5bd..34b695e 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_UDINT(IN());
+    st_OUT() = BOOL_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.h
index e84fcec..b00ba18 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.cpp
index fdf6454..709869e 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_UINT(IN());
+    st_OUT() = BOOL_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.h
index 6538f03..3e4062e 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.cpp
index 792df03..6c8fc8c 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = BOOL_TO_ULINT(IN());

+    st_OUT() = BOOL_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.h
index 445ac39..b2a8c66 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.cpp
index ffb0d82..d54dcf7 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_USINT(IN());
+    st_OUT() = BOOL_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.h
index 664de5f..0768ee5 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.cpp
index 4329720..5a4982e 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BOOL_TO_WORD(IN());
+    st_OUT() = BOOL_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.h
index 3c6012a..c9827a7 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.cpp
index 7ba480f..c144989 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BOOL_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = BOOL_TO_WSTRING(IN());

+    st_OUT() = BOOL_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.h
index ecab09a..7d4a0ba 100644
--- a/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/BOOL/F_BOOL_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.cpp
index 0b68797..5f1ceb7 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_DINT(IN());
+    st_OUT() = BYTE_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.h
index 764508c..a85d0f0 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.cpp
index 75ba179..4fae76a 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_DWORD(IN());
+    st_OUT() = BYTE_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.h
index 3574418..ca4fc86 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.cpp
index a2d5556..e992ebc 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_INT(IN());
+    st_OUT() = BYTE_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.h
index 62b7fde..71a6941 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.cpp
index 784b2dd..f7358ad 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_LINT(IN());
+    st_OUT() = BYTE_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.h
index c9407a0..3124136 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.cpp
index 158fc1e..bc90030 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_LWORD(IN());
+    st_OUT() = BYTE_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.h
index 312c6c9..ef98818 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.cpp
index beba762..e14aa89 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_SINT(IN());
+    st_OUT() = BYTE_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.h
index 62177e0..9c6b870 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.cpp
index 742fe89..0d19baa 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_STRING(IN());
+    st_OUT() = BYTE_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.h
index 2c9826d..4588c10 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.cpp
index 2f0e803..d62f66b 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_UDINT(IN());
+    st_OUT() = BYTE_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.h
index 68fca9d..04d6410 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.cpp
index 9f0f26a..af8def7 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_BYTE_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_UINT(IN());
+    st_OUT() = BYTE_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.h
index 75d67b1..34e09f0 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.cpp
index 6ab95a7..42f065b 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_ULINT(IN());
+    st_OUT() = BYTE_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.h
index c36c563..ba22683 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.cpp
index d352b9a..7ba265a 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_USINT(IN());
+    st_OUT() = BYTE_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.h
index be7033c..441837e 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.cpp
index 1cc3591..cfbbc8a 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = BYTE_TO_WORD(IN());
+    st_OUT() = BYTE_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.h
index 131057a..ae9ec4a 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.cpp
index f1ca7ce..cbc2356 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_BYTE_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = BYTE_TO_WSTRING(IN());

+    st_OUT() = BYTE_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.h
index 4abae0b..ceb7c00 100644
--- a/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/BYTE/F_BYTE_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BYTE &IN() {

+  CIEC_BYTE &st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.cpp
index ce1db2d..1f17411 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_BYTE(IN());
+    st_OUT() = DINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.h
index c6257eb..c742af8 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.cpp
index e3b2008..8c7c707 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_DWORD(IN());
+    st_OUT() = DINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.h
index a95cf3c..13bb51c 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.cpp
index 80579a9..bfb1c29 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_INT(IN());
+    st_OUT() = DINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.h
index c1c4ec4..82a3670 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.cpp
index 501017f..d68ef2e 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_LINT(IN());
+    st_OUT() = DINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.h
index 150ce96..b231132 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.cpp
index 7000e73..aaa2459 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_LREAL(IN());
+    st_OUT() = DINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.h
index 65126d6..6d042cd 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.cpp
index 7cd3973..91ba109 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_LWORD(IN());
+    st_OUT() = DINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.h
index f6eb30d..9f9d240 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.cpp
index 4cfe812..38a0dd1 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_DINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_REAL(IN());
+    st_OUT() = DINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.h
index a4e6f23..626165e 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_REAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.cpp
index 2e82a20..aa652a6 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_SINT(IN());
+    st_OUT() = DINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.h
index 45e4833..ffcfdc1 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.cpp
index ae15d4e..841fe33 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_STRING(IN());
+    st_OUT() = DINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.h
index 26878e8..882fe8b 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.cpp
index 0b03d05..7d5e2e6 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_UDINT(IN());
+    st_OUT() = DINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.h
index 35fec53..4ebe9f5 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.cpp
index 5f131e3..bde0bb0 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_UINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DINT_TO_UINT(IN());

+    st_OUT() = DINT_TO_UINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.h
index d5b70fe..5487f29 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.cpp
index 9225b36..4909801 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_ULINT(IN());
+    st_OUT() = DINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.h
index bbed02b..db19a21 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.cpp
index 94adf67..2feb3db 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_USINT(IN());
+    st_OUT() = DINT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.h
index 5f206cd..35bc9d3 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.cpp
index 834b38e..ae98a31 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DINT_TO_WORD(IN());
+    st_OUT() = DINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.h
index 938f040..42df46e 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.cpp
index 54446b9..2de6b25 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DINT_TO_WSTRING(IN());

+    st_OUT() = DINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.h
index e1a2871..ca81a5d 100644
--- a/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/DINT/F_DINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DINT &IN() {

+  CIEC_DINT &st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.cpp b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.cpp
index 9ccc9ce..afcb304 100644
--- a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.cpp
+++ b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DT_TO_DATE::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DT_TO_DATE(IN());

+    st_OUT() = DT_TO_DATE(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.h b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.h
index 6c57d35..08f3c46 100644
--- a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.h
+++ b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_DATE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DATE_AND_TIME &IN() {

+  CIEC_DATE_AND_TIME &st_IN() {

     return *static_cast<CIEC_DATE_AND_TIME*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DATE &OUT() {

+  CIEC_DATE &st_OUT() {

     return *static_cast<CIEC_DATE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.cpp b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.cpp
index 351e88b..0748fce 100644
--- a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DT_TO_TOD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DT_TO_TOD(IN());

+    st_OUT() = DT_TO_TOD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.h b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.h
index 483c9d7..e03ddfc 100644
--- a/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.h
+++ b/src/modules/IEC61131-3/Conversion/DT/F_DT_TO_TOD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DATE_AND_TIME &IN() {

+  CIEC_DATE_AND_TIME &st_IN() {

     return *static_cast<CIEC_DATE_AND_TIME*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME_OF_DAY &OUT() {

+  CIEC_TIME_OF_DAY &st_OUT() {

     return *static_cast<CIEC_TIME_OF_DAY*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.cpp
index f652347..70a8baa 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_BYTE(IN());
+    st_OUT() = DWORD_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.h
index c172287..96029f3 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.cpp
index 3643f90..e101fbb 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_DINT(IN());
+    st_OUT() = DWORD_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.h
index 6e460d0..44952ec 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.cpp
index 6c6d699..29e8369 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_INT(IN());
+    st_OUT() = DWORD_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.h
index 080a407..53c340f 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.cpp
index 1887dd3..d13ea50 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_LINT(IN());
+    st_OUT() = DWORD_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.h
index 867ab8b..ba38c24 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.cpp
index 89695f4..bd0c695 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_LWORD(IN());
+    st_OUT() = DWORD_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.h
index c0c250f..fb3a807 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.cpp
index b222835..71d3282 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_DWORD_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_REAL(IN());
+    st_OUT() = DWORD_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.h
index 5c2a776..9fb288c 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.cpp
index a26a36c..fba2eeb 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_SINT(IN());
+    st_OUT() = DWORD_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.h
index fea14d5..5754cbe 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.cpp
index 479a226..937e1e2 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() =DWORD_TO_STRING(IN());
+    st_OUT() =DWORD_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.h
index 8083e63..f4c1cf9 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.cpp
index 0e5d515..5cc367d 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_UDINT(IN());
+    st_OUT() = DWORD_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.h
index 9f5d2b5..bb7a24a 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.cpp
index c930651..0949ce2 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_UINT(IN());
+    st_OUT() = DWORD_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.h
index 9cf12c4..1028767 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.cpp
index 703dac7..63ff8ea 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_ULINT(IN());
+    st_OUT() = DWORD_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.h
index e8db4d8..5bb9110 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.cpp
index 8774595..bc3eb3f 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_USINT(IN());
+    st_OUT() = DWORD_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.h
index bd2c1e7..70b7901 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.cpp
index f1e49e4..38f39a1 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = DWORD_TO_WORD(IN());
+    st_OUT() = DWORD_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.h
index 37de6d8..b4e4966 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.cpp
index 2bfd4f3..901142e 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_DWORD_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = DWORD_TO_WSTRING(IN());

+    st_OUT() = DWORD_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.h
index 899e39a..0227dfc 100644
--- a/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.cpp
index 3bcbab5..e9a0c0f 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_BYTE(IN());
+    st_OUT() = INT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.h
index 020ba7e..1b17e2d 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.cpp
index 48f25ba..e476f00 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_DINT(IN());
+    st_OUT() = INT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.h
index 03f0c5e..60e828c 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.cpp
index c2c95c6..1983bd7 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_DWORD(IN());
+    st_OUT() = INT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.h
index 4b53ae3..ae58582 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.cpp
index 7931d16..2ee2c1e 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_LINT(IN());
+    st_OUT() = INT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.h
index c354643..42ab31f 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.cpp
index 4cebbe7..5710747 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_INT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_LREAL(IN());
+    st_OUT() = INT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.h
index eaec87d..7f4f055 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LREAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.cpp
index 28e0cc0..5e1228e 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_LWORD(IN());
+    st_OUT() = INT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.h
index 810ac9d..7114a21 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.cpp
index db2d71a..4c8de52 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_REAL(IN());
+    st_OUT() = INT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.h
index 804fc47..26477eb 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.cpp
index fefd219..5d567e7 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_SINT(IN());
+    st_OUT() = INT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.h
index ff229a9..b09f950 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.cpp
index 1489d09..b879e8c 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_STRING(IN());
+    st_OUT() = INT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.h
index 995bf74..f452e24 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.cpp
index 50823e6..ae8b557 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_UDINT(IN());
+    st_OUT() = INT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.h
index 33e7245..f8643c8 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.cpp
index c2ff9d8..0821e60 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_UINT(IN());
+    st_OUT() = INT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.h
index ab50d63..45e1840 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.cpp
index 7473744..d37a0ef 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_ULINT(IN());
+    st_OUT() = INT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.h
index 0f51aa4..0924e93 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.cpp
index d381be6..51e919a 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_USINT(IN());
+    st_OUT() = INT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.h
index af8011f..8b0075d 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.cpp
index 982add6..d1a76a5 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = INT_TO_WORD(IN());
+    st_OUT() = INT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.h
index 923bae1..c2adb55 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.cpp
index c76e0e3..55c2626 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_INT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = INT_TO_WSTRING(IN());

+    st_OUT() = INT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.h
index e679b34..eb11e9d 100644
--- a/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/INT/F_INT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_INT &IN() {

+  CIEC_INT &st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.cpp
index 7c33af2..f8f70bc 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_BYTE(IN());
+    st_OUT() = LINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.h
index d49853a..a646cb3 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.cpp
index 212ca71..d9d1b69 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_DINT(IN());
+    st_OUT() = LINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.h
index 6ab973b..dcafaba 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.cpp
index ea7062d..027ed16 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_DWORD(IN());
+    st_OUT() = LINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.h
index 471fff2..0cefd8b 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.cpp
index dccec04..d4ba158 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_INT(IN());
+    st_OUT() = LINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.h
index fd77ce1..0718dff 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.cpp
index 4801614..80324eb 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_LREAL(IN());
+    st_OUT() = LINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.h
index 745800e..753bf47 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.cpp
index b55db80..7c4664c 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_LWORD(IN());
+    st_OUT() = LINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.h
index 238b761..bfcf02a 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.cpp
index ed9425d..6d06e26 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_REAL(IN());
+    st_OUT() = LINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.h
index 2394919..fce3966 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.cpp
index 5b10b43..0b48f6e 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_SINT(IN());
+    st_OUT() = LINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.h
index a05cc3b..768f439 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.cpp
index 84d7092..03cd271 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_STRING(IN());
+    st_OUT() = LINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.h
index ffa4320..4d442de 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.cpp
index 953f801..ca0b1f8 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_UDINT(IN());
+    st_OUT() = LINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.h
index a9082b8..d424f35 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.cpp
index 9bae4f2..c2bad5d 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_UINT(IN());
+    st_OUT() = LINT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.h
index 6bba130..1403757 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.cpp
index 8c61356..654937b 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_ULINT(IN());
+    st_OUT() = LINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.h
index 9bccb66..d577b37 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.cpp
index bc8949f..2b11251 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_USINT(IN());
+    st_OUT() = LINT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.h
index 5ad6c61..150f24c 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.cpp
index a8d9029..122bfd3 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LINT_TO_WORD(IN());
+    st_OUT() = LINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.h
index 387f90a..e504575 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.cpp
index f35735f..607a676 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LINT_TO_WSTRING(IN());

+    st_OUT() = LINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.h
index 671694d..31bc612 100644
--- a/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/LINT/F_LINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LINT &IN() {

+  CIEC_LINT &st_IN() {

     return *static_cast<CIEC_LINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.cpp
index 0b91290..284af89 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_DINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_DINT(IN());

+    st_OUT() = LREAL_TO_DINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.h
index e7eb1e6..be51bf2 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.cpp
index 16f3bae..b825908 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_INT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_INT(IN());

+    st_OUT() = LREAL_TO_INT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.h
index 3829032..6b9d826 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.cpp
index c902e4f..d75c9fc 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_LINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_LINT(IN());

+    st_OUT() = LREAL_TO_LINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.h
index 2e84b78..d7cb54a 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.cpp
index a000df9..2d05385 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_LWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_LWORD(IN());

+    st_OUT() = LREAL_TO_LWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.h
index a2deede..c877c3c 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.cpp
index cec93f8..29de56b 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_REAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_REAL(IN());

+    st_OUT() = LREAL_TO_REAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.h
index 1d3701b..989ba40 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.cpp
index 900bd2e..dd12c98 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_SINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_SINT(IN());

+    st_OUT() = LREAL_TO_SINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.h
index 2090805..fd69356 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.cpp
index 1638b9c..5622632 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-      OUT() = LREAL_TO_STRING(IN());
+      st_OUT() = LREAL_TO_STRING(st_IN());
       sendOutputEvent(scm_nEventCNFID);
     }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.h
index afe6d48..9b08e16 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.cpp
index eb9da22..df39f30 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_UDINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_UDINT(IN());

+    st_OUT() = LREAL_TO_UDINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.h
index 584ed91..28e6bfd 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.cpp
index 9692580..884f18f 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_LREAL_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LREAL_TO_UINT(IN());
+    st_OUT() = LREAL_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.h
index a9b825a..3b868cb 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.cpp
index 85b770c..96ef8ff 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_ULINT(IN());

+    st_OUT() = LREAL_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.h
index 40814b8..0fe44aa 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.cpp
index c96ae4b..17c7844 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_USINT(IN());

+    st_OUT() = LREAL_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.h
index ca2f645..890e6e8 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.cpp
index f460ce2..8cc71f2 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LREAL_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LREAL_TO_WSTRING(IN());

+    st_OUT() = LREAL_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.h
index 5da056f..aaa7f4d 100644
--- a/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/LREAL/F_LREAL_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LREAL &IN() {

+  CIEC_LREAL &st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.cpp
index cb6a374..18a7cd3 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_BYTE(IN());
+    st_OUT() = LWORD_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.h
index a2b0c6c..8707476 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.cpp
index 5be3ecb..3c549cd 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_DINT(IN());
+    st_OUT() = LWORD_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.h
index 9c34ed4..43e058e 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.cpp
index 059d4b9..01137dc 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_DWORD(IN());
+    st_OUT() = LWORD_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.h
index a905d43..7cc6d00 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.cpp
index d9980a0..cdf8bfe 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_INT(IN());
+    st_OUT() = LWORD_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.h
index 4e9f54b..b99e0a3 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.cpp
index b990650..f6c5560 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_LINT(IN());
+    st_OUT() = LWORD_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.h
index 2aebf5c..ffa729b 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.cpp
index b72840a..3661f31 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_LREAL(IN());
+    st_OUT() = LWORD_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.h
index 43bbf8b..962d80f 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.cpp
index 534a540..6ee5636 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_SINT(IN());
+    st_OUT() = LWORD_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.h
index 2982cf3..ac86dcf 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.cpp
index e8779f7..0dd000c 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_STRING(IN());
+    st_OUT() = LWORD_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.h
index 810e4c1..4bd648e 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.cpp
index 030739b..1c6f8b6 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_UDINT(IN());
+    st_OUT() = LWORD_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.h
index 43478b9..58a9e94 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.cpp
index 41e139f..fb93231 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_UINT(IN());
+    st_OUT() = LWORD_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.h
index 7ee8ea9..aeb091e 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.cpp
index 552e4ea..e224264 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_ULINT(IN());
+    st_OUT() = LWORD_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.h
index 24d8ba5..f229ee6 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.cpp
index 9080734..cd20515 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_USINT(IN());
+    st_OUT() = LWORD_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.h
index 1ec70a9..a216f42 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.cpp
index 2c30c3c..5500371 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = LWORD_TO_WORD(IN());
+    st_OUT() = LWORD_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.h
index 201543f..1592c50 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.cpp
index 15c8693..df5776d 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_LWORD_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = LWORD_TO_WSTRING(IN());

+    st_OUT() = LWORD_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.h
index 1bfcf06..dcee897 100644
--- a/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/LWORD/F_LWORD_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_LWORD &IN() {

+  CIEC_LWORD &st_IN() {

     return *static_cast<CIEC_LWORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.cpp
index f17b26f..323e89f 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_REAL_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = REAL_TO_DINT(IN());
+    st_OUT() = REAL_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.h
index 584726c..6e5ff43 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.cpp
index 17bcbda..9d8866c 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_DWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_DWORD(IN());

+    st_OUT() = REAL_TO_DWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.h
index 92ba3bb..d742c04 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.cpp
index 8a83de5..e83922f 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_REAL_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = REAL_TO_INT(IN());
+    st_OUT() = REAL_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.h
index 8b50e0a..605ee49 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_INT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.cpp
index adcc2dd..1811abd 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_LINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_LINT(IN());

+    st_OUT() = REAL_TO_LINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.h
index baffa63..b35fc15 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.cpp
index 0af414b..72e9804 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_LREAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_LREAL(IN());

+    st_OUT() = REAL_TO_LREAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.h
index 257981f..28a1749 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.cpp
index ad9ad27..ada9915 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_SINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_SINT(IN());

+    st_OUT() = REAL_TO_SINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.h
index f269b58..8209693 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.cpp
index 3c53ab0..d1d304b 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = REAL_TO_STRING(IN());
+    st_OUT() = REAL_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.h
index 7ce018a..ec2cb36 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.cpp
index 3fcb84d..897c04d 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_REAL_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = REAL_TO_UDINT(IN());
+    st_OUT() = REAL_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.h
index 9806e44..cde67c3 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UDINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.cpp
index a66088d..86f7141 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_REAL_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = REAL_TO_UINT(IN());
+    st_OUT() = REAL_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.h
index 2001dfb..346d9c6 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.cpp
index 039f458..7f8f9c6 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_ULINT(IN());

+    st_OUT() = REAL_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.h
index 6ee296a..98e3591 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.cpp
index 31ad2fb..f5de0a3 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_USINT(IN());

+    st_OUT() = REAL_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.h
index 829c047..753b38f 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.cpp
index 50bc20d..59f0ffc 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_REAL_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = REAL_TO_WSTRING(IN());

+    st_OUT() = REAL_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.h
index 31d6ca4..adfb667 100644
--- a/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/REAL/F_REAL_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_REAL &IN() {

+  CIEC_REAL &st_IN() {

     return *static_cast<CIEC_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.cpp
index 6b9a045..84c32e0 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_BYTE(IN());
+    st_OUT() = SINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.h
index ba83bf7..e6174d9 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.cpp
index 5fca3f2..b27a5e4 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_DINT(IN());
+    st_OUT() = SINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.h
index 9e8801d..7c9a224 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.cpp
index bf6eeb8..2c661de 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_DWORD(IN());
+    st_OUT() = SINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.h
index 0cedc53..fd66a01 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.cpp
index 25c382b..417b7fe 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_INT(IN());
+    st_OUT() = SINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.h
index 31dcd21..6d37c25 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.cpp
index dd89879..ee1555e 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_LINT(IN());
+    st_OUT() = SINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.h
index b24e1f7..f8768cf 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.cpp
index 7af365e..14248c0 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_LREAL(IN());
+    st_OUT() = SINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.h
index 12bc057..f92629b 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.cpp
index 78cbab0..6c5483b 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_LWORD(IN());
+    st_OUT() = SINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.h
index 6be8a32..4633a03 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.cpp
index 01a24d2..8b8e38a 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_REAL(IN());
+    st_OUT() = SINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.h
index 7745aaa..b919ba2 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.cpp
index 900abbc..c9c75e1 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_STRING(IN());
+    st_OUT() = SINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.h
index abe70cb..2f24dfd 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.cpp
index 548599e..aa220ee 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_UDINT(IN());
+    st_OUT() = SINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.h
index 70949e3..bf220df 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.cpp
index 0ec1fea..4e8b6d2 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_UINT(IN());
+    st_OUT() = SINT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.h
index 11a95dc..2b55b10 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.cpp
index ae0d6e0..bbd0d86 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_ULINT(IN());
+    st_OUT() = SINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.h
index a08b4cf..774ed9c 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.cpp
index a99592e..a8731f1 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_USINT(IN());
+    st_OUT() = SINT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.h
index 983bbc4..56f9c24 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.cpp
index 1467b5d..3080017 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = SINT_TO_WORD(IN());
+    st_OUT() = SINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.h
index 9513314..7481be7 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.cpp
index 0a5978c..02f4bb0 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_SINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = SINT_TO_WSTRING(IN());

+    st_OUT() = SINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.h
index a3ec99a..f417960 100644
--- a/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/SINT/F_SINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_SINT &IN() {

+  CIEC_SINT &st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.cpp
index 35c4ac4..1bc3380 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_BOOL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_BOOL(IN());

+    st_OUT() = STRING_TO_BOOL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.h
index bc094a1..e8d4fad 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BOOL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.cpp
index 9175cc5..f355899 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_BYTE::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_BYTE(IN());

+    st_OUT() = STRING_TO_BYTE(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.h
index 5204547..60c0c02 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.cpp
index 88883ba..1988162 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_DINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_DINT(IN());

+    st_OUT() = STRING_TO_DINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.h
index fedeb18..51962c9 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.cpp
index d87daf9..3ec771d 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_DWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_DWORD(IN());

+    st_OUT() = STRING_TO_DWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.h
index 1d590f4..c16cc39 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.cpp
index 9f4b001..26b0670 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = STRING_TO_INT(IN());
+    st_OUT() = STRING_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.h
index 7b20513..b0fe970 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.cpp
index 68cd124..02d0d21 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_LINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_LINT(IN());

+    st_OUT() = STRING_TO_LINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.h
index bccb0ea..13d0264 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.cpp
index 9e08ba4..38ae835 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_LREAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_LREAL(IN());

+    st_OUT() = STRING_TO_LREAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.h
index 456a185..3cc1358 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.cpp
index 570e3f1..e038699 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_LWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_LWORD(IN());

+    st_OUT() = STRING_TO_LWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.h
index 3bb75c1..d66bbdc 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.cpp
index 8321bdb..95a76f7 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_REAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_REAL(IN());

+    st_OUT() = STRING_TO_REAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.h
index 9f36bb8..6936632 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.cpp
index 6a18eb3..4db2add 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_SINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_SINT(IN());

+    st_OUT() = STRING_TO_SINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.h
index db5dc12..fc8b716 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.cpp
index e073166..b696541 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_TIME(IN());

+    st_OUT() = STRING_TO_TIME(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.h
index 5c323d6..272398a 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_TIME.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.cpp
index aa195da..8214580 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_UDINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_UDINT(IN());

+    st_OUT() = STRING_TO_UDINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.h
index 5ab5117..fa998b0 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.cpp
index 3933e51..73d5513 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = STRING_TO_UINT(IN());
+    st_OUT() = STRING_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.h
index 28502c5..1adc5f4 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.cpp
index 518526d..88ec39e 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_ULINT(IN());

+    st_OUT() = STRING_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.h
index fe17baa..51f4761 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.cpp
index d985256..5821641 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_USINT(IN());

+    st_OUT() = STRING_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.h
index e32c410..96d6ba6 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.cpp
index e41bdd5..d310649 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_WORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_WORD(IN());

+    st_OUT() = STRING_TO_WORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.h
index 3ee9061..03a76b3 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.cpp
index d1e9879..db72f07 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_STRING_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = STRING_TO_WSTRING(IN());

+    st_OUT() = STRING_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.h
index 3ada0ee..9af7d62 100644
--- a/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/STRING/F_STRING_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_STRING &IN() {

+  CIEC_STRING &st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.cpp
index e1f6aaf..c0e8111 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_MS_TO_LINT::alg_REQ(void){
-OUT() = TIME_IN_MS_TO_LINT((IN()));
+  st_OUT() = TIME_IN_MS_TO_LINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.h
index 428e3d3..e3476ea 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LINT &OUT() {
+  CIEC_LINT &st_OUT() {
     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.cpp
index 9c60271..1e10f03 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_MS_TO_LREAL::alg_REQ(void){
-OUT() = TIME_IN_MS_TO_LREAL((IN()));
+  st_OUT() = TIME_IN_MS_TO_LREAL((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.h
index dd20ce0..8e27d9b 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_LREAL.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LREAL &OUT() {
+  CIEC_LREAL &st_OUT() {
     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.cpp
index 0fb17cf..0420765 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_MS_TO_ULINT::alg_REQ(void){
-OUT() = TIME_IN_MS_TO_ULINT((IN()));
+  st_OUT() = TIME_IN_MS_TO_ULINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.h
index a97cd4c..2452614 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_MS_TO_ULINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ULINT &OUT() {
+  CIEC_ULINT &st_OUT() {
     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.cpp
index 1824958..a8dc74f 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_NS_TO_LINT::alg_REQ(void){
-OUT() = TIME_IN_NS_TO_LINT((IN()));
+  st_OUT() = TIME_IN_NS_TO_LINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.h
index 7156796..01ec7cc 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LINT &OUT() {
+  CIEC_LINT &st_OUT() {
     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.cpp
index 742d85f..e724d67 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_NS_TO_LREAL::alg_REQ(void){
-OUT() = TIME_IN_NS_TO_LREAL((IN()));
+  st_OUT() = TIME_IN_NS_TO_LREAL((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.h
index 8ae0ad1..53e3198 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_LREAL.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LREAL &OUT() {
+  CIEC_LREAL &st_OUT() {
     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.cpp
index f4c3ef8..9635d31 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_NS_TO_ULINT::alg_REQ(void){
-OUT() = TIME_IN_NS_TO_ULINT((IN()));
+  st_OUT() = TIME_IN_NS_TO_ULINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.h
index 4108558..ee46286 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_NS_TO_ULINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ULINT &OUT() {
+  CIEC_ULINT &st_OUT() {
     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.cpp
index 1140e15..20e0552 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_S_TO_LINT::alg_REQ(void){
-OUT() = TIME_IN_S_TO_LINT((IN()));
+  st_OUT() = TIME_IN_S_TO_LINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.h
index d07d9f2..ded748d 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LINT &OUT() {
+  CIEC_LINT &st_OUT() {
     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.cpp
index 6de0b70..71fa71c 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_S_TO_LREAL::alg_REQ(void){
-OUT() = TIME_IN_S_TO_LREAL((IN()));
+  st_OUT() = TIME_IN_S_TO_LREAL((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.h
index 28d5bdb..6a54bfa 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_LREAL.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LREAL &OUT() {
+  CIEC_LREAL &st_OUT() {
     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.cpp
index 832c260..b8f7faf 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_S_TO_ULINT::alg_REQ(void){
-OUT() = TIME_IN_S_TO_ULINT((IN()));
+  st_OUT() = TIME_IN_S_TO_ULINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.h
index ef7deab..46e37a0 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_S_TO_ULINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ULINT &OUT() {
+  CIEC_ULINT &st_OUT() {
     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.cpp
index 35e38bb..9b1636e 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_US_TO_LINT::alg_REQ(void){
-OUT() = TIME_IN_US_TO_LINT((IN()));
+  st_OUT() = TIME_IN_US_TO_LINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.h
index ff8b4f6..6944480 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LINT &OUT() {
+  CIEC_LINT &st_OUT() {
     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.cpp
index 45d67a9..7f8e0fc 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_US_TO_LREAL::alg_REQ(void){
-OUT() = TIME_IN_US_TO_LREAL((IN()));
+  st_OUT() = TIME_IN_US_TO_LREAL((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.h
index 870b8a2..49edfbe 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_LREAL.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_LREAL &OUT() {
+  CIEC_LREAL &st_OUT() {
     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.cpp
index cf9990f..7df6f62 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.cpp
@@ -42,7 +42,7 @@
 };
 
 void FORTE_F_TIME_IN_US_TO_ULINT::alg_REQ(void){
-OUT() = TIME_IN_US_TO_ULINT((IN()));
+  st_OUT() = TIME_IN_US_TO_ULINT((st_IN()));
 }
 
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.h
index aa59b6d..e41a69b 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_IN_US_TO_ULINT.h
@@ -24,13 +24,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_TIME &IN() {
+  CIEC_TIME &st_IN() {
     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ULINT &OUT() {
+  CIEC_ULINT &st_OUT() {
     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.cpp
index c6e005e..7189f81 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_TIME_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = TIME_TO_STRING(IN());
+    st_OUT() = TIME_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.h
index 61a2ecd..59b72bd 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_TIME &IN() {

+  CIEC_TIME &st_IN() {

     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.cpp
index 6e9ffbc..dc07e27 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_TIME_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = TIME_TO_WSTRING(IN());

+    st_OUT() = TIME_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.h
index 90cec75..303b783 100644
--- a/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/TIME/F_TIME_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_TIME &IN() {

+  CIEC_TIME &st_IN() {

     return *static_cast<CIEC_TIME*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.cpp
index 7ab3994..587bb5c 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_BYTE(IN());
+    st_OUT() = UDINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.h
index d3b2c2d..6987044 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.cpp
index a7ec824..7da76ac 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_DINT(IN());
+    st_OUT() = UDINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.h
index d98e5e3..7273a54 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.cpp
index 4c4fa41..79022c2 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_DWORD(IN());
+    st_OUT() = UDINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.h
index 5efe5bf..916b1c7 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.cpp
index 3140c3b..9e1e3e7 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_INT(IN());
+    st_OUT() = UDINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.h
index c053ee2..4556d56 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.cpp
index 2ec164a..2ba84e3 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_LINT(IN());
+    st_OUT() = UDINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.h
index bb9dbfa..27461c7 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.cpp
index bca40b6..2633bd9 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_LREAL(IN());
+    st_OUT() = UDINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.h
index 6b44d86..b8d45a1 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.cpp
index 4e90642..0481e37 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_LWORD(IN());
+    st_OUT() = UDINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.h
index 1006dc7..30e5b94 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.cpp
index 22deafe..ce26bda 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UDINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_REAL(IN());
+    st_OUT() = UDINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.h
index 47de6b8..8df79f7 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_REAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.cpp
index 9858aaa..dd1fe1f 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_SINT(IN());
+    st_OUT() = UDINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.h
index 5f3c722..2b737f2 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.cpp
index e507482..6b222fc 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_STRING(IN());
+    st_OUT() = UDINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.h
index 1bcd832..4f4a01e 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.cpp
index afe4dc7..dace21d 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_UINT(IN());
+    st_OUT() = UDINT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.h
index a5548bc..9a55015 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.cpp
index f09577a..522e339 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_ULINT(IN());
+    st_OUT() = UDINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.h
index 172de14..a1a9570 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.cpp
index 762a82e..52a9a07 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.cpp
@@ -41,7 +41,7 @@
 
 void FORTE_F_UDINT_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = UDINT_TO_USINT(IN());

+    st_OUT() = UDINT_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.h
index 8979eed..5de38a1 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.cpp
index ef72fb2..8b8268b 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UDINT_TO_WORD(IN());
+    st_OUT() = UDINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.h
index caed026..4cb7d4a 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.cpp
index bfb3ffb..7ed7981 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UDINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = UDINT_TO_WSTRING(IN());

+    st_OUT() = UDINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.h
index 1844da4..9ad8e24 100644
--- a/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/UDINT/F_UDINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UDINT &IN() {

+  CIEC_UDINT &st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.cpp
index 0b72b24..e440916 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_BYTE(IN());
+    st_OUT() = UINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.h
index 0639542..e0c1167 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_BYTE.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.cpp
index 87320f5..b7d2fe0 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_DINT(IN());
+    st_OUT() = UINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.h
index ca6def7..2036ed5 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.cpp
index 4ca1698..1ffbf5a 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_DWORD(IN());
+    st_OUT() = UINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.h
index 71a3b44..d95b506 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_DWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.cpp
index 665125f..04930f6 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_INT(IN());
+    st_OUT() = UINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.h
index 7ed1a8f..668501b 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_INT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.cpp
index 0941b23..53f73ab 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_LINT(IN());
+    st_OUT() = UINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.h
index d09ef2f..62c484a 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.cpp
index dac00d1..51d1630 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_LREAL(IN());
+    st_OUT() = UINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.h
index e157afb..2d194a9 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LREAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.cpp
index fc068c8..e02f70f 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_LWORD(IN());
+    st_OUT() = UINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.h
index 92e85d9..b4ef644 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_LWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.cpp
index 4ffde4f..f4fa80c 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_REAL(IN());
+    st_OUT() = UINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.h
index 2dc92c6..fec25dc 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_REAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.cpp
index f9bd199..62b1560 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_SINT(IN());
+    st_OUT() = UINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.h
index 76e7a07..013f44a 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_SINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.cpp
index 1c977f7..93d350d 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_STRING(IN());
+    st_OUT() = UINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.h
index a38c088..79e268c 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.cpp
index c02b5bc..3e2ffcd 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_UDINT(IN());
+    st_OUT() = UINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.h
index 75f0d44..d210144 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_UDINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.cpp
index 804b68d..52ac6c6 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_ULINT(IN());
+    st_OUT() = UINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.h
index 23c36d7..565f21a 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_ULINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.cpp
index 9e11468..e8d1717 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_USINT(IN());
+    st_OUT() = UINT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.h
index fa87f44..c84ebc7 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_USINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.cpp
index 85575c3..d13a072 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_UINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = UINT_TO_WORD(IN());
+    st_OUT() = UINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.h
index d93ceba..47acea2 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.cpp
index a578894..6e97f76 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_UINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = UINT_TO_WSTRING(IN());

+    st_OUT() = UINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.h
index d235961..cae9a9b 100644
--- a/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/UINT/F_UINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_UINT &IN() {

+  CIEC_UINT &st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.cpp
index 894d5da..8b49989 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_BYTE(IN());
+    st_OUT() = ULINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.h
index f4d5f8b..56b7478 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_BYTE.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.cpp
index 30e6065..bcee56f 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_DINT(IN());
+    st_OUT() = ULINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.h
index 30ed059..a29317b 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.cpp
index 31b8541..7696b5e 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_DWORD(IN());
+    st_OUT() = ULINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.h
index 8dec463..b6c369f 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_DWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.cpp
index 0659203..be71c7c 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_INT(IN());
+    st_OUT() = ULINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.h
index 758297a..e062c23 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_INT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.cpp
index bb6c0a0..4b12238 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_LINT(IN());
+    st_OUT() = ULINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.h
index db570bc..915752b 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.cpp
index ae5d2f4..fb3f372 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_LREAL(IN());
+    st_OUT() = ULINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.h
index d3f41b0..4626fed 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LREAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.cpp
index 89f4290..a31abb0 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_LWORD(IN());
+    st_OUT() = ULINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.h
index bf7f647..498da32 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_LWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.cpp
index c5c8376..2a80ba7 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_REAL(IN());
+    st_OUT() = ULINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.h
index 1ba51b8..641a082 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_REAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.cpp
index 484dcbb..4c92657 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_SINT(IN());
+    st_OUT() = ULINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.h
index 41b9c29..ff712ef 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_SINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.cpp
index fe283cb..99f2405 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_ULINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_STRING(IN());
+    st_OUT() = ULINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.h
index 191c4a1..70036bd 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.cpp
index aebad7b..1bf2231 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_UDINT(IN());
+    st_OUT() = ULINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.h
index 55e451e..2981dff 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UDINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.cpp
index 4e56523..21b83fe 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_UINT(IN());
+    st_OUT() = ULINT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.h
index bc952f9..368d5ba 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.cpp
index 7a0aa99..70e2da5 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_USINT(IN());
+    st_OUT() = ULINT_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.h
index ee8010b..c0d637d 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_USINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.cpp
index 3b2e509..be0abd5 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_ULINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = ULINT_TO_WORD(IN());
+    st_OUT() = ULINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.h
index 640030f..bd91c1e 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.cpp
index f8fdcad..f3b7c24 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_ULINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = ULINT_TO_WSTRING(IN());

+    st_OUT() = ULINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.h
index 431d497..08e34d8 100644
--- a/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/ULINT/F_ULINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ULINT &IN() {

+  CIEC_ULINT &st_IN() {

     return *static_cast<CIEC_ULINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.cpp
index 63ddae9..ce95127 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_BYTE(IN());
+    st_OUT() = USINT_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.h
index c3baf0b..8aa0fa9 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_BYTE.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.cpp
index 512d5d2..1cf617a 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_DINT(IN());
+    st_OUT() = USINT_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.h
index 0759cda..829785a 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.cpp
index 19d962d..e74c35c 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_DWORD(IN());
+    st_OUT() = USINT_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.h
index 8e86e4b..5bf80e0 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_DWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.cpp
index 4ad7566..986054e 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_INT(IN());
+    st_OUT() = USINT_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.h
index 602bfbf..75f53aa 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_INT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.cpp
index 8081988..0bdf0d2 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_LINT(IN());
+    st_OUT() = USINT_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.h
index d1e3e70..1612b4c 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.cpp
index cb7374b..5a749c6 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_LREAL(IN());
+    st_OUT() = USINT_TO_LREAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.h
index 2e5858a..6cb21cb 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LREAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.cpp
index d4ffe57..05f9cba 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_LWORD(IN());
+    st_OUT() = USINT_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.h
index 2fda0cf..7203116 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_LWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.cpp
index afbb642..8c71637 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_REAL(IN());
+    st_OUT() = USINT_TO_REAL(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.h
index ec09dda..0dd6264 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_REAL.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.cpp
index 2eae218..c90d815 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_SINT(IN());
+    st_OUT() = USINT_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.h
index eb50ceb..22186d0 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_SINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.cpp
index 0db995c..88e8789 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_USINT_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_STRING(IN());
+    st_OUT() = USINT_TO_STRING(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.h
index 3b410fd..c7f949e 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.cpp
index 4fc63a9..73e839e 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_UDINT(IN());
+    st_OUT() = USINT_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.h
index b824a53..ed5e5a4 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UDINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.cpp
index bef0b21..4b3f781 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_UINT(IN());
+    st_OUT() = USINT_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.h
index b41d72b..33e55d0 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.cpp
index 088722a..0b7e77c 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_ULINT(IN());
+    st_OUT() = USINT_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.h
index 7f0eefd..1080525 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_ULINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.cpp
index 32e00c3..4753365 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_USINT_TO_WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = USINT_TO_WORD(IN());
+    st_OUT() = USINT_TO_WORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.h
index b94a3cf..4b54ba0 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.cpp
index a64f66b..da26cb9 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_USINT_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = USINT_TO_WSTRING(IN());

+    st_OUT() = USINT_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.h
index 021126f..fa6efa4 100644
--- a/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/USINT/F_USINT_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_USINT &IN() {

+  CIEC_USINT &st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.cpp
index 91dba7e..46a8ac7 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_BYTE(IN());
+    st_OUT() = WORD_TO_BYTE(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.h
index 4011fe9..6c4225e 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_BYTE.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.cpp
index 7dceb0b..3758215 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_DINT(IN());
+    st_OUT() = WORD_TO_DINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.h
index 7facbae..13b85f4 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.cpp
index e8719c6..9843798 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_DWORD(IN());
+    st_OUT() = WORD_TO_DWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.h
index 8e56927..1258c46 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_DWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.cpp
index 93883ab..25bab3b 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_INT(IN());
+    st_OUT() = WORD_TO_INT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.h
index de42a55..9122b50 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_INT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.cpp
index 0e5228f..069f085 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_LINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_LINT(IN());
+    st_OUT() = WORD_TO_LINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.h
index 6c53bc1..f0f93a6 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.cpp
index 53188c9..7965034 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_LWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_LWORD(IN());
+    st_OUT() = WORD_TO_LWORD(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.h
index 4d42e7b..2c9b3ea 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_LWORD.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.cpp
index 563d35e..3878dad 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_SINT(IN());
+    st_OUT() = WORD_TO_SINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.h
index ed47528..3728bb8 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_SINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.cpp
index f78b414..6fb48b2 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WORD_TO_STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_STRING(IN());
+    st_OUT() = WORD_TO_STRING(st_IN());
   sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.h
index 9f24b20..46e9823 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.cpp
index dba2d61..e940ffe 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_UDINT(IN());
+    st_OUT() = WORD_TO_UDINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.h
index 95628e6..c3e086c 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UDINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.cpp
index 44b6b65..70e8eb0 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_UINT(IN());
+    st_OUT() = WORD_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.h
index c5f47ad..e59828c 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_UINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.cpp
index 229531a..8c1eb8f 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_ULINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_ULINT(IN());
+    st_OUT() = WORD_TO_ULINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.h
index a460ccf..f4cec8e 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_ULINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.cpp
index 443ec78..d3de69a 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_F_WORD_TO_USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WORD_TO_USINT(IN());
+    st_OUT() = WORD_TO_USINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.h
index d45b729..51d36d4 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_USINT.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.cpp b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.cpp
index c8ed66a..4956790 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WORD_TO_WSTRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WORD_TO_WSTRING(IN());

+    st_OUT() = WORD_TO_WSTRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.h b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.h
index db70525..0f2ce98 100644
--- a/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.h
+++ b/src/modules/IEC61131-3/Conversion/WORD/F_WORD_TO_WSTRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WSTRING &OUT() {

+  CIEC_WSTRING &st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.cpp
index d93e2f5..5341a2e 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_BOOL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_BOOL(IN());

+    st_OUT() = WSTRING_TO_BOOL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.h
index 5873eb1..f5fb6c8 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BOOL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &OUT() {

+  CIEC_BOOL &st_OUT() {

     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.cpp
index 5b3889e..5435270 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_BYTE::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_BYTE(IN());

+    st_OUT() = WSTRING_TO_BYTE(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.h
index 62068aa..c426f1b 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_BYTE.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BYTE &OUT() {

+  CIEC_BYTE &st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.cpp
index 7fc900b..b42f625 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_DINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_DINT(IN());

+    st_OUT() = WSTRING_TO_DINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.h
index 42ecc54..82bef95 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DINT &OUT() {

+  CIEC_DINT &st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.cpp
index 8237186..d89dc10 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_DWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_DWORD(IN());

+    st_OUT() = WSTRING_TO_DWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.h
index da3bf5f..52f5915 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_DWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.cpp
index 58618cb..b822b85 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_INT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_INT(IN());

+    st_OUT() = WSTRING_TO_INT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.h
index bef8c09..4771fc2 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_INT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_INT &OUT() {

+  CIEC_INT &st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.cpp
index 431be86..4b2795c 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_LINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_LINT(IN());

+    st_OUT() = WSTRING_TO_LINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.h
index 9cc5d76..73c5276 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LINT &OUT() {

+  CIEC_LINT &st_OUT() {

     return *static_cast<CIEC_LINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.cpp
index 86236ab..4c2031a 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_LREAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_LREAL(IN());

+    st_OUT() = WSTRING_TO_LREAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.h
index 849ab63..067580d 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LREAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LREAL &OUT() {

+  CIEC_LREAL &st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.cpp
index d4b79a3..9bfdbc3 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_LWORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_LWORD(IN());

+    st_OUT() = WSTRING_TO_LWORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.h
index f267c08..5b2d77b 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_LWORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_LWORD &OUT() {

+  CIEC_LWORD &st_OUT() {

     return *static_cast<CIEC_LWORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.cpp
index df336e6..d263e17 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_REAL::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_REAL(IN());

+    st_OUT() = WSTRING_TO_REAL(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.h
index 9d26bae..769da0c 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_REAL.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_REAL &OUT() {

+  CIEC_REAL &st_OUT() {

     return *static_cast<CIEC_REAL*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.cpp
index fda6046..b2aa32c 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_SINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_SINT(IN());

+    st_OUT() = WSTRING_TO_SINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.h
index 90d634f..38f5819 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_SINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_SINT &OUT() {

+  CIEC_SINT &st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.cpp
index 7720ab1..4261e4b 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_STRING::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_STRING(IN());

+    st_OUT() = WSTRING_TO_STRING(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.h
index e35f85e..5f3d57d 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_STRING.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_STRING &OUT() {

+  CIEC_STRING &st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.cpp
index c9d36c2..9409a5d 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_TIME::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_TIME(IN());

+    st_OUT() = WSTRING_TO_TIME(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.h
index b6f7718..6bc037e 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_TIME.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_TIME &OUT() {

+  CIEC_TIME &st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.cpp
index c7abdb9..70fbe77 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_UDINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_UDINT(IN());

+    st_OUT() = WSTRING_TO_UDINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.h
index 2ac1add..c3c8abb 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UDINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UDINT &OUT() {

+  CIEC_UDINT &st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.cpp
index ce6ed94..a4355fa 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = WSTRING_TO_UINT(IN());
+    st_OUT() = WSTRING_TO_UINT(st_IN());
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.h
index 1b008a9..339199c 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_UINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_UINT &OUT() {

+  CIEC_UINT &st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.cpp
index b3c5898..f3ff14a 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_ULINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_ULINT(IN());

+    st_OUT() = WSTRING_TO_ULINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.h
index 0abd7cc..44e43ce 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_ULINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ULINT &OUT() {

+  CIEC_ULINT &st_OUT() {

     return *static_cast<CIEC_ULINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.cpp
index 895fbcf..5d648f5 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_USINT::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_USINT(IN());

+    st_OUT() = WSTRING_TO_USINT(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.h
index c0ca5f5..19a8c01 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_USINT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_USINT &OUT() {

+  CIEC_USINT &st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.cpp b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.cpp
index 4bd280b..7f803d3 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.cpp
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_WSTRING_TO_WORD::executeEvent(int pa_nEIID){

   if(scm_nEventREQID == pa_nEIID){

-    OUT() = WSTRING_TO_WORD(IN());

+    st_OUT() = WSTRING_TO_WORD(st_IN());

     sendOutputEvent(scm_nEventCNFID);

   }

 }

diff --git a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.h b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.h
index 5f99f72..1f2b44f 100644
--- a/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.h
+++ b/src/modules/IEC61131-3/Conversion/WSTRING/F_WSTRING_TO_WORD.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_WSTRING &IN() {

+  CIEC_WSTRING &st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Numerical/F_ABS.cpp b/src/modules/IEC61131-3/Numerical/F_ABS.cpp
index 4d07dce..833c4a5 100644
--- a/src/modules/IEC61131-3/Numerical/F_ABS.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_ABS.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ABS::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-  anyMagnitudeFBHelper<FORTE_F_ABS>(IN().getDataTypeID(), *this);

+  anyMagnitudeFBHelper<FORTE_F_ABS>(st_IN().getDataTypeID(), *this);

   sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_ABS.h b/src/modules/IEC61131-3/Numerical/F_ABS.h
index 3d92a97..88c6e85 100644
--- a/src/modules/IEC61131-3/Numerical/F_ABS.h
+++ b/src/modules/IEC61131-3/Numerical/F_ABS.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_NUM &IN() {

+  CIEC_ANY_NUM &st_IN() {

     return *static_cast<CIEC_ANY_NUM*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_NUM &OUT() {

+  CIEC_ANY_NUM &st_OUT() {

     return *static_cast<CIEC_ANY_NUM*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(ABS(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(ABS(oIn));

   }

 

   virtual ~FORTE_F_ABS(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_ACOS.cpp b/src/modules/IEC61131-3/Numerical/F_ACOS.cpp
index ef2e3fb..7c0db49 100644
--- a/src/modules/IEC61131-3/Numerical/F_ACOS.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_ACOS.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ACOS::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_ACOS>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_ACOS>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_ACOS.h b/src/modules/IEC61131-3/Numerical/F_ACOS.h
index 29ddf9e..e9163af 100644
--- a/src/modules/IEC61131-3/Numerical/F_ACOS.h
+++ b/src/modules/IEC61131-3/Numerical/F_ACOS.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(ACOS(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(ACOS(oIn));

   }

 

   virtual ~FORTE_F_ACOS(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_ASIN.cpp b/src/modules/IEC61131-3/Numerical/F_ASIN.cpp
index 5ba91b8..451b283 100644
--- a/src/modules/IEC61131-3/Numerical/F_ASIN.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_ASIN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ASIN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_ASIN>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_ASIN>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_ASIN.h b/src/modules/IEC61131-3/Numerical/F_ASIN.h
index 016af96..f2593f0 100644
--- a/src/modules/IEC61131-3/Numerical/F_ASIN.h
+++ b/src/modules/IEC61131-3/Numerical/F_ASIN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(ASIN(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(ASIN(oIn));

   }

 

   virtual ~FORTE_F_ASIN(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_ATAN.cpp b/src/modules/IEC61131-3/Numerical/F_ATAN.cpp
index 4fd7e4e..3bc0c2a 100644
--- a/src/modules/IEC61131-3/Numerical/F_ATAN.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_ATAN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_ATAN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_ATAN>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_ATAN>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_ATAN.h b/src/modules/IEC61131-3/Numerical/F_ATAN.h
index 0719597..20c76dd 100644
--- a/src/modules/IEC61131-3/Numerical/F_ATAN.h
+++ b/src/modules/IEC61131-3/Numerical/F_ATAN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(ATAN(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(ATAN(oIn));

   }

 

   virtual ~FORTE_F_ATAN(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_COS.cpp b/src/modules/IEC61131-3/Numerical/F_COS.cpp
index f519e05..4e361bc 100644
--- a/src/modules/IEC61131-3/Numerical/F_COS.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_COS.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_COS::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_COS>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_COS>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_COS.h b/src/modules/IEC61131-3/Numerical/F_COS.h
index a752cac..9943db4 100644
--- a/src/modules/IEC61131-3/Numerical/F_COS.h
+++ b/src/modules/IEC61131-3/Numerical/F_COS.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(COS(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(COS(oIn));

   }

 

   virtual ~FORTE_F_COS(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_EXP.cpp b/src/modules/IEC61131-3/Numerical/F_EXP.cpp
index 1a679a5..6e12236 100644
--- a/src/modules/IEC61131-3/Numerical/F_EXP.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_EXP.cpp
@@ -44,7 +44,7 @@
 
 void FORTE_F_EXP::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_EXP>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_EXP>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_EXP.h b/src/modules/IEC61131-3/Numerical/F_EXP.h
index 4478aa8..334e6ab 100644
--- a/src/modules/IEC61131-3/Numerical/F_EXP.h
+++ b/src/modules/IEC61131-3/Numerical/F_EXP.h
@@ -21,13 +21,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -53,8 +53,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(EXP(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(EXP(oIn));

   }

 

   virtual ~FORTE_F_EXP(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_LN.cpp b/src/modules/IEC61131-3/Numerical/F_LN.cpp
index 0ce60a0..97577dc 100644
--- a/src/modules/IEC61131-3/Numerical/F_LN.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_LN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_LN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_LN>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_LN>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_LN.h b/src/modules/IEC61131-3/Numerical/F_LN.h
index 3293268..44f2720 100644
--- a/src/modules/IEC61131-3/Numerical/F_LN.h
+++ b/src/modules/IEC61131-3/Numerical/F_LN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(LN(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(LN(oIn));

   }

 

   virtual ~FORTE_F_LN(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_LOG.cpp b/src/modules/IEC61131-3/Numerical/F_LOG.cpp
index ed4c935..cc52731 100644
--- a/src/modules/IEC61131-3/Numerical/F_LOG.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_LOG.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_LOG::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_LOG>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_LOG>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_LOG.h b/src/modules/IEC61131-3/Numerical/F_LOG.h
index b85303d..0606ffb 100644
--- a/src/modules/IEC61131-3/Numerical/F_LOG.h
+++ b/src/modules/IEC61131-3/Numerical/F_LOG.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(LOG(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(LOG(oIn));

   }

 

   virtual ~FORTE_F_LOG(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_SIN.cpp b/src/modules/IEC61131-3/Numerical/F_SIN.cpp
index 3ad1823..1a7cfd7 100644
--- a/src/modules/IEC61131-3/Numerical/F_SIN.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_SIN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_SIN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_SIN>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_SIN>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_SIN.h b/src/modules/IEC61131-3/Numerical/F_SIN.h
index f7f8a88..2470f12 100644
--- a/src/modules/IEC61131-3/Numerical/F_SIN.h
+++ b/src/modules/IEC61131-3/Numerical/F_SIN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(SIN(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(SIN(oIn));

   }

 

   virtual ~FORTE_F_SIN(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_SQRT.cpp b/src/modules/IEC61131-3/Numerical/F_SQRT.cpp
index 1344eca..fc940c7 100644
--- a/src/modules/IEC61131-3/Numerical/F_SQRT.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_SQRT.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_SQRT::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_SQRT>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_SQRT>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_SQRT.h b/src/modules/IEC61131-3/Numerical/F_SQRT.h
index aa34d0a..d2000fd 100644
--- a/src/modules/IEC61131-3/Numerical/F_SQRT.h
+++ b/src/modules/IEC61131-3/Numerical/F_SQRT.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(SQRT(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(SQRT(oIn));

   }

 

   virtual ~FORTE_F_SQRT(){};

diff --git a/src/modules/IEC61131-3/Numerical/F_TAN.cpp b/src/modules/IEC61131-3/Numerical/F_TAN.cpp
index 94f3786..6d95a62 100644
--- a/src/modules/IEC61131-3/Numerical/F_TAN.cpp
+++ b/src/modules/IEC61131-3/Numerical/F_TAN.cpp
@@ -45,7 +45,7 @@
 
 void FORTE_F_TAN::executeEvent(int pa_nEIID){

   if (scm_nEventREQID == pa_nEIID) {

-    anyRealFBHelper<FORTE_F_TAN>(IN().getDataTypeID(), *this);

+    anyRealFBHelper<FORTE_F_TAN>(st_IN().getDataTypeID(), *this);

     sendOutputEvent(scm_nEventCNFID);

   }

 }
diff --git a/src/modules/IEC61131-3/Numerical/F_TAN.h b/src/modules/IEC61131-3/Numerical/F_TAN.h
index bc0efea..6a0ee7d 100644
--- a/src/modules/IEC61131-3/Numerical/F_TAN.h
+++ b/src/modules/IEC61131-3/Numerical/F_TAN.h
@@ -22,13 +22,13 @@
 private:

   static const CStringDictionary::TStringId scm_anDataInputNames[];

   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_ANY_REAL &IN() {

+  CIEC_ANY_REAL &st_IN() {

     return *static_cast<CIEC_ANY_REAL*>(getDI(0));
   };
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_REAL &OUT() {

+  CIEC_ANY_REAL &st_OUT() {

     return *static_cast<CIEC_ANY_REAL*>(getDO(0));
   };
 

@@ -54,8 +54,8 @@
 

   template<typename T> void calculateValue(){

     T oIn;

-    oIn.saveAssign(IN());

-    OUT().saveAssign(TAN(oIn));

+    oIn.saveAssign(st_IN());

+    st_OUT().saveAssign(TAN(oIn));

   }

 

   virtual ~FORTE_F_TAN(){};

diff --git a/src/modules/IEC61131-3/Selection/F_LIMIT.cpp b/src/modules/IEC61131-3/Selection/F_LIMIT.cpp
index 343627b..dbeec71 100644
--- a/src/modules/IEC61131-3/Selection/F_LIMIT.cpp
+++ b/src/modules/IEC61131-3/Selection/F_LIMIT.cpp
@@ -49,7 +49,7 @@
 
 void FORTE_F_LIMIT::executeEvent(int pa_nEIID) {
   if (scm_nEventREQID == pa_nEIID) {
-      anyElementaryFBHelper<FORTE_F_LIMIT>(IN().getDataTypeID(), *this);
+      anyElementaryFBHelper<FORTE_F_LIMIT>(st_IN().getDataTypeID(), *this);
       sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/IEC61131-3/Selection/F_LIMIT.h b/src/modules/IEC61131-3/Selection/F_LIMIT.h
index 54a7c95..bf3e705 100644
--- a/src/modules/IEC61131-3/Selection/F_LIMIT.h
+++ b/src/modules/IEC61131-3/Selection/F_LIMIT.h
@@ -26,7 +26,7 @@
     }

     ;

 

-    CIEC_ANY_ELEMENTARY &IN(){

+    CIEC_ANY_ELEMENTARY &st_IN(){

       return *static_cast<CIEC_ANY_ELEMENTARY*>(getDI(1));

     }

     ;

@@ -38,7 +38,7 @@
 

     static const CStringDictionary::TStringId scm_anDataOutputNames[];

     static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_ANY_ELEMENTARY &OUT(){

+    CIEC_ANY_ELEMENTARY &st_OUT(){

       return *static_cast<CIEC_ANY_ELEMENTARY*>(getDO(0));

     }

     ;

@@ -71,7 +71,7 @@
     oMin.saveAssign(MN());

     oMax.saveAssign(MX());

 

-    OUT().saveAssign(LIMIT<T> (oMin, static_cast<T &> (IN()), oMax));

+    st_OUT().saveAssign(LIMIT<T> (oMin, static_cast<T &> (st_IN()), oMax));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Selection/F_MAX.h b/src/modules/IEC61131-3/Selection/F_MAX.h
index bc56b98..0debc62 100644
--- a/src/modules/IEC61131-3/Selection/F_MAX.h
+++ b/src/modules/IEC61131-3/Selection/F_MAX.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_ELEMENTARY &OUT() {

+  CIEC_ANY_ELEMENTARY &st_OUT() {

     return *static_cast<CIEC_ANY_ELEMENTARY*>(getDO(0));

   };

 

@@ -62,7 +62,7 @@
       oMin.saveAssign(IN1());

       oMax.saveAssign(IN2());

 

-      OUT().saveAssign(MAX<T> (oMin, oMax));

+      st_OUT().saveAssign(MAX<T> (oMin, oMax));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Selection/F_MIN.h b/src/modules/IEC61131-3/Selection/F_MIN.h
index 40c0b67..afc6ffd 100644
--- a/src/modules/IEC61131-3/Selection/F_MIN.h
+++ b/src/modules/IEC61131-3/Selection/F_MIN.h
@@ -31,7 +31,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY_ELEMENTARY &OUT() {

+  CIEC_ANY_ELEMENTARY &st_OUT() {

     return *static_cast<CIEC_ANY_ELEMENTARY*>(getDO(0));

   };

 

@@ -64,7 +64,7 @@
     oMin.saveAssign(IN1());

     oMax.saveAssign(IN2());

 

-    OUT().saveAssign(MIN<T> (oMin, oMax));

+    st_OUT().saveAssign(MIN<T> (oMin, oMax));

   }

 

   template<typename T> void calculateValueString() const {

diff --git a/src/modules/IEC61131-3/Selection/F_MUX_2.cpp b/src/modules/IEC61131-3/Selection/F_MUX_2.cpp
index 3fc345f..9100d0e 100644
--- a/src/modules/IEC61131-3/Selection/F_MUX_2.cpp
+++ b/src/modules/IEC61131-3/Selection/F_MUX_2.cpp
@@ -47,7 +47,7 @@
     if(K().isSigned() && (K().getSignedValue() < 0 || K().getSignedValue() > 1)){

       DEVLOG_ERROR("value of input K is not between 0 and 1\n");

     }else{

-      OUT().saveAssign(*static_cast<CIEC_ANY*>(getDI( static_cast<TForteUInt16>(K().getUnsignedValue() + 1))));

+      st_OUT().saveAssign(*static_cast<CIEC_ANY*>(getDI( static_cast<TForteUInt16>(K().getUnsignedValue() + 1))));

       sendOutputEvent(scm_nEventCNFID);

     }
   }

diff --git a/src/modules/IEC61131-3/Selection/F_MUX_2.h b/src/modules/IEC61131-3/Selection/F_MUX_2.h
index b60a0c4..c137dbe 100644
--- a/src/modules/IEC61131-3/Selection/F_MUX_2.h
+++ b/src/modules/IEC61131-3/Selection/F_MUX_2.h
@@ -36,7 +36,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY &OUT() {

+  CIEC_ANY &st_OUT() {

     return *static_cast<CIEC_ANY*>(getDO(0));
   };
 

diff --git a/src/modules/IEC61131-3/Selection/F_SEL.h b/src/modules/IEC61131-3/Selection/F_SEL.h
index 362a5dd..5e5057e 100644
--- a/src/modules/IEC61131-3/Selection/F_SEL.h
+++ b/src/modules/IEC61131-3/Selection/F_SEL.h
@@ -37,7 +37,7 @@
 

   static const CStringDictionary::TStringId scm_anDataOutputNames[];

   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_ANY &OUT() {

+  CIEC_ANY &st_OUT() {

     return *static_cast<CIEC_ANY*>(getDO(0));
   };
 

@@ -69,7 +69,7 @@
     oIn0.saveAssign(IN0());

     oIn1.saveAssign(IN1());

 

-    OUT().saveAssign(SEL<T> (G(), oIn0, oIn1));

+    st_OUT().saveAssign(SEL<T> (G(), oIn0, oIn1));

   }

 

   template<typename T> void calculateValueString(){

diff --git a/src/modules/IEC61131-3/Timers/FB_TOF.cpp b/src/modules/IEC61131-3/Timers/FB_TOF.cpp
index 59bc7e0..70e05b4 100644
--- a/src/modules/IEC61131-3/Timers/FB_TOF.cpp
+++ b/src/modules/IEC61131-3/Timers/FB_TOF.cpp
@@ -50,7 +50,7 @@
 
 void FB_TOF::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    if(IN() == true){
+    if(st_IN() == true){
       Q() = true;
       ET() = 0;
       fallingEdge = false;
diff --git a/src/modules/IEC61131-3/Timers/FB_TOF.h b/src/modules/IEC61131-3/Timers/FB_TOF.h
index e80b3f6..137333f 100644
--- a/src/modules/IEC61131-3/Timers/FB_TOF.h
+++ b/src/modules/IEC61131-3/Timers/FB_TOF.h
@@ -43,7 +43,7 @@
 

   void executeEvent(int pa_nEIID);

 

-  CIEC_BOOL& IN() {

+  CIEC_BOOL& st_IN() {

      return *static_cast<CIEC_BOOL*>(getDI(0));

   }  

 

diff --git a/src/modules/IEC61131-3/Timers/FB_TON.cpp b/src/modules/IEC61131-3/Timers/FB_TON.cpp
index 5594aa1..d509042 100644
--- a/src/modules/IEC61131-3/Timers/FB_TON.cpp
+++ b/src/modules/IEC61131-3/Timers/FB_TON.cpp
@@ -50,7 +50,7 @@
 
 void FB_TON::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    if(IN() == false){
+    if(st_IN() == false){
       Q() = false;
       ET() = 0;
       risingEdge = false;
diff --git a/src/modules/IEC61131-3/Timers/FB_TON.h b/src/modules/IEC61131-3/Timers/FB_TON.h
index 7b0e6a7..5d8f695 100644
--- a/src/modules/IEC61131-3/Timers/FB_TON.h
+++ b/src/modules/IEC61131-3/Timers/FB_TON.h
@@ -42,7 +42,7 @@
 

   void executeEvent(int pa_nEIID);

 

-  CIEC_BOOL& IN() {

+  CIEC_BOOL& st_IN() {

      return *static_cast<CIEC_BOOL*>(getDI(0));

   }  

 

diff --git a/src/modules/IEC61131-3/Timers/FB_TP.cpp b/src/modules/IEC61131-3/Timers/FB_TP.cpp
index 991527a..9761bd0 100644
--- a/src/modules/IEC61131-3/Timers/FB_TP.cpp
+++ b/src/modules/IEC61131-3/Timers/FB_TP.cpp
@@ -61,14 +61,14 @@
         }
       }
       else {
-        if(IN() == true && ET() == 0){
+        if(st_IN() == true && ET() == 0){
           Q() = true;
           edgeFlag = true;
           start = NOW_MONOTONIC();
           DEVLOG_DEBUG("start\n");
         }
         else
-          if((false == IN()) && (ET()>0)) {
+          if((false == st_IN()) && (ET()>0)) {
             ET() = 0;
             DEVLOG_DEBUG("reset\n");
           }
diff --git a/src/modules/IEC61131-3/Timers/FB_TP.h b/src/modules/IEC61131-3/Timers/FB_TP.h
index c0f8498..d3ffa56 100644
--- a/src/modules/IEC61131-3/Timers/FB_TP.h
+++ b/src/modules/IEC61131-3/Timers/FB_TP.h
@@ -41,7 +41,7 @@
 

   void executeEvent(int pa_nEIID);

 

-  CIEC_BOOL& IN() {

+  CIEC_BOOL& st_IN() {

      return *static_cast<CIEC_BOOL*>(getDI(0));

   }  

 

diff --git a/src/modules/arrowhead/eventHandler/FieldsToArrowheadEvent.cpp b/src/modules/arrowhead/eventHandler/FieldsToArrowheadEvent.cpp
index 37b3b17..d28f1d6 100644
--- a/src/modules/arrowhead/eventHandler/FieldsToArrowheadEvent.cpp
+++ b/src/modules/arrowhead/eventHandler/FieldsToArrowheadEvent.cpp
@@ -47,7 +47,7 @@
 i = 0;
 arrowheadEvent().type() = type();
 arrowheadEvent().payload() = payload();
-arrowheadEvent().timestamp() == timestamp();
+arrowheadEvent().timestamp() = timestamp();
 
 while((i < 10)){
 // looks like while is faster than FOR when exporting to cpp
diff --git a/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.cpp b/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.cpp
index 60da0e8..622af15 100644
--- a/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.cpp
+++ b/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_OrchestrationForm2OrchestrationForm::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID) {
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.h b/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.h
index 1188e17..2bc264b 100644
--- a/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.h
+++ b/src/modules/arrowhead/orchestrator/OrchestrationForm2OrchestrationForm.h
@@ -22,13 +22,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_OrchestrationForm &IN() {
+  CIEC_OrchestrationForm &st_IN() {
     return *static_cast<CIEC_OrchestrationForm*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_OrchestrationForm &OUT() {
+  CIEC_OrchestrationForm &st_OUT() {
     return *static_cast<CIEC_OrchestrationForm*>(getDO(0));
   };
 
diff --git a/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.cpp b/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.cpp
index 1286998..52420ae 100644
--- a/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.cpp
+++ b/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.cpp
@@ -43,7 +43,7 @@
 
 void FORTE_ServiceRegistryEntry2ServiceRegistryEntry::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID) {
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.h b/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.h
index 315e729..3ccb07d 100644
--- a/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.h
+++ b/src/modules/arrowhead/serviceRegistry/ServiceRegistryEntry2ServiceRegistryEntry.h
@@ -22,13 +22,13 @@
 private:
   static const CStringDictionary::TStringId scm_anDataInputNames[];
   static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-  CIEC_ServiceRegistryEntry &IN() {
+  CIEC_ServiceRegistryEntry &st_IN() {
     return *static_cast<CIEC_ServiceRegistryEntry*>(getDI(0));
   };
 
   static const CStringDictionary::TStringId scm_anDataOutputNames[];
   static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-  CIEC_ServiceRegistryEntry &OUT() {
+  CIEC_ServiceRegistryEntry &st_OUT() {
     return *static_cast<CIEC_ServiceRegistryEntry*>(getDO(0));
   };
 
diff --git a/src/modules/convert/BOOL2BOOL.cpp b/src/modules/convert/BOOL2BOOL.cpp
index 7a1ede8..90beb35 100644
--- a/src/modules/convert/BOOL2BOOL.cpp
+++ b/src/modules/convert/BOOL2BOOL.cpp
@@ -50,7 +50,7 @@
 
 void BOOL2BOOL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/BOOL2BOOL.h b/src/modules/convert/BOOL2BOOL.h
index ef4bd7b..f900a47 100644
--- a/src/modules/convert/BOOL2BOOL.h
+++ b/src/modules/convert/BOOL2BOOL.h
@@ -38,11 +38,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-CIEC_BOOL& IN() {

+CIEC_BOOL& st_IN() {

   return *static_cast<CIEC_BOOL*>(getDI(0));

 }

 

-CIEC_BOOL& OUT() {

+CIEC_BOOL& st_OUT() {

   return *static_cast<CIEC_BOOL*>(getDO(0));

 }

 

diff --git a/src/modules/convert/BYTE2BYTE.cpp b/src/modules/convert/BYTE2BYTE.cpp
index d3c1af3..4f30c71 100644
--- a/src/modules/convert/BYTE2BYTE.cpp
+++ b/src/modules/convert/BYTE2BYTE.cpp
@@ -50,7 +50,7 @@
 
 void BYTE2BYTE::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/BYTE2BYTE.h b/src/modules/convert/BYTE2BYTE.h
index 9c83bd5..afcdeb2 100644
--- a/src/modules/convert/BYTE2BYTE.h
+++ b/src/modules/convert/BYTE2BYTE.h
@@ -38,11 +38,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_BYTE& IN() {

+  CIEC_BYTE& st_IN() {

     return *static_cast<CIEC_BYTE*>(getDI(0));

   }

 

-  CIEC_BYTE& OUT() {

+  CIEC_BYTE& st_OUT() {

     return *static_cast<CIEC_BYTE*>(getDO(0));

   }

 

diff --git a/src/modules/convert/DINT2DINT.cpp b/src/modules/convert/DINT2DINT.cpp
index 803a5c3..9960396 100644
--- a/src/modules/convert/DINT2DINT.cpp
+++ b/src/modules/convert/DINT2DINT.cpp
@@ -50,7 +50,7 @@
 
 void DINT2DINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/DINT2DINT.h b/src/modules/convert/DINT2DINT.h
index 306d83f..02addda 100644
--- a/src/modules/convert/DINT2DINT.h
+++ b/src/modules/convert/DINT2DINT.h
@@ -38,11 +38,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_DINT& IN() {

+  CIEC_DINT& st_IN() {

     return *static_cast<CIEC_DINT*>(getDI(0));

   }

 

-  CIEC_DINT& OUT() {

+  CIEC_DINT& st_OUT() {

     return *static_cast<CIEC_DINT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/DWORD2DWORD.cpp b/src/modules/convert/DWORD2DWORD.cpp
index e374aa7..cd55749 100644
--- a/src/modules/convert/DWORD2DWORD.cpp
+++ b/src/modules/convert/DWORD2DWORD.cpp
@@ -51,7 +51,7 @@
 
 void DWORD2DWORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/DWORD2DWORD.h b/src/modules/convert/DWORD2DWORD.h
index e03ff33..63e7c80 100644
--- a/src/modules/convert/DWORD2DWORD.h
+++ b/src/modules/convert/DWORD2DWORD.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_DWORD& IN() {

+  CIEC_DWORD& st_IN() {

     return *static_cast<CIEC_DWORD*>(getDI(0));

   }

 

-  CIEC_DWORD& OUT() {

+  CIEC_DWORD& st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDO(0));

   }

 

diff --git a/src/modules/convert/GEN_STRUCT_DEMUX.cpp b/src/modules/convert/GEN_STRUCT_DEMUX.cpp
index a9e5436..0e127bc 100644
--- a/src/modules/convert/GEN_STRUCT_DEMUX.cpp
+++ b/src/modules/convert/GEN_STRUCT_DEMUX.cpp
@@ -32,8 +32,8 @@
 
 void GEN_STRUCT_DEMUX::executeEvent(int paEIID) {
   if(scm_nEventREQID == paEIID) {
-    CIEC_ANY *members = IN().getMembers();
-    for (size_t i = 0; i < IN().getStructSize(); i++){
+    CIEC_ANY *members = st_IN().getMembers();
+    for (size_t i = 0; i < st_IN().getStructSize(); i++){
       getDO(static_cast<unsigned int>(i))->setValue(members[i]);
     }
     sendOutputEvent(scm_nEventCNFID);
diff --git a/src/modules/convert/GEN_STRUCT_DEMUX.h b/src/modules/convert/GEN_STRUCT_DEMUX.h
index 4fede76..2d00347 100644
--- a/src/modules/convert/GEN_STRUCT_DEMUX.h
+++ b/src/modules/convert/GEN_STRUCT_DEMUX.h
@@ -34,7 +34,7 @@
     void executeEvent(int paEIID);
     virtual bool createInterfaceSpec(const char *paConfigString, SFBInterfaceSpec &paInterfaceSpec);
 
-    CIEC_STRUCT& IN() {
+    CIEC_STRUCT& st_IN() {
        return *static_cast<CIEC_STRUCT*>(getDI(0));
     }
 
diff --git a/src/modules/convert/GEN_STRUCT_MUX.cpp b/src/modules/convert/GEN_STRUCT_MUX.cpp
index b63e25e..9752551 100644
--- a/src/modules/convert/GEN_STRUCT_MUX.cpp
+++ b/src/modules/convert/GEN_STRUCT_MUX.cpp
@@ -30,8 +30,8 @@
 
 void GEN_STRUCT_MUX::executeEvent(int paEIID) {
   if(scm_nEventREQID == paEIID) {
-    CIEC_ANY *members = OUT().getMembers();
-    for (size_t i = 0; i < OUT().getStructSize(); i++){
+    CIEC_ANY *members = st_OUT().getMembers();
+    for (size_t i = 0; i < st_OUT().getStructSize(); i++){
       members[i].setValue(*getDI(static_cast<unsigned int>(i)));
     }
     sendOutputEvent(scm_nEventCNFID);
diff --git a/src/modules/convert/GEN_STRUCT_MUX.h b/src/modules/convert/GEN_STRUCT_MUX.h
index 9f616b8..b0de1ea 100644
--- a/src/modules/convert/GEN_STRUCT_MUX.h
+++ b/src/modules/convert/GEN_STRUCT_MUX.h
@@ -34,7 +34,7 @@
     void executeEvent(int paEIID);
     virtual bool createInterfaceSpec(const char *paConfigString, SFBInterfaceSpec &paInterfaceSpec);
 
-    CIEC_STRUCT& OUT() {
+    CIEC_STRUCT& st_OUT() {
        return *static_cast<CIEC_STRUCT*>(getDO(0));
      }
 
diff --git a/src/modules/convert/INT2INT.cpp b/src/modules/convert/INT2INT.cpp
index c777d91..edf71b1 100644
--- a/src/modules/convert/INT2INT.cpp
+++ b/src/modules/convert/INT2INT.cpp
@@ -50,7 +50,7 @@
 
 void INT2INT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/INT2INT.h b/src/modules/convert/INT2INT.h
index 7bebe6f..3a03da8 100644
--- a/src/modules/convert/INT2INT.h
+++ b/src/modules/convert/INT2INT.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_INT& IN() {

+  CIEC_INT& st_IN() {

     return *static_cast<CIEC_INT*>(getDI(0));

   }

 

-  CIEC_INT& OUT() {

+  CIEC_INT& st_OUT() {

     return *static_cast<CIEC_INT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/LREAL2LREAL.cpp b/src/modules/convert/LREAL2LREAL.cpp
index 9ac6f7f..3beb675 100644
--- a/src/modules/convert/LREAL2LREAL.cpp
+++ b/src/modules/convert/LREAL2LREAL.cpp
@@ -50,7 +50,7 @@
 
 void LREAL2LREAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/LREAL2LREAL.h b/src/modules/convert/LREAL2LREAL.h
index 76dd8b8..73ba346 100644
--- a/src/modules/convert/LREAL2LREAL.h
+++ b/src/modules/convert/LREAL2LREAL.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_LREAL& IN() {

+  CIEC_LREAL& st_IN() {

     return *static_cast<CIEC_LREAL*>(getDI(0));

   }

 

-  CIEC_LREAL& OUT() {

+  CIEC_LREAL& st_OUT() {

     return *static_cast<CIEC_LREAL*>(getDO(0));

   }

 

diff --git a/src/modules/convert/REAL2REAL.cpp b/src/modules/convert/REAL2REAL.cpp
index cdd5afd..451976b 100644
--- a/src/modules/convert/REAL2REAL.cpp
+++ b/src/modules/convert/REAL2REAL.cpp
@@ -50,7 +50,7 @@
 
 void REAL2REAL::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/REAL2REAL.h b/src/modules/convert/REAL2REAL.h
index eb86595..9978c5f 100644
--- a/src/modules/convert/REAL2REAL.h
+++ b/src/modules/convert/REAL2REAL.h
@@ -37,11 +37,11 @@
 

    virtual void executeEvent(int pa_nEIID);

 

-   CIEC_REAL& IN() {

+   CIEC_REAL& st_IN() {

      return *static_cast<CIEC_REAL*>(getDI(0));

    }

 

-   CIEC_REAL& OUT() {

+   CIEC_REAL& st_OUT() {

      return *static_cast<CIEC_REAL*>(getDO(0));

    }

 

diff --git a/src/modules/convert/SINT2SINT.cpp b/src/modules/convert/SINT2SINT.cpp
index 688a081..410acbb 100644
--- a/src/modules/convert/SINT2SINT.cpp
+++ b/src/modules/convert/SINT2SINT.cpp
@@ -50,7 +50,7 @@
 
 void SINT2SINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/SINT2SINT.h b/src/modules/convert/SINT2SINT.h
index b7d43da..e643285 100644
--- a/src/modules/convert/SINT2SINT.h
+++ b/src/modules/convert/SINT2SINT.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_SINT& IN() {

+  CIEC_SINT& st_IN() {

     return *static_cast<CIEC_SINT*>(getDI(0));

   }

 

-  CIEC_SINT& OUT() {

+  CIEC_SINT& st_OUT() {

     return *static_cast<CIEC_SINT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/STRING2STRING.cpp b/src/modules/convert/STRING2STRING.cpp
index a216da6..1edd95f 100644
--- a/src/modules/convert/STRING2STRING.cpp
+++ b/src/modules/convert/STRING2STRING.cpp
@@ -50,7 +50,7 @@
 
 void STRING2STRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/STRING2STRING.h b/src/modules/convert/STRING2STRING.h
index 1b7fab3..1089efc 100644
--- a/src/modules/convert/STRING2STRING.h
+++ b/src/modules/convert/STRING2STRING.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_STRING& IN() {

+  CIEC_STRING& st_IN() {

     return *static_cast<CIEC_STRING*>(getDI(0));

   }

 

-  CIEC_STRING& OUT() {

+  CIEC_STRING& st_OUT() {

     return *static_cast<CIEC_STRING*>(getDO(0));

   }

 

diff --git a/src/modules/convert/TIME2TIME.cpp b/src/modules/convert/TIME2TIME.cpp
index a2d27e3..d7a035d 100644
--- a/src/modules/convert/TIME2TIME.cpp
+++ b/src/modules/convert/TIME2TIME.cpp
@@ -47,7 +47,7 @@
 
 void TIME2TIME::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/TIME2TIME.h b/src/modules/convert/TIME2TIME.h
index 1efa138..3a2d7ef 100644
--- a/src/modules/convert/TIME2TIME.h
+++ b/src/modules/convert/TIME2TIME.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_TIME& IN() {

+  CIEC_TIME& st_IN() {

     return *static_cast<CIEC_TIME*>(getDI(0));

   }

 

-  CIEC_TIME& OUT() {

+  CIEC_TIME& st_OUT() {

     return *static_cast<CIEC_TIME*>(getDO(0));

   }

 

diff --git a/src/modules/convert/UDINT2UDINT.cpp b/src/modules/convert/UDINT2UDINT.cpp
index df6b6a5..7f935bd 100644
--- a/src/modules/convert/UDINT2UDINT.cpp
+++ b/src/modules/convert/UDINT2UDINT.cpp
@@ -50,7 +50,7 @@
 
 void UDINT2UDINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/UDINT2UDINT.h b/src/modules/convert/UDINT2UDINT.h
index 9a595cb..e6576bf 100644
--- a/src/modules/convert/UDINT2UDINT.h
+++ b/src/modules/convert/UDINT2UDINT.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_UDINT& IN() {

+  CIEC_UDINT& st_IN() {

     return *static_cast<CIEC_UDINT*>(getDI(0));

   }

 

-  CIEC_UDINT& OUT() {

+  CIEC_UDINT& st_OUT() {

     return *static_cast<CIEC_UDINT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/UINT2UINT.cpp b/src/modules/convert/UINT2UINT.cpp
index d987107..31bade3 100644
--- a/src/modules/convert/UINT2UINT.cpp
+++ b/src/modules/convert/UINT2UINT.cpp
@@ -50,7 +50,7 @@
 
 void UINT2UINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/UINT2UINT.h b/src/modules/convert/UINT2UINT.h
index 329b0a7..497bc83 100644
--- a/src/modules/convert/UINT2UINT.h
+++ b/src/modules/convert/UINT2UINT.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_UINT& IN() {

+  CIEC_UINT& st_IN() {

     return *static_cast<CIEC_UINT*>(getDI(0));

   }

 

-  CIEC_UINT& OUT() {

+  CIEC_UINT& st_OUT() {

     return *static_cast<CIEC_UINT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/USINT2USINT.cpp b/src/modules/convert/USINT2USINT.cpp
index 33ebe7f..07b7ccc 100644
--- a/src/modules/convert/USINT2USINT.cpp
+++ b/src/modules/convert/USINT2USINT.cpp
@@ -50,7 +50,7 @@
 
 void USINT2USINT::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/USINT2USINT.h b/src/modules/convert/USINT2USINT.h
index c07283b..860e254 100644
--- a/src/modules/convert/USINT2USINT.h
+++ b/src/modules/convert/USINT2USINT.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_USINT& IN() {

+  CIEC_USINT& st_IN() {

     return *static_cast<CIEC_USINT*>(getDI(0));

   }

 

-  CIEC_USINT& OUT() {

+  CIEC_USINT& st_OUT() {

     return *static_cast<CIEC_USINT*>(getDO(0));

   }

 

diff --git a/src/modules/convert/WORD2WORD.cpp b/src/modules/convert/WORD2WORD.cpp
index ea3d19c..dc6d216 100644
--- a/src/modules/convert/WORD2WORD.cpp
+++ b/src/modules/convert/WORD2WORD.cpp
@@ -50,7 +50,7 @@
 
 void WORD2WORD::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/WORD2WORD.h b/src/modules/convert/WORD2WORD.h
index 0d5983e..6131e47 100644
--- a/src/modules/convert/WORD2WORD.h
+++ b/src/modules/convert/WORD2WORD.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_WORD& IN() {

+  CIEC_WORD& st_IN() {

     return *static_cast<CIEC_WORD*>(getDI(0));

   }

 

-  CIEC_WORD& OUT() {

+  CIEC_WORD& st_OUT() {

     return *static_cast<CIEC_WORD*>(getDO(0));

   }

 

diff --git a/src/modules/convert/WSTRING2WSTRING.cpp b/src/modules/convert/WSTRING2WSTRING.cpp
index d2ff968..1f80736 100644
--- a/src/modules/convert/WSTRING2WSTRING.cpp
+++ b/src/modules/convert/WSTRING2WSTRING.cpp
@@ -50,7 +50,7 @@
 
 void WSTRING2WSTRING::executeEvent(int pa_nEIID){
   if(scm_nEventREQID == pa_nEIID){
-    OUT() = IN();
+    st_OUT() = st_IN();
     sendOutputEvent(scm_nEventCNFID);
   }
 }
diff --git a/src/modules/convert/WSTRING2WSTRING.h b/src/modules/convert/WSTRING2WSTRING.h
index fff1c7e..790a270 100644
--- a/src/modules/convert/WSTRING2WSTRING.h
+++ b/src/modules/convert/WSTRING2WSTRING.h
@@ -37,11 +37,11 @@
 

   virtual void executeEvent(int pa_nEIID);

 

-  CIEC_WSTRING& IN() {

+  CIEC_WSTRING& st_IN() {

     return *static_cast<CIEC_WSTRING*>(getDI(0));

   }

 

-  CIEC_WSTRING& OUT() {

+  CIEC_WSTRING& st_OUT() {

     return *static_cast<CIEC_WSTRING*>(getDO(0));

   }

 

diff --git a/src/modules/modbus/CMakeLists.txt b/src/modules/modbus/CMakeLists.txt
deleted file mode 100644
index 86aa0e3..0000000
--- a/src/modules/modbus/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-#*******************************************************************************

-# Copyright (c) 2012 -2014 AIT, fortiss GmbH

-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# SPDX-License-Identifier: EPL-2.0

-# 
-# Contributors:
-#    Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

-# *******************************************************************************/

-#############################################################################

-# Modbus Com Layer

-#############################################################################

-forte_add_network_layer(MODBUS OFF "modbus" CModbusComLayer modbuslayer "Enable Modbus Com Layer")

-SET(FORTE_COM_MODBUS_LIB_DIR "" CACHE PATH "Path to Modbus library directory (leave empty for installed source code)")

-

-if(FORTE_COM_MODBUS)

-   forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})

-   forte_add_sourcefile_hcpp( modbushandler 

-                 modbusconnection 

-                 modbusclientconnection

-                 modbuspoll

-                 modbustimedevent )

-                 

-  forte_add_handler(CModbusHandler modbushandler)

-      forte_add_include_directories( ${FORTE_COM_MODBUS_LIB_DIR}/include )           

-  if("${FORTE_ARCHITECTURE}" STREQUAL "Posix")

-      if(EXISTS ${FORTE_COM_MODBUS_LIB_DIR})

-        forte_add_include_directories( ${FORTE_COM_MODBUS_LIB_DIR}/include/modbus )

-        forte_add_link_directories( ${FORTE_COM_MODBUS_LIB_DIR}/lib )

-      else(EXISTS ${FORTE_COM_MODBUS_LIB_DIR})

-          forte_add_include_directories( /usr/include/modbus )

-      endif(EXISTS ${FORTE_COM_MODBUS_LIB_DIR})

-      forte_add_link_library( libmodbus.so )

-  elseif("${FORTE_ARCHITECTURE}" STREQUAL "Win32")

-    forte_add_include_directories( ${FORTE_COM_MODBUS_LIB_DIR}/include )

-    forte_add_link_directories( ${FORTE_COM_MODBUS_LIB_DIR}/lib )

-    forte_add_link_library( libmodbus.lib ) 

-  endif()

-  

-

-endif(FORTE_COM_MODBUS)

diff --git a/src/modules/modbus/modbusclientconnection.cpp b/src/modules/modbus/modbusclientconnection.cpp
deleted file mode 100644
index 8e6cffd..0000000
--- a/src/modules/modbus/modbusclientconnection.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "modbusclientconnection.h"

-#include "devlog.h"

-#include "modbuspoll.h"

-#include <forte_thread.h>

-

-using namespace modbus_connection_event;

-

-/*************************************

- * CModbusClientConnection class

- *************************************/

-

-CModbusClientConnection::CModbusClientConnection(CModbusHandler* pa_modbusHandler) :

-    CModbusConnection(pa_modbusHandler), m_pModbusConnEvent(NULL), m_nNrOfPolls(0), m_nSlaveId(0xFF), m_unBufFillSize(0){

-  memset(m_anRecvBuffPosition, 0, sizeof(m_anRecvBuffPosition)); //TODO change this to  m_anRecvBuffPosition{0} in the extended list when fully switching to C++11

-  memset(m_acRecvBuffer, 0, sizeof(m_acRecvBuffer)); //TODO change this to  m_acRecvBuffer{0} in the extended list when fully switching to C++11

-}

-

-CModbusClientConnection::~CModbusClientConnection(){

-  if (m_bConnected){

-    disconnect();

-  }

-  TModbusPollList::Iterator itEnd(m_lstPollList.end());

-  for(TModbusPollList::Iterator itRunner = m_lstPollList.begin(); itRunner != itEnd; ++itRunner){

-    delete *itRunner;

-  }

-  if (m_pModbusConnEvent != NULL){

-    delete m_pModbusConnEvent;

-  }

-}

-

-int CModbusClientConnection::readData(uint8_t *pa_pData){

-  for(unsigned int i = 0; i < m_unBufFillSize; i++){

-    pa_pData[i] = m_acRecvBuffer[i];

-  }

-

-  return (int) m_unBufFillSize;

-}

-

-int CModbusClientConnection::writeData(uint16_t *pa_pData, unsigned int pa_nDataSize){

-  unsigned int dataIndex = 0;

-

-  TModbusSendList::Iterator itEnd = m_lstSendList.end();

-  for (TModbusSendList::Iterator it = m_lstSendList.begin(); it!=itEnd; ++it) {

-    if (dataIndex + it->m_nNrAddresses > pa_nDataSize) {

-      break;

-    }

-    modbus_write_registers(m_pModbusConn, it->m_nStartAddress, it->m_nNrAddresses, &pa_pData[dataIndex]);

-    dataIndex += it->m_nNrAddresses;

-  }

-

-  return (int)dataIndex;

-}

-

-int CModbusClientConnection::connect(){

-  CModbusConnection::connect();

-

-  if(m_nSlaveId != 0xFF){

-    modbus_set_slave(m_pModbusConn, m_nSlaveId);

-  }

-

-  m_pModbusConnEvent = new CModbusConnectionEvent(1000);

-  m_pModbusConnEvent->activate();

-

-  this->start();

-

-  return 0;

-}

-

-void CModbusClientConnection::disconnect(){

-  this->end();

-  if (m_bConnected){

-    modbus_close(m_pModbusConn);

-    m_bConnected = false;

-  }

-  CModbusConnection::disconnect();

-}

-

-void CModbusClientConnection::addNewPoll(TForteUInt32 pa_nPollInterval, unsigned int pa_nFunctionCode, unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses){

-  CModbusPoll *newPoll = NULL;

-

-  TModbusPollList::Iterator itEnd = m_lstPollList.end();

-  for(TModbusPollList::Iterator it = m_lstPollList.begin(); it != itEnd; ++it){

-    if(it->getUpdateInterval() == pa_nPollInterval && it->getFunctionCode() == pa_nFunctionCode){

-      it->addPollAddresses(pa_nStartAddress, pa_nNrAddresses);

-      newPoll = *it;

-      break;

-    }

-  }

-  if(newPoll == NULL){

-    m_lstPollList.pushBack(new CModbusPoll(pa_nPollInterval, pa_nFunctionCode, pa_nStartAddress, pa_nNrAddresses));

-    m_nNrOfPolls++;

-    m_anRecvBuffPosition[m_nNrOfPolls - 1] = m_unBufFillSize;

-  }

-

-  // Count bytes

-  unsigned int nrBytes = 0;

-  switch (pa_nFunctionCode){

-    case 1:

-    case 2:

-      nrBytes = pa_nNrAddresses;

-      break;

-    case 3:

-    case 4:

-      nrBytes = pa_nNrAddresses * 2;

-      break;

-  }

-  for(unsigned int i = m_unBufFillSize; i < m_unBufFillSize + nrBytes; i++){

-    m_acRecvBuffer[i] = 0;

-  }

-  m_unBufFillSize += nrBytes;

-}

-

-void CModbusClientConnection::addNewSend(unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses) {

-  SSendInformation sendInfo = {pa_nStartAddress, pa_nNrAddresses};

-

-  m_lstSendList.pushBack(sendInfo);

-}

-

-void CModbusClientConnection::setSlaveId(unsigned int pa_nSlaveId){

-  m_nSlaveId = pa_nSlaveId;

-}

-

-void CModbusClientConnection::run(){

-

-  while(isAlive()){

-    if(m_bConnected){

-      tryPolling();

-    }

-    else{

-      tryConnect();

-    }

-

-    CThread::sleepThread(1);

-  }

-}

-

-void CModbusClientConnection::tryPolling(){

-  unsigned int nrErrors = 0;

-  bool dataReturned = false;

-

-  unsigned int index = 0;

-  TModbusPollList::Iterator itEnd(m_lstPollList.end());

-  for(TModbusPollList::Iterator itPoll = m_lstPollList.begin(); itPoll != itEnd; ++itPoll, ++index){

-    if(itPoll->readyToExecute()){

-      int nrVals = itPoll->executeEvent(m_pModbusConn, (void*) &m_acRecvBuffer[m_anRecvBuffPosition[index]]); // retVal);

-

-      if(nrVals < 0){

-        DEVLOG_ERROR("Error reading input status :: %s\n", modbus_strerror(errno));

-        itPoll->deactivate();

-

-        nrErrors++;

-      }

-      else if(nrVals > 0){

-        dataReturned = true;

-      }

-    }

-  }

-

-  if(dataReturned) {

-    m_pModbusHandler->executeComCallback(m_nComCallbackId);

-  }

-

-  if((nrErrors == m_nNrOfPolls) && (0 != m_nNrOfPolls)){

-    modbus_close(m_pModbusConn); // in any case it is worth trying to close the socket

-    m_bConnected = false;

-    m_pModbusConnEvent = new CModbusConnectionEvent(1000);

-    m_pModbusConnEvent->activate();

-  }

-}

-

-void CModbusClientConnection::tryConnect(){

-  if(m_pModbusConnEvent != NULL){

-    if(m_pModbusConnEvent->readyToExecute()){

-      if(m_pModbusConnEvent->executeEvent(m_pModbusConn, NULL) < 0) {

-        DEVLOG_ERROR("Connection to Modbus server failed: %s\n", modbus_strerror(errno));

-      } else {

-        DEVLOG_INFO("Connection to Modbus server succeded\n");

-

-        delete m_pModbusConnEvent;

-        m_pModbusConnEvent = NULL;

-

-        m_bConnected = true;

-

-        // Start polling

-        TModbusPollList::Iterator itEnd(m_lstPollList.end());

-        for(TModbusPollList::Iterator itPoll = m_lstPollList.begin(); itPoll != itEnd; ++itPoll){

-          itPoll->activate();

-        }

-      }

-    }

-  }

-}

-

-/*************************************

- * CModbusConnectionEvent class

- *************************************/

-CModbusConnectionEvent::CModbusConnectionEvent(long pa_nReconnectInterval) :

-    CModbusTimedEvent(pa_nReconnectInterval){

-}

-

-int CModbusConnectionEvent::executeEvent(modbus_t *pa_pModbusConn, void *pa_pRetVal){

-  (void)pa_pRetVal; // avoid warning

-

-  restartTimer();

-

-  return modbus_connect(pa_pModbusConn);

-}

-

diff --git a/src/modules/modbus/modbusclientconnection.h b/src/modules/modbus/modbusclientconnection.h
deleted file mode 100644
index cb2bea8..0000000
--- a/src/modules/modbus/modbusclientconnection.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _MODBUSCLIENTCONNECTION_H_

-#define _MODBUSCLIENTCONNECTION_H_

-

-#include "modbusconnection.h"

-#include "modbustimedevent.h"

-#include "fortelist.h"

-

-class CModbusPoll;

-

-namespace modbus_connection_event {

-  class CModbusConnectionEvent : public CModbusTimedEvent{

-    public:

-      explicit CModbusConnectionEvent(long pa_nReconnectInterval); //ReconnectInterval = 0 => only one connection try

-      ~CModbusConnectionEvent(){

-      }

-      ;

-

-      int executeEvent(modbus_t *pa_pModbusConn, void *pa_pRetVal);

-  };

-}

-

-class CModbusClientConnection : public CModbusConnection{

-  public:

-    explicit CModbusClientConnection(CModbusHandler* pa_modbusHandler);

-    ~CModbusClientConnection();

-

-    int readData(uint8_t *pa_pData);

-    int writeData(uint16_t *pa_pData, unsigned int pa_nDataSize);

-    int connect();

-    void disconnect();

-

-    void addNewPoll(TForteUInt32 pa_nPollInterval, unsigned int pa_nFunctionCode, unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses);

-    void addNewSend(unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses);

-

-    void setSlaveId(unsigned int pa_nSlaveId);

-

-  protected:

-    virtual void run();

-

-  private:

-    void tryConnect();

-    void tryPolling();

-

-    struct SSendInformation {

-      unsigned int m_nStartAddress;

-      unsigned int m_nNrAddresses;

-    };

-

-    modbus_connection_event::CModbusConnectionEvent *m_pModbusConnEvent;

-

-    typedef CSinglyLinkedList<CModbusPoll*> TModbusPollList;

-    TModbusPollList m_lstPollList;

-

-    typedef CSinglyLinkedList<SSendInformation> TModbusSendList;

-    TModbusSendList m_lstSendList;

-

-    unsigned int m_nNrOfPolls;

-    unsigned int m_anRecvBuffPosition[100];

-

-    unsigned int m_nSlaveId;

-

-    uint8_t m_acRecvBuffer[cg_unIPLayerRecvBufferSize];

-    unsigned int m_unBufFillSize;

-

-};

-

-#endif

diff --git a/src/modules/modbus/modbusconnection.cpp b/src/modules/modbus/modbusconnection.cpp
deleted file mode 100644
index 9337d58..0000000
--- a/src/modules/modbus/modbusconnection.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "modbusconnection.h"

-#include "modbuslayer.h"

-#include "../../core/cominfra/basecommfb.h"

-

-CModbusConnection::CModbusConnection(CModbusHandler* pa_modbusHandler) : m_pModbusConn(NULL), m_pModbusHandler(pa_modbusHandler), m_nComCallbackId(0),

-  m_bConnected(false), m_paIPAddress(NULL), m_nPort(0),

-  m_chDevice(NULL), m_nBaud(0), m_cParity(0), m_nDataBit(0),

-   m_nStopBit(0), m_nResponseTimeout(0), m_nByteTimeout(0){

-}

-    

-CModbusConnection::~CModbusConnection(){

-  modbus_free(m_pModbusConn);

-}

-

-int CModbusConnection::connect(){

-  if (m_paIPAddress != NULL) {

-    m_pModbusConn = modbus_new_tcp(m_paIPAddress, m_nPort);

-  } else if (m_chDevice != NULL) {

-    m_pModbusConn = modbus_new_rtu(m_chDevice, m_nBaud, m_cParity, m_nDataBit, m_nStopBit);

-  } else {

-    return -1;

-  }

-

-  if(m_nResponseTimeout > 0){

-    timeval responseTimeout;

-    responseTimeout.tv_sec = m_nResponseTimeout / 1000;

-    responseTimeout.tv_usec = (m_nResponseTimeout % 1000)*1000;

-    //modbus_set_response_timeout(m_pModbusConn, &responseTimeout);

-  }

-  if(m_nByteTimeout > 0){

-    timeval byteTimeout;

-    byteTimeout.tv_sec = m_nByteTimeout / 1000;

-    byteTimeout.tv_usec = (m_nByteTimeout % 1000)*1000;

-    //modbus_set_byte_timeout(m_pModbusConn, &byteTimeout);

-  }

-

-  return 0;

-}

-

-void CModbusConnection::disconnect(){

-

-}

-

-void CModbusConnection::setIPAddress(const char* pa_poIPAddress){

-  m_paIPAddress = pa_poIPAddress;

-}

-

-void CModbusConnection::setPort(unsigned int pa_nPort){

-  m_nPort = pa_nPort;

-}

-

-void CModbusConnection::setDevice(const char* pa_chDevice) {

-  m_chDevice = pa_chDevice;

-}

-

-void CModbusConnection::setBaud(int pa_nBaud) {

-  m_nBaud = pa_nBaud;

-}

-

-void CModbusConnection::setParity(char pa_cParity) {

-  m_cParity = pa_cParity;

-}

-

-void CModbusConnection::setDataBit(int pa_nDataBit) {

-  m_nDataBit = pa_nDataBit;

-}

-

-void CModbusConnection::setStopBit(int pa_nStopBit) {

-  m_nStopBit = pa_nStopBit;

-}

-

-void CModbusConnection::setResponseTimeout(unsigned int pa_nResponseTimeout){

-  m_nResponseTimeout = pa_nResponseTimeout;

-}

-

-void CModbusConnection::setByteTimeout(unsigned int pa_nByteTimeout){

-  m_nByteTimeout = pa_nByteTimeout;

-}

-

-void CModbusConnection::setComCallback(forte::com_infra::CModbusComLayer* pa_poModbusLayer){

-  m_nComCallbackId = m_pModbusHandler->addComCallback(pa_poModbusLayer);

-}

diff --git a/src/modules/modbus/modbusconnection.h b/src/modules/modbus/modbusconnection.h
deleted file mode 100644
index 583fefd..0000000
--- a/src/modules/modbus/modbusconnection.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _MODBUSCONNECTION_H_

-#define _MODBUSCONNECTION_H_

-

-#include <modbus.h>

-#include <forte_thread.h>

-#include "modbushandler.h"

-#include <errno.h>

-

-namespace forte{

-  namespace com_infra{

-    class CModbusComLayer;

-  }

-}

-

-class CModbusConnection : public CThread{

-  public:

-    explicit CModbusConnection(CModbusHandler* pa_modbusHandler);

-    ~CModbusConnection();

-

-    virtual int readData(uint8_t *pa_pData) = 0;

-    virtual int writeData(uint16_t *pa_pData, unsigned int pa_nDataSize) = 0;

-    virtual void run() = 0;

-

-    /*! \brief Initializes Modbus connection

-     *

-     *  Any classes derived from this class must call CModbusConnection::connect() in the beginning

-     *  of their connect() function

-     */

-    virtual int connect();

-    /*! \brief De-initializes Modbus connection

-     *

-     *  Any classes derived from this class should call CModbusConnection::connect() at the end

-     *  of their disconnect() function

-     */

-    virtual void disconnect();

-

-    void setIPAddress(const char* pa_poIPAddress);

-    void setPort(unsigned int pa_nPort);

-

-    void setDevice(const char* pa_chDevice);

-    void setBaud(int pa_nBaud);

-    void setParity(char pa_cParity);

-    void setDataBit(int pa_nDataBit);

-    void setStopBit(int pa_nStopBit);

-    void setResponseTimeout(unsigned int pa_nResponseTimeout);

-    void setByteTimeout(unsigned int pa_nByteTimeout);

-

-    void setComCallback(forte::com_infra::CModbusComLayer* pa_poModbusLayer);

-

-  protected:

-    modbus_t* m_pModbusConn;

-    CModbusHandler* m_pModbusHandler;

-

-    CModbusHandler::TCallbackDescriptor m_nComCallbackId;

-

-    bool m_bConnected;

-

-  private:

-    const char* m_paIPAddress;

-    unsigned int m_nPort;

-

-    const char* m_chDevice;

-    int m_nBaud;

-    char m_cParity;

-    int m_nDataBit;

-    int m_nStopBit;

-

-    unsigned int m_nResponseTimeout;

-    unsigned int m_nByteTimeout;

-};

-

-#endif  // _MODBUSCONNECTION_H_

diff --git a/src/modules/modbus/modbushandler.cpp b/src/modules/modbus/modbushandler.cpp
deleted file mode 100644
index faf0ece..0000000
--- a/src/modules/modbus/modbushandler.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "modbushandler.h"

-#include "devlog.h"

-#include "../core/devexec.h"

-#include <criticalregion.h>

-#include <commfb.h>

-

-DEFINE_HANDLER(CModbusHandler);

-

-CModbusHandler::TCallbackDescriptor CModbusHandler::m_nCallbackDescCount = 0;

-

-CModbusHandler::CModbusHandler(CDeviceExecution& pa_poDeviceExecution) : CExternalEventHandler(pa_poDeviceExecution)  {

-}

-

-CModbusHandler::~CModbusHandler(){

-

-}

-

-CModbusHandler::TCallbackDescriptor CModbusHandler::addComCallback(forte::com_infra::CComLayer* pa_pComCallback){

-  CCriticalRegion criticalRegion(m_oSync);

-  m_nCallbackDescCount++;

-  TComContainer stNewNode = { m_nCallbackDescCount, pa_pComCallback };

-  m_lstComCallbacks.pushBack(stNewNode);

-

-  return m_nCallbackDescCount;

-}

-

-void CModbusHandler::removeComCallback(CModbusHandler::TCallbackDescriptor pa_nCallbackDesc){

-  CCriticalRegion criticalRegion(m_oSync);

-

-  TCallbackList::Iterator itRunner(m_lstComCallbacks.begin());

-

-  if(itRunner->m_nCallbackDesc == pa_nCallbackDesc){

-    m_lstComCallbacks.popFront();

-  }

-  else{

-    TCallbackList::Iterator itLastPos(itRunner);

-    TCallbackList::Iterator itEnd(m_lstComCallbacks.end());

-    ++itRunner;

-    while(itRunner != itEnd){

-      if(itRunner->m_nCallbackDesc == pa_nCallbackDesc){

-        m_lstComCallbacks.eraseAfter(itLastPos);

-        break;

-      }

-      itLastPos = itRunner;

-      ++itRunner;

-    }

-  }

-}

-

-void CModbusHandler::executeComCallback(CModbusHandler::TCallbackDescriptor pa_nCallbackDesc){

-  m_oSync.lock();

-  TCallbackList::Iterator itEnd(m_lstComCallbacks.end());

-  TCallbackList::Iterator itCurrent(m_lstComCallbacks.begin());

-  for(TCallbackList::Iterator itCallback = m_lstComCallbacks.begin(); itCallback != itEnd; ++itCallback){

-    itCurrent = itCallback;

-

-    if(itCurrent->m_nCallbackDesc == pa_nCallbackDesc){

-      forte::com_infra::CComLayer *comLayer = itCurrent->m_pCallback;

-      m_oSync.unlock();

-      if(forte::com_infra::e_Nothing != comLayer->recvData(0,0)){

-        startNewEventChain(comLayer->getCommFB());

-      }

-      m_oSync.lock();

-      break;

-    }

-  }

-  m_oSync.unlock();

-}

diff --git a/src/modules/modbus/modbushandler.h b/src/modules/modbus/modbushandler.h
deleted file mode 100644
index 8735434..0000000
--- a/src/modules/modbus/modbushandler.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 -2015 AIT, fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation
- *******************************************************************************/
-#ifndef _MODBUSHANDLER_H_
-#define _MODBUSHANDLER_H_
-
-#include <forte_config.h>
-#include "extevhan.h"
-#include <forte_sync.h>
-#include <comlayer.h>
-#include <fortelist.h>
-
-class CModbusHandler : public CExternalEventHandler{
-    DECLARE_HANDLER(CModbusHandler)
-  public:
-    typedef int TCallbackDescriptor;
-
-    void enableHandler(void){
-    }
-    ;
-    void disableHandler(void){
-    }
-    ;
-
-    void setPriority(int){
-      //currently we are doing nothing here.
-      //TODO We should adjust the thread priority.
-    }
-
-    int getPriority(void) const{
-      //the same as for setPriority
-      return 0;
-    }
-
-    TCallbackDescriptor addComCallback(forte::com_infra::CComLayer* pa_pComCallback);
-    void removeComCallback(TCallbackDescriptor pa_nCallbackDesc);
-
-    void executeComCallback(TCallbackDescriptor pa_nCallbackDesc);
-
-  private:
-    struct TComContainer{
-        TCallbackDescriptor m_nCallbackDesc;
-        forte::com_infra::CComLayer* m_pCallback;
-    };
-
-    typedef CSinglyLinkedList<TComContainer> TCallbackList;
-    TCallbackList m_lstComCallbacks;
-
-    CSyncObject m_oSync;
-
-    static TCallbackDescriptor m_nCallbackDescCount;
-};
-
-#endif // _MODBUSHANDLER_H_
diff --git a/src/modules/modbus/modbuslayer.cpp b/src/modules/modbus/modbuslayer.cpp
deleted file mode 100644
index c31e6e1..0000000
--- a/src/modules/modbus/modbuslayer.cpp
+++ /dev/null
@@ -1,707 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Patrick Smejkal, Alois Zoitl, Martin Melik-Merkumians - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "modbuslayer.h"

-#include "commfb.h"

-#include "modbusclientconnection.h"

-

-using namespace forte::com_infra;

-

-CModbusComLayer::CModbusComLayer(CComLayer* pa_poUpperLayer, CBaseCommFB* pa_poComFB) :

-    CComLayer(pa_poUpperLayer, pa_poComFB), m_pModbusConnection(0), m_unBufFillSize(0){

-  m_eConnectionState = e_Disconnected;

-}

-

-CModbusComLayer::~CModbusComLayer(){

-}

-

-EComResponse CModbusComLayer::sendData(void *pa_pvData, unsigned int pa_unSize){

-  EComResponse eRetVal = e_ProcessDataOk;

-

-  if(m_eConnectionState == e_Connected){

-    switch (m_poFb->getComServiceType()){

-      case e_Server:

-        // todo

-        break;

-      case e_Client: {

-        TForteUInt16 *convertedData = new TForteUInt16[pa_unSize * 4];

-        unsigned int sendLength = convertDataInput(pa_pvData, pa_unSize, convertedData);

-        if(sendLength > 0){

-          m_pModbusConnection->writeData(convertedData, sendLength);

-        }

-        delete[] convertedData;

-        break;

-      }

-      case e_Publisher:

-        // todo

-        break;

-      case e_Subscriber:

-        //do nothing as subscribers do not send data

-        break;

-    }

-  }

-  return eRetVal;

-}

-

-unsigned int CModbusComLayer::convertDataInput(void *pa_poInData, unsigned int pa_nDataSize, TForteUInt16 *pa_poConvertedData){

-  unsigned int outLength = 0;

-

-  CIEC_ANY *apoSDs = static_cast<CIEC_ANY*>(pa_poInData);

-  unsigned int nrSDs = pa_nDataSize;

-

-  for(unsigned int i = 0; i < nrSDs; i++){

-    CIEC_ANY *anyVal = &apoSDs[i];

-    switch (apoSDs[i].getDataTypeID()){

-      case CIEC_ANY::e_BOOL: // 8bit data types

-      {

-        TForteUInt16 out = (bool) *(CIEC_BOOL*) anyVal;

-        *(TForteUInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteUInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_SINT: {

-        TForteInt16 out = (TForteInt8) *(CIEC_SINT*) anyVal;

-        *(TForteInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_USINT: {

-        TForteUInt16 out = (TForteUInt8) *(CIEC_USINT*) anyVal;

-        *(TForteUInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteUInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_BYTE: {

-        TForteUInt16 out = (TForteByte) *(CIEC_BYTE*) anyVal;

-        *(TForteUInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteUInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_INT: // 16bit data types

-      {

-        TForteInt16 out = (TForteInt16) *(CIEC_INT*) anyVal;

-        *(TForteInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_UINT: {

-        TForteUInt16 out = (TForteUInt16) *(CIEC_UINT*) anyVal;

-        *(TForteUInt16*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteUInt16) / 2;

-        break;

-      }

-      case CIEC_ANY::e_WORD: {

-        TForteWord out = (TForteWord) *(CIEC_WORD*) anyVal;

-        *(TForteWord*) (&pa_poConvertedData[outLength]) = out;

-        outLength += sizeof(TForteWord) / 2;

-        break;

-      }

-      case CIEC_ANY::e_DINT: // 32bit data types

-      {

-        TForteInt32 out = (TForteInt32) *static_cast<CIEC_DINT*>(anyVal);

-        *(TForteInt32*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteInt32>((TForteByte*) &out, sizeof(TForteInt32));

-        outLength += sizeof(TForteInt32) / 2;

-        break;

-      }

-      case CIEC_ANY::e_UDINT: {

-        TForteUInt32 out = (TForteUInt32) *(CIEC_UDINT*) anyVal;

-        *(TForteUInt32*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteUInt32>((TForteByte*) &out, sizeof(TForteUInt32));

-        outLength += sizeof(TForteUInt32) / 2;

-        break;

-      }

-      case CIEC_ANY::e_DWORD: {

-        TForteDWord out = (TForteDWord) *(CIEC_DWORD*) anyVal;

-        *(TForteDWord*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteDWord>((TForteByte*) &out, sizeof(TForteDWord));

-        outLength += sizeof(TForteDWord) / 2;

-        break;

-      }

-      case CIEC_ANY::e_REAL: {

-        TForteFloat out = (TForteFloat) *(CIEC_REAL*) anyVal;

-        *(TForteFloat*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteFloat>((TForteByte*) &out, sizeof(TForteFloat));

-        outLength += sizeof(TForteFloat) / 2;

-        break;

-      }

-      case CIEC_ANY::e_LINT: // 64bit data types

-      {

-        TForteInt64 out = (TForteInt64) *(CIEC_LINT*) anyVal;

-        *(TForteInt64*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteInt64>((TForteByte*) &out, sizeof(TForteInt64));

-        outLength += sizeof(TForteInt64) / 2;

-        break;

-      }

-      case CIEC_ANY::e_ULINT: {

-        TForteUInt64 out = (TForteUInt64) *(CIEC_ULINT*) anyVal;

-        *(TForteUInt64*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteUInt64>((TForteByte*) &out, sizeof(TForteUInt64));

-        outLength += sizeof(TForteUInt64) / 2;

-        break;

-      }

-      case CIEC_ANY::e_LWORD: {

-        TForteLWord out = (TForteLWord) *(CIEC_LWORD*) anyVal;

-        *(TForteLWord*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteLWord>((TForteByte*) &out, sizeof(TForteLWord));

-        outLength += sizeof(TForteLWord) / 2;

-        break;

-      }

-      case CIEC_ANY::e_LREAL: {

-        TForteDFloat out = (TForteDFloat) *(CIEC_LREAL*) anyVal;

-        *(TForteDFloat*) (&pa_poConvertedData[outLength]) = convertFBOutput<TForteDFloat>((TForteByte*) &out, sizeof(TForteDFloat));

-        outLength += sizeof(TForteDFloat) / 2;

-        break;

-      }

-      default:

-        break;

-    }

-  }

-  return outLength;

-}

-

-EComResponse CModbusComLayer::processInterrupt(){

-  if(e_ProcessDataOk == m_eInterruptResp){

-    switch (m_eConnectionState){

-      case e_Connected: {

-        CIEC_ANY *apoRDs = m_poFb->getRDs();

-        unsigned int nrRDs = m_poFb->getNumRD();

-

-        unsigned int dataIndex = 0;

-

-        for(unsigned int i = 0; i < nrRDs; i++){

-          switch (apoRDs[i].getDataTypeID()){

-            case CIEC_ANY::e_BOOL:

-              apoRDs[i].setValue(CIEC_BOOL(convertFBOutput<bool>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(bool);

-              break;

-            case CIEC_ANY::e_SINT:

-              apoRDs[i].setValue(CIEC_SINT(convertFBOutput<TForteInt8>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteInt8);

-              break;

-            case CIEC_ANY::e_INT:

-              apoRDs[i].setValue(CIEC_INT(convertFBOutput<TForteInt16>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteInt16);

-              break;

-            case CIEC_ANY::e_DINT:

-              apoRDs[i].setValue(CIEC_DINT(convertFBOutput<TForteInt32>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteInt32);

-              break;

-            case CIEC_ANY::e_LINT:

-              apoRDs[i].setValue(CIEC_LINT(convertFBOutput<TForteInt64>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteInt64);

-              break;

-            case CIEC_ANY::e_USINT:

-              apoRDs[i].setValue(CIEC_USINT(convertFBOutput<TForteUInt8>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteUInt8);

-              break;

-            case CIEC_ANY::e_UINT:

-              apoRDs[i].setValue(CIEC_UINT(convertFBOutput<TForteUInt16>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteUInt16);

-              break;

-            case CIEC_ANY::e_UDINT:

-              apoRDs[i].setValue(CIEC_UDINT(convertFBOutput<TForteUInt32>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteUInt32);

-              break;

-            case CIEC_ANY::e_ULINT:

-              apoRDs[i].setValue(CIEC_ULINT(convertFBOutput<TForteUInt64>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteUInt64);

-              break;

-            case CIEC_ANY::e_BYTE:

-              apoRDs[i].setValue(CIEC_BYTE(convertFBOutput<TForteByte>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteByte);

-              break;

-            case CIEC_ANY::e_WORD:

-              apoRDs[i].setValue(CIEC_WORD(convertFBOutput<TForteWord>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteWord);

-              break;

-            case CIEC_ANY::e_DWORD:

-              apoRDs[i].setValue(CIEC_DWORD(convertFBOutput<TForteDWord>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteDWord);

-              break;

-            case CIEC_ANY::e_LWORD:

-              apoRDs[i].setValue(CIEC_LWORD(convertFBOutput<TForteLWord>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteLWord);

-              break;

-            case CIEC_ANY::e_REAL:

-              apoRDs[i].setValue(CIEC_REAL(convertFBOutput<TForteFloat>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteFloat);

-              break;

-            case CIEC_ANY::e_LREAL:

-              apoRDs[i].setValue(CIEC_LREAL(convertFBOutput<TForteDFloat>(&m_acRecvBuffer[dataIndex], m_unBufFillSize - dataIndex)));

-              dataIndex += sizeof(TForteDFloat);

-              break;

-            default:

-              // TODO

-              break;

-          }

-        }

-        break;

-      }

-      case e_Disconnected:

-      case e_Listening:

-      case e_ConnectedAndListening:

-      default:

-        break;

-    }

-  }

-  else{

-    if(e_InitTerminated == m_eInterruptResp){

-      // todo: Move server into listening mode again, etc.

-    }

-  }

-  return m_eInterruptResp;

-}

-

-EComResponse CModbusComLayer::recvData(const void *, unsigned int){

-  m_eInterruptResp = e_Nothing;

-

-  switch (m_eConnectionState){

-    case e_Listening:

-

-      //TODO accept incoming connection

-

-      break;

-    case e_Connected: {

-      int nRetVal = 0;

-      switch (m_poFb->getComServiceType()){

-        case e_Server:

-          //TODO

-          break;

-        case e_Client:

-          //TODO check if errors occured during polling in ModbusConnection

-          nRetVal = m_pModbusConnection->readData(&m_acRecvBuffer[0]);

-          break;

-        case e_Publisher:

-          //do nothing as publisher cannot receive data

-          break;

-        case e_Subscriber:

-          //do nothing since Modbus protocol cannot act as subscriber

-          break;

-      }

-      switch (nRetVal){

-        case 0:

-          //TODO

-          break;

-        default:

-          //we successfully received data

-          m_unBufFillSize = nRetVal;

-          m_eInterruptResp = e_ProcessDataOk;

-          break;

-      }

-      m_poFb->interruptCommFB(this);

-    }

-      break;

-    case e_ConnectedAndListening:

-    case e_Disconnected:

-    default:

-      break;

-  }

-  return m_eInterruptResp;

-}

-

-template<typename T>

-T CModbusComLayer::convertFBOutput(TForteByte *pa_acDataArray, unsigned int pa_nDataSize){

-  T retVal;

-  unsigned int currentDataSize = sizeof(T);

-

-  if(currentDataSize <= pa_nDataSize){

-    if(currentDataSize > 2){

-      // A data type with size greater than 16 bits is requested =>

-      // we need to swap order of each 16 bit data package

-

-      unsigned int nrUint16s = currentDataSize / 2;

-      TForteUInt16 *destAr = new TForteUInt16[nrUint16s];

-      TForteUInt16 *sourceAr = (TForteUInt16*) pa_acDataArray;

-

-      for(unsigned int i = 0; i < nrUint16s; i++) {

-        destAr[i] = sourceAr[nrUint16s - 1 - i];

-      }

-

-      retVal = *((T*) destAr);

-

-      delete[] destAr;

-    }

-    else{

-      TForteByte *tempAr = new TForteByte[currentDataSize];

-      for(unsigned int j = 0; j < currentDataSize; j++) {

-        tempAr[j] = pa_acDataArray[j];

-      }

-

-      retVal = *((T*) tempAr);

-      delete[] tempAr;

-    }

-  }

-  else {

-    retVal = 0;

-  }

-

-  return retVal;

-}

-

-EComResponse CModbusComLayer::openConnection(char *pa_acLayerParameter){

-  EComResponse eRetVal = e_InitInvalidId;

-  switch (m_poFb->getComServiceType()){

-    case e_Server:

-      //TODO open server connection

-      m_eConnectionState = e_Listening;

-      break;

-    case e_Client: {

-      STcpParams tcpParams;

-      SRtuParams rtuParams;

-      SCommonParams commonParams;

-      memset(&tcpParams, 0, sizeof(tcpParams));

-      memset(&rtuParams, 0, sizeof(rtuParams));

-      memset(&commonParams, 0, sizeof(commonParams));

-

-      int errCode = processClientParams(pa_acLayerParameter, &tcpParams, &rtuParams, &commonParams);

-      if(errCode != 0){

-        DEVLOG_ERROR("CModbusComLayer:: Invalid input parameters\n");

-      }

-      else{

-        m_pModbusConnection = new CModbusClientConnection(getExtEvHandler<CModbusHandler>());

-        if(strlen(tcpParams.m_acIp) > 0){

-          m_pModbusConnection->setIPAddress(tcpParams.m_acIp);

-          m_pModbusConnection->setPort(tcpParams.m_nPort);

-        }

-        else if(strlen(rtuParams.m_acDevice) > 0){

-          m_pModbusConnection->setDevice(rtuParams.m_acDevice);

-          m_pModbusConnection->setBaud(rtuParams.m_nBaud);

-          m_pModbusConnection->setParity(rtuParams.m_cParity);

-          m_pModbusConnection->setDataBit(rtuParams.m_nDataBit);

-          m_pModbusConnection->setStopBit(rtuParams.m_nStopBit);

-        }

-        m_pModbusConnection->setComCallback(this);

-        m_pModbusConnection->setResponseTimeout(commonParams.m_nResponseTimeout);

-        m_pModbusConnection->setByteTimeout(commonParams.m_nByteTimeout);

-

-        static_cast<CModbusClientConnection*>(m_pModbusConnection)->setSlaveId(commonParams.m_nSlaveId);

-

-        for(unsigned int i = 0; i < commonParams.m_nNrPolls; i++){

-          static_cast<CModbusClientConnection*>(m_pModbusConnection)->addNewPoll(commonParams.m_nPollFrequency, commonParams.m_nFuncCode, commonParams.m_nReadStartAddress[i], commonParams.m_nReadNrAddresses[i]);

-        }

-        for(unsigned int i = 0; i < commonParams.m_nNrSends; i++){

-          static_cast<CModbusClientConnection*>(m_pModbusConnection)->addNewSend(commonParams.m_nSendStartAddress[i], commonParams.m_nSendNrAddresses[i]);

-        }

-

-        if(m_pModbusConnection->connect() < 0){

-          return eRetVal;

-        }

-        m_eConnectionState = e_Connected;

-        eRetVal = e_InitOk;

-      }

-    }

-      break;

-    case e_Publisher:

-      //do nothing as modbus cannot be publisher

-      break;

-    case e_Subscriber:

-      //do nothing as modbus cannot be subscriber

-      break;

-  }

-

-  return eRetVal;

-}

-

-void CModbusComLayer::closeConnection(){

-  //TODO

-  DEVLOG_INFO("CModbusLayer::closeConnection()\n");

-

-  if(m_pModbusConnection != NULL){

-    m_pModbusConnection->disconnect();

-    delete m_pModbusConnection;

-  }

-}

-

-int CModbusComLayer::processClientParams(char* pa_acLayerParams, STcpParams* pa_pTcpParams, SRtuParams* pa_pRtuParams, SCommonParams* pa_pCommonParams){

-  char *params = new char[strlen(pa_acLayerParams) + 1];

-  char *paramsAddress =  params;

-  strcpy(params, pa_acLayerParams);

-  char *chrStorage;

-

-  pa_pTcpParams->m_acIp[0] = '\0';

-  pa_pRtuParams->m_acDevice[0] = '\0';

-

-  chrStorage = strchr(params, ':');

-  if(chrStorage == 0){

-    delete[] paramsAddress;

-    return -1;

-  }

-  *chrStorage = '\0';

-  ++chrStorage;

-

-  if(strcmp(params, "rtu") == 0 || strcmp(params, "RTU") == 0){

-    // get rtu params

-    params = chrStorage;

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      delete[] paramsAddress;

-      return -1;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    strcpy(pa_pRtuParams->m_acDevice, params);

-    pa_pRtuParams->m_nBaud = (int) forte::core::util::strtol(chrStorage, 0, 10);

-

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      delete[] paramsAddress;

-      return -1;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    pa_pRtuParams->m_cParity = chrStorage[0];

-

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      delete[] paramsAddress;

-      return -1;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    pa_pRtuParams->m_nDataBit = (int) forte::core::util::strtol(chrStorage, 0, 10);

-

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      delete[] paramsAddress;

-      return -1;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    pa_pRtuParams->m_nStopBit = (int) forte::core::util::strtol(chrStorage, 0, 10);

-

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      delete[] paramsAddress;

-      return -1;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-  }

-  else{

-    if(strcmp(params, "tcp") == 0 || strcmp(params, "TCP") == 0){

-      params = chrStorage;

-

-      chrStorage = strchr(chrStorage, ':');

-      if(chrStorage == 0){

-        delete[] paramsAddress;

-        return -1;

-      }

-      *chrStorage = '\0';

-      ++chrStorage;

-    }

-    if(isIp(params)){

-      // TCP connection

-      strcpy(pa_pTcpParams->m_acIp, params);

-      pa_pTcpParams->m_nPort = (unsigned int) forte::core::util::strtoul(chrStorage, 0, 10);

-

-      chrStorage = strchr(chrStorage, ':');

-      if(chrStorage == 0){

-        delete[] paramsAddress;

-        return -1;

-      }

-      *chrStorage = '\0';

-      ++chrStorage;

-    }

-    else{

-      delete[] paramsAddress;

-      return -1;

-    }

-  }

-  // Get common parameters

-

-  pa_pCommonParams->m_nPollFrequency = atol(chrStorage);

-

-  chrStorage = strchr(chrStorage, ':');

-  if(chrStorage == 0){

-    delete[] paramsAddress;

-    return -1;

-  }

-  *chrStorage = '\0';

-  ++chrStorage;

-

-  pa_pCommonParams->m_nFuncCode = (unsigned int) forte::core::util::strtoul(chrStorage, 0, 10);

-

-  chrStorage = strchr(chrStorage, ':');

-  if(chrStorage == 0){

-    delete[] paramsAddress;

-    return -1;

-  }

-  *chrStorage = '\0';

-  ++chrStorage;

-

-  // Search for optional parameter slave id

-  char *chrSlave = strchr(chrStorage, ':');

-  if(chrSlave != NULL){

-    chrSlave++;

-    if(strchr(chrSlave, ':') != NULL){

-      pa_pCommonParams->m_nSlaveId = (unsigned int) forte::core::util::strtoul(chrStorage, 0, 10);

-

-      chrStorage = chrSlave;

-    }

-    else{

-      pa_pCommonParams->m_nSlaveId = 0xFF;

-    }

-  }

-  else{

-    delete[] paramsAddress;

-    return -1;

-  }

-

-  char *readAddresses = chrStorage;

-  chrStorage = strchr(chrStorage, ':');

-  if(chrStorage == 0){

-    delete[] paramsAddress;

-    return -1;

-  }

-  *chrStorage = '\0';

-  ++chrStorage;

-

-  // Find read addresses

-  int paramLen = strlen(readAddresses);

-  int nrPolls = 0;

-  int strIndex = -1;

-  while(strIndex < paramLen - 1){

-    strIndex = findNextStartAddress(readAddresses, ++strIndex);

-    if(strIndex < 0){

-      break;

-    }

-    pa_pCommonParams->m_nReadStartAddress[nrPolls] = (unsigned int) forte::core::util::strtoul(const_cast<char*>(&readAddresses[strIndex]), 0, 10);

-    strIndex = findNextStopAddress(readAddresses, strIndex);

-    pa_pCommonParams->m_nReadNrAddresses[nrPolls] = (unsigned int) forte::core::util::strtoul(const_cast<char*>(&readAddresses[strIndex]), 0, 10) - pa_pCommonParams->m_nReadStartAddress[nrPolls] + 1;

-    nrPolls++;

-  }

-  pa_pCommonParams->m_nNrPolls = nrPolls;

-

-  char *writeAddresses = chrStorage;

-  chrStorage = strchr(chrStorage, ':');

-  if(chrStorage != 0){

-    *chrStorage = '\0';

-    ++chrStorage;

-  }

-

-  // Find send addresses

-  paramLen = strlen(writeAddresses);

-  int nrSends = 0;

-  strIndex = -1;

-  while(strIndex < paramLen - 1){

-    strIndex = findNextStartAddress(writeAddresses, ++strIndex);

-    if(strIndex < 0){

-      break;

-    }

-    pa_pCommonParams->m_nSendStartAddress[nrSends] = (unsigned int) forte::core::util::strtoul(const_cast<char*>(&writeAddresses[strIndex]), 0, 10);

-    strIndex = findNextStopAddress(writeAddresses, strIndex);

-    pa_pCommonParams->m_nSendNrAddresses[nrSends] = (unsigned int) forte::core::util::strtoul(const_cast<char*>(&writeAddresses[strIndex]), 0, 10) - pa_pCommonParams->m_nSendStartAddress[nrSends] + 1;

-    nrSends++;

-  }

-  pa_pCommonParams->m_nNrSends = nrSends;

-

-  // Find responseTimeout and byteTimeout

-  do{

-    if(chrStorage == 0){

-      break;

-    }

-    pa_pCommonParams->m_nResponseTimeout = (unsigned int) forte::core::util::strtoul(chrStorage, 0, 10);

-

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      break;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    pa_pCommonParams->m_nByteTimeout = (unsigned int) forte::core::util::strtoul(chrStorage, 0, 10);

-  } while(0);

-

-  if(nrPolls == 0 && nrSends == 0){

-    delete[] paramsAddress;

-    return -1;

-  }

-

-  delete[] paramsAddress;

-  return 0;

-}

-

-int CModbusComLayer::findNextStartAddress(const char* pa_acParam, int pa_nStartIndex){

-  if(pa_nStartIndex == 0){

-    switch (pa_acParam[pa_nStartIndex]){

-      case '0':

-      case '1':

-      case '2':

-      case '3':

-      case '4':

-      case '5':

-      case '6':

-      case '7':

-      case '8':

-      case '9':

-        return pa_nStartIndex;

-    }

-  }

-

-  int strLength = strlen(&pa_acParam[pa_nStartIndex]);

-  const char *pch = strchr(&pa_acParam[pa_nStartIndex], ',');

-

-  if(pch != NULL){

-    if(pch - &pa_acParam[pa_nStartIndex] < strLength - 1) {

-      return pch - &pa_acParam[0] + 1;

-    }

-

-  }

-

-  return -1;

-}

-

-int CModbusComLayer::findNextStopAddress(const char* pa_acParam, int pa_nStartIndex){

-  int strLength = strlen(&pa_acParam[pa_nStartIndex]);

-  const char *pchComma = strchr(&pa_acParam[pa_nStartIndex], ',');

-  const char *pchDot = strchr(&pa_acParam[pa_nStartIndex], '.');

-

-  if(pchComma != NULL && pchDot != NULL) {

-    if(pchDot < pchComma && (pchDot - &pa_acParam[pa_nStartIndex] < strLength - 2)) {

-      return pchDot - &pa_acParam[0] + 2;

-    }

-  } else if(pchDot != NULL) {

-    if(pchDot - &pa_acParam[pa_nStartIndex] < strLength - 2) {

-      return pchDot - &pa_acParam[0] + 2;

-    }

-  }

-

-  return pa_nStartIndex;

-}

-

-bool CModbusComLayer::isIp(const char* pa_acIp){

-  char* str = new char[strlen(pa_acIp) + 1];

-  strcpy(str, pa_acIp);

-  char* pch;

-  int nrPeriods = 0;

-

-  pch = strtok(str, ".");

-  while(pch != NULL){

-    nrPeriods++;

-    if(strlen(pch) > 3){

-      delete[] str;

-      return false;

-    }

-    for(unsigned int i = 0; i < strlen(pch); i++){

-      if(!forte::core::util::isDigit(pch[i])){

-        delete[] str;

-        return false;

-      }

-    }

-

-    pch = strtok(NULL, ".");

-  }

-  if(nrPeriods != 4){

-    delete[] str;

-    return false;

-  }

-

-  delete[] str;

-  return true;

-}

diff --git a/src/modules/modbus/modbuslayer.h b/src/modules/modbus/modbuslayer.h
deleted file mode 100644
index b634545..0000000
--- a/src/modules/modbus/modbuslayer.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2015 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef MODBUSCOMLAYER_H_

-#define MODBUSCOMLAYER_H_

-

-#include <forte_config.h>

-#include "comlayer.h"

-#include <stdint.h>

-

-class CModbusConnection;

-class CIEC_ANY;

-

-namespace forte {

-

-  namespace com_infra {

-

-    class CModbusComLayer : public CComLayer{

-      public:

-        CModbusComLayer(CComLayer* pa_poUpperLayer, CBaseCommFB* pa_poComFB);

-        virtual ~CModbusComLayer();

-

-        EComResponse sendData(void *pa_pvData, unsigned int pa_unSize); // top interface, called from top

-        EComResponse recvData(const void *pa_pvData, unsigned int pa_unSize);

-

-        EComResponse processInterrupt();

-

-      private:

-        struct STcpParams {

-          char m_acIp[15];

-          unsigned int m_nPort;

-        };

-        struct SRtuParams {

-          char m_acDevice[256];

-          int m_nBaud;

-          char m_cParity;

-          int m_nDataBit;

-          int m_nStopBit;

-        };

-        struct SCommonParams {

-          unsigned int m_nNrPolls;

-          unsigned int m_nNrSends;

-          long m_nPollFrequency;

-          unsigned int m_nFuncCode;

-          unsigned int m_nSlaveId;

-          unsigned int m_nReadStartAddress[100];

-          unsigned int m_nReadNrAddresses[100];

-          unsigned int m_nSendStartAddress[100];

-          unsigned int m_nSendNrAddresses[100];

-          unsigned int m_nResponseTimeout;

-          unsigned int m_nByteTimeout;

-        };

-

-        template<typename T>

-        T convertFBOutput(TForteByte *pa_acDataArray, unsigned int pa_nDataSize);

-

-        unsigned int convertDataInput(void *pa_poInData, unsigned int pa_nDataSize, TForteUInt16 *pa_poConvertedData);

-

-        EComResponse openConnection(char *pa_acLayerParameter);

-        void closeConnection();

-

-        //int processClientParams(char* pa_acLayerParams, char* pa_acIp, unsigned int &pa_nPort, long &pa_nPollFrequency, unsigned int &pa_nFuncCode, unsigned int &pa_nSlaveId, unsigned int *pa_nStartAddress, unsigned int *pa_nNrAddresses);

-        int processClientParams(char* pa_acLayerParams, STcpParams* pa_pTcpParams, SRtuParams* pa_pRtuParams, SCommonParams* pa_pCommonParams);

-        int findNextStartAddress(const char* pa_acString, int pa_nStartIndex);

-        int findNextStopAddress(const char* pa_acString, int pa_nStartIndex);

-        bool isIp(const char* pa_acIp);

-

-        EComResponse m_eInterruptResp;

-

-        CModbusConnection *m_pModbusConnection;

-

-        TForteByte m_acRecvBuffer[cg_unIPLayerRecvBufferSize];

-        unsigned int m_unBufFillSize;

-    };

-

-  }

-

-}

-

-#endif /* MODBUSCOMLAYER_H_ */

diff --git a/src/modules/modbus/modbuspoll.cpp b/src/modules/modbus/modbuspoll.cpp
deleted file mode 100644
index d4a4044..0000000
--- a/src/modules/modbus/modbuspoll.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 AIT
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *   Filip Andren - initial API and implementation and/or initial documentation
- *******************************************************************************/
-#include "modbuspoll.h"
-
-#include <devlog.h>
-
-#include <modbus.h>
-
-CModbusPoll::CModbusPoll(TForteUInt32 pa_nPollInterval, unsigned int pa_nFunctionCode, unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses) :
-    CModbusTimedEvent(pa_nPollInterval){
-  setFunctionCode(pa_nFunctionCode);
-  addPollAddresses(pa_nStartAddress, pa_nNrAddresses);
-}
-
-CModbusPoll::~CModbusPoll(){
-  CSinglyLinkedList<SModbusPollData*>::Iterator itEnd = m_lPolls.end();
-  for(CSinglyLinkedList<SModbusPollData*>::Iterator it = m_lPolls.begin(); it != itEnd; ++it){
-    delete *it;
-  }
-  m_lPolls.clearAll();
-}
-
-void CModbusPoll::addPollAddresses(unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses){
-  m_lPolls.pushBack(new SModbusPollData(pa_nStartAddress, pa_nNrAddresses));
-}
-
-int CModbusPoll::executeEvent(modbus_t *pa_pModbusConn, void *pa_pRetVal){
-  restartTimer();
-
-  int nrVals = 0;
-  CSinglyLinkedList<SModbusPollData*>::Iterator itEnd = m_lPolls.end();
-  for(CSinglyLinkedList<SModbusPollData*>::Iterator it = m_lPolls.begin(); it != itEnd; ++it){
-    switch (m_nFunctionCode){
-      case 1:
-        nrVals += modbus_read_bits(pa_pModbusConn, it->m_nStartAddress, it->m_nNrAddresses, &((uint8_t*) pa_pRetVal)[nrVals]);
-        break;
-      case 2:
-        nrVals += modbus_read_input_bits(pa_pModbusConn, it->m_nStartAddress, it->m_nNrAddresses, &((uint8_t*) pa_pRetVal)[nrVals]);
-        break;
-      case 3:
-        nrVals += modbus_read_registers(pa_pModbusConn, it->m_nStartAddress, it->m_nNrAddresses, &((uint16_t*) pa_pRetVal)[nrVals]);
-        break;
-      case 4:
-        nrVals += modbus_read_input_registers(pa_pModbusConn, it->m_nStartAddress, it->m_nNrAddresses, &((uint16_t*) pa_pRetVal)[nrVals]);
-        break;
-      default:
-        //TODO Error
-        break;
-    }
-  }
-  return nrVals;
-}
diff --git a/src/modules/modbus/modbuspoll.h b/src/modules/modbus/modbuspoll.h
deleted file mode 100644
index 7df7831..0000000
--- a/src/modules/modbus/modbuspoll.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 -2014 AIT
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *   Filip Andren - initial API and implementation and/or initial documentation
- *******************************************************************************/
-#ifndef MODBUSPOLL_H_
-#define MODBUSPOLL_H_
-
-#include "modbustimedevent.h"
-#include <fortelist.h>
-
-class CModbusPoll : public CModbusTimedEvent{
-  public:
-    CModbusPoll(TForteUInt32 pa_nPollInterval, unsigned int pa_nFunctionCode, unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses);
-    ~CModbusPoll();
-
-    int executeEvent(modbus_t *pa_pModbusConn, void *pa_pRetVal);
-
-    void setFunctionCode(unsigned int pa_nFunctionCode){
-      m_nFunctionCode = pa_nFunctionCode;
-    }
-    unsigned int getFunctionCode(){
-      return m_nFunctionCode;
-    }
-
-    void addPollAddresses(unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses);
-
-  private:
-
-    struct SModbusPollData{
-        unsigned int m_nStartAddress;
-        unsigned int m_nNrAddresses;
-
-        SModbusPollData(unsigned int pa_nStartAddress, unsigned int pa_nNrAddresses) :
-            m_nStartAddress(pa_nStartAddress), m_nNrAddresses(pa_nNrAddresses){
-        }
-        ;
-    };
-
-    unsigned int m_nFunctionCode;
-
-    CSinglyLinkedList<SModbusPollData*> m_lPolls;
-};
-
-#endif /* MODBUSPOLL_H_ */
diff --git a/src/modules/modbus/modbustimedevent.cpp b/src/modules/modbus/modbustimedevent.cpp
deleted file mode 100644
index 96afdc5..0000000
--- a/src/modules/modbus/modbustimedevent.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "modbustimedevent.h"

-

-CModbusTimedEvent::CModbusTimedEvent(TForteUInt32 pa_nUpdateInterval) 

-  : m_bIsStarted(false){

-  m_nUpdateInterval = pa_nUpdateInterval;

-  m_oUpdateInterval += (m_nUpdateInterval * cg_nForteTicksPerSecond) / 1000;

-

-  if(pa_nUpdateInterval == 0){

-    m_bSingleShotEvent = true;

-

-    activate();

-  }

-  else

-    m_bSingleShotEvent = false;

-}

-

-void CModbusTimedEvent::setUpdateInterval(TForteUInt32 pa_nUpdateInterval){

-  m_nUpdateInterval = pa_nUpdateInterval;

-  SForteTime newTime;

-  newTime += (m_nUpdateInterval * cg_nForteTicksPerSecond) / 1000;

-  m_oUpdateInterval = newTime;

-}

-

-void CModbusTimedEvent::activate(){

-  m_oStartTime = CTimerHandler::sm_poFORTETimer->getForteTime();

-  m_bIsStarted = true;

-}

-

-void CModbusTimedEvent::deactivate(){

-  m_bIsStarted = false;

-}

-

-bool CModbusTimedEvent::readyToExecute() const{

-  SForteTime currentTime = CTimerHandler::sm_poFORTETimer->getForteTime();

-  if (m_oUpdateInterval > currentTime) {

-    return false;

-  }

-  currentTime -= m_oUpdateInterval;

-

-  if(isStarted() && (currentTime > m_oStartTime || currentTime == m_oStartTime)){

-    return true;

-  }

-

-  return false;

-}

-

-void CModbusTimedEvent::restartTimer(){

-

-  activate();

-}

diff --git a/src/modules/modbus/modbustimedevent.h b/src/modules/modbus/modbustimedevent.h
deleted file mode 100644
index fe3bfed..0000000
--- a/src/modules/modbus/modbustimedevent.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _MODBUSTIMEDEVENT_H_

-#define _MODBUSTIMEDEVENT_H_

-

-#include "timerha.h"

-#include <modbus.h>

-

-class CModbusTimedEvent{

-  public:

-    explicit CModbusTimedEvent(TForteUInt32 pa_nUpdateInterval); // UpdateInterval = 0 => single shot event

-    virtual ~CModbusTimedEvent(){

-    }

-

-    void setUpdateInterval(TForteUInt32 pa_nUpdateInterval);

-    TForteUInt32 getUpdateInterval() const{

-      return m_nUpdateInterval;

-    }

-

-    void activate();

-    void deactivate();

-

-    bool isStarted() const {

-      return m_bIsStarted;

-    }

-

-    bool readyToExecute() const;

-

-    // Classes impementing this should call restartTimer in executeEvent

-    virtual int executeEvent(modbus_t* pa_pModbusConn, void* pa_pRetVal) = 0;

-

-  protected:

-    void restartTimer();

-

-  private:

-    SForteTime m_oStartTime;

-    SForteTime m_oUpdateInterval;

-

-    TForteUInt32 m_nUpdateInterval; // Polling interval in milliseconds (0 => single shot event)

-

-    bool m_bSingleShotEvent;

-    bool m_bIsStarted;

-};

-

-#endif // _MODBUSTIMEDEVENT_H_

diff --git a/src/modules/modbus/readme.txt b/src/modules/modbus/readme.txt
deleted file mode 100644
index c633cac..0000000
--- a/src/modules/modbus/readme.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-Installation Instructions

-The Modbus com interface need the libmodbus (http://libmodbus.org/) library to work.

-Follow the steps below to set up your environment before compiling forte

-1. libmodbus files should be placed in the following folder structure:

-  <libmodbushome>/include/modbus: include files

-  <libmodbushome>/lib: libmodbus.lib (windows) or libmodbus.so (posix)

-2. When configuring forte project with CMake choose <libmodbushome> as FORTE_COM_MODBUS_LIB_DIR

-3. forte.exe must be able to find the dynamic libmodbus library after build

-  - copy libmodbus.dll/so to folder with forte.exe or

-  - add libmodbus.dll/so to library include path

-

-Parameter Documentation

-Modbus Client (TCP)

-At the moment the Modbus client can only be used for reading values from a Modbus server.

-modbus[(protocol:)ip:port:pollFreqency:functionCode:(slaveId):readAddresses:sendAddresses(:responseTimeout:byteTimeout)]

-  - protocol: tcp (tcp is default)

-  - ip: 127.0.0.1 etc

-  - port: default is 502

-  - pollFrequency: polling frequency in milliseconds

-  - functionCode: 1 - Read Coils

-          2 - Read Discrete Inputs

-          3 - Read Holding Registers

-          4 - Read Input Register

-  - slaveId (optional): the slave id used by the modbus server (0xFF is standard)

-  - readAddresses: addresses can be specified between 0-65535

-           more than one address (max 100) can be specified using

-            + comma for separate addresses 0,2,65500

-            + dots for interval 5..10

-            + combination 0,5..10,2,65500

-  - sendAddresses: addresses can be specified between 0-65535

-           if data is only read sendAddresses should be left empty

-           more than one address (max 100) can be specified using

-            + comma for separate addresses 0,2,65500

-            + dots for interval 5..10

-            + combination 0,5..10,2,65500

-  - responseTimeout (optional): timeout in milliseconds to wait for a response (500ms is default)

-  - byteTimeout (optional): timeout in milliseconds between two consecutive bytes (500ms is default)

-

-example: modbus[127.0.0.1:502:1000:3:1:0..3:]

diff --git a/src/modules/opc/CMakeLists.txt b/src/modules/opc/CMakeLists.txt
deleted file mode 100644
index a9df038..0000000
--- a/src/modules/opc/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-#*******************************************************************************

-# Copyright (c) 2012, 2015 AIT, ACIN, fortiss GmbH

-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# SPDX-License-Identifier: EPL-2.0

-# 
-# Contributors:
-#    Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

-# *******************************************************************************/

-#############################################################################

-# OPC Com Layer

-#############################################################################

-

-forte_add_network_layer(OPC OFF "opc" COpcComLayer opccomlayer "Enable OPC communication")

-SET(FORTE_COM_OPC_LIB_ROOT "" CACHE PATH "Path to OPC library root directory")

-SET(FORTE_COM_OPC_BOOST_ROOT "" CACHE PATH "Path to Boost library root directory")

-

-if(FORTE_COM_OPC)  

-  forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})

-  

-  forte_add_handler(COpcEventHandler opceventhandler)

-  

-  if("${FORTE_ARCHITECTURE}" STREQUAL "Win32")

-    forte_add_sourcefile_hcpp( opcconnection opcconnectionhandler opceventhandler 

-                   opcconnectionimpl opcprocessvar Cmd_AddConnection 

-                   Cmd_AddOPCProcessVar Cmd_SetProcessVarValue )

-  

-    forte_add_include_directories( ${FORTE_COM_OPC_BOOST_ROOT} )

-    

-    forte_add_include_directories( ${FORTE_COM_OPC_LIB_ROOT}/include )

-    forte_add_link_directories( ${FORTE_COM_OPC_LIB_ROOT}/lib )

-    forte_add_link_library( OPCClientToolKit.lib )

-  else()

-    # Generate error since OPC only works with Windows

-    MESSAGE(SEND_ERROR "Win32 has to be slected for FORTE_ARCHITECTURE for the OPC Com Layer")

-  endif()  

-endif(FORTE_COM_OPC)

diff --git a/src/modules/opc/Cmd_AddConnection.cpp b/src/modules/opc/Cmd_AddConnection.cpp
deleted file mode 100644
index 65d0953..0000000
--- a/src/modules/opc/Cmd_AddConnection.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "Cmd_AddConnection.h"

-#include "opcconnectionimpl.h"

-

-CCmd_AddConnection::CCmd_AddConnection(COpcConnectionImpl *pa_pConnection) :

-    m_pConnection(pa_pConnection){

-}

-

-CCmd_AddConnection::~CCmd_AddConnection(void){

-}

-

-void CCmd_AddConnection::runCommand(){

-  m_pConnection->connect();

-}

-const char* CCmd_AddConnection::getCommandName() const{

-  return "Cmd_AddConnection";

-}

diff --git a/src/modules/opc/Cmd_AddConnection.h b/src/modules/opc/Cmd_AddConnection.h
deleted file mode 100644
index 028ea75..0000000
--- a/src/modules/opc/Cmd_AddConnection.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef CMDADDCONNECTION_H_

-#define CMDADDCONNECTION_H_

-#include "ICmd.h"

-

-class COpcConnectionImpl;

-

-class CCmd_AddConnection : public ICmd{

-  public:

-    explicit CCmd_AddConnection(COpcConnectionImpl *pa_pConnection);

-    virtual ~CCmd_AddConnection();

-

-    virtual void runCommand();

-    virtual const char* getCommandName() const;

-  private:

-    COpcConnectionImpl* m_pConnection;

-};

-

-#endif // CMDADDCONNECTION_H_

diff --git a/src/modules/opc/Cmd_AddOPCProcessVar.cpp b/src/modules/opc/Cmd_AddOPCProcessVar.cpp
deleted file mode 100644
index 9951f8f..0000000
--- a/src/modules/opc/Cmd_AddOPCProcessVar.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "Cmd_AddOPCProcessVar.h"

-#include "opcconnectionimpl.h"

-

-CCmd_AddOPCProcessVar::CCmd_AddOPCProcessVar(COpcConnectionImpl *pa_pConnection, COpcProcessVar* pa_pNewItem) :

-    m_pOpcConn(pa_pConnection), m_pNewProcessVar(pa_pNewItem){

-}

-

-CCmd_AddOPCProcessVar::~CCmd_AddOPCProcessVar(void){

-}

-

-void CCmd_AddOPCProcessVar::runCommand(){

-  m_pOpcConn->addItem(m_pNewProcessVar);

-}

-

-const char* CCmd_AddOPCProcessVar::getCommandName() const{

-  return "Cmd_AddOPCProcessVar";

-}

diff --git a/src/modules/opc/Cmd_AddOPCProcessVar.h b/src/modules/opc/Cmd_AddOPCProcessVar.h
deleted file mode 100644
index fda6e4b..0000000
--- a/src/modules/opc/Cmd_AddOPCProcessVar.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef CMDADDPROCESSVAR_H_

-#define CMDADDPROCESSVAR_H_

-#include "ICmd.h"

-

-class COpcConnectionImpl;

-class COpcProcessVar;

-

-class CCmd_AddOPCProcessVar : public ICmd{

-  public:

-    CCmd_AddOPCProcessVar(COpcConnectionImpl *pa_pConnection, COpcProcessVar* pa_pNewItem);

-    virtual ~CCmd_AddOPCProcessVar(void);

-

-    virtual void runCommand();

-    virtual const char* getCommandName() const;

-

-  private:

-    COpcConnectionImpl *m_pOpcConn;

-    COpcProcessVar* m_pNewProcessVar;

-};

-

-#endif //CMDADDPROCESSVAR_H_

diff --git a/src/modules/opc/Cmd_SetProcessVarValue.cpp b/src/modules/opc/Cmd_SetProcessVarValue.cpp
deleted file mode 100644
index 84111f6..0000000
--- a/src/modules/opc/Cmd_SetProcessVarValue.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "Cmd_SetProcessVarValue.h"

-

-#include "opcprocessvar.h"

-#include "opcconnectionimpl.h"

-

-CCmd_SetProcessVarValue::CCmd_SetProcessVarValue(COpcProcessVar * pa_pOpcVar) :

-    m_pOpcVar(pa_pOpcVar){

-}

-

-CCmd_SetProcessVarValue::~CCmd_SetProcessVarValue(void){

-}

-

-void CCmd_SetProcessVarValue::runCommand(){

-  m_pOpcVar->sendItemData();

-}

-const char* CCmd_SetProcessVarValue::getCommandName() const{

-  return "Cmd_SetProcessVarValue";

-}

diff --git a/src/modules/opc/Cmd_SetProcessVarValue.h b/src/modules/opc/Cmd_SetProcessVarValue.h
deleted file mode 100644
index 3d89e2c..0000000
--- a/src/modules/opc/Cmd_SetProcessVarValue.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef CMDSETPROCESSVARVALUE_H_

-#define CMDSETPROCESSVARVALUE_H_

-

-#include "ICmd.h"

-

-#include <Windows.h>

-#include "Variant.h"

-

-class COpcProcessVar;

-class COpcConnectionImpl;

-

-class CCmd_SetProcessVarValue : public ICmd{

-  public:

-    explicit CCmd_SetProcessVarValue(COpcProcessVar * pa_pOpcVar);

-    virtual ~CCmd_SetProcessVarValue(void);

-

-    virtual void runCommand();

-    virtual const char* getCommandName() const;

-

-  private:

-    COpcProcessVar* m_pOpcVar;

-};

-

-#endif //CMDSETPROCESSVARVALUE_H_

diff --git a/src/modules/opc/ICmd.h b/src/modules/opc/ICmd.h
deleted file mode 100644
index 33881a4..0000000
--- a/src/modules/opc/ICmd.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef ICMD_H_

-#define ICMD_H_

-

-class ICmd{

-  public:

-    ICmd(){

-    }

-    ;

-    virtual ~ICmd(){

-    }

-    ;

-

-    virtual void runCommand() = 0;

-    virtual const char* getCommandName() const = 0;

-};

-

-#endif //ICMD_H_

diff --git a/src/modules/opc/Variant.h b/src/modules/opc/Variant.h
deleted file mode 100644
index 382df9c..0000000
--- a/src/modules/opc/Variant.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Werner Tremmel - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef VARIANTNEW_H_

-#define VARIANTNEW_H_

-

-#include <boost/lexical_cast.hpp>

-

-/*! \brief structure for simplified handling of the VARIANT

- *

- *  The structure simplifies the handling of the VARIANT with numeric types.

- */

-

-#include <OleAuto.h>

-#include <comutil.h>

-

-struct Variant : public VARIANT{

-  public:

-    class VariantException : public std::exception{

-      public:

-        VariantException(){

-        }

-        virtual const char* what() throw (){

-          return "VariantException: unknown variant type";

-        }

-    };

-

-    ~Variant(){

-    }

-    Variant(){

-    }

-

-    explicit Variant(const _variant_t &value) :

-        VARIANT(value){

-    }

-    explicit Variant(const VARIANT &value) :

-        VARIANT(value){

-    }

-    explicit Variant(bool value){

-      setbool(value);

-    }

-    explicit Variant(BOOL value){

-      setbool(value != 0);

-    }

-    explicit Variant(VARIANT_BOOL value){

-      setbool(value != 0);

-    }

-

-    template<typename T> explicit Variant(T value){

-      set<T>(value);

-    }

-

-    template<typename T> T get() const{

-      switch (vt){

-        case VT_I8:

-          return static_cast < T > (llVal);

-        case VT_I4:

-          return static_cast < T > (lVal);

-        case VT_I2:

-          return static_cast < T > (iVal);

-        case VT_I1:

-          return static_cast < T > (cVal);

-        case VT_UI8:

-          return static_cast < T > (ullVal);

-        case VT_UI4:

-          return static_cast < T > (ulVal);

-        case VT_UI2:

-          return static_cast < T > (uiVal);

-        case VT_UI1:

-          return static_cast < T > (bVal);

-        case VT_R8:

-          return static_cast < T > (dblVal);

-        case VT_R4:

-          return static_cast < T > (fltVal);

-        case VT_INT:

-          return static_cast < T > (intVal);

-        case VT_UINT:

-          return static_cast < T > (uintVal);

-        case VT_BOOL:

-          return boolVal != 0 ? static_cast < T > (1) : static_cast < T > (0);

-

-        default:

-          throw VariantException();

-      }

-    }

-    template<> std::string get<std::string>() const{

-      switch (vt){

-        case VT_I8:

-          return boost::lexical_cast < std::string > (llVal);

-        case VT_I4:

-          return boost::lexical_cast < std::string > (lVal);

-        case VT_I2:

-          return boost::lexical_cast < std::string > (iVal);

-        case VT_I1:

-          return boost::lexical_cast < std::string > (cVal);

-        case VT_UI8:

-          return boost::lexical_cast < std::string > (ullVal);

-        case VT_UI4:

-          return boost::lexical_cast < std::string > (ulVal);

-        case VT_UI2:

-          return boost::lexical_cast < std::string > (uiVal);

-        case VT_UI1:

-          return boost::lexical_cast < std::string > (bVal);

-        case VT_R8:

-          return boost::lexical_cast < std::string > (dblVal);

-        case VT_R4:

-          return boost::lexical_cast < std::string > (fltVal);

-        case VT_INT:

-          return boost::lexical_cast < std::string > (intVal);

-        case VT_UINT:

-          return boost::lexical_cast < std::string > (uintVal);

-        case VT_BOOL:

-          return boolVal != 0 ? boost::lexical_cast < std::string > (true) : boost::lexical_cast < std::string > (false);

-

-        default:

-          throw VariantException();

-      }

-    }

-    template<> bool get<bool>() const{

-      switch (vt){

-        case VT_I8:

-          return llVal != 0 ? true : false;

-        case VT_I4:

-          return lVal != 0 ? true : false;

-        case VT_I2:

-          return iVal != 0 ? true : false;

-        case VT_I1:

-          return cVal != 0 ? true : false;

-        case VT_UI8:

-          return ullVal != 0 ? true : false;

-        case VT_UI4:

-         return ulVal != 0 ? true : false;

-        case VT_UI2:

-         return uiVal != 0 ? true : false;

-        case VT_UI1:

-        return bVal != 0 ? true : false;

-        case VT_R8:

-        return dblVal != 0 ? true : false;

-        case VT_R4:

-         return fltVal != 0 ? true : false;

-        case VT_INT:

-         return intVal != 0 ? true : false;

-        case VT_UINT:

-          return uintVal != 0 ? true : false;

-        case VT_BOOL:

-          return boolVal != 0 ? true : false;

-

-        default:

-          throw VariantException();

-      }

-    }

-    void setbool(bool value){

-      boolVal = value ? 0xffff : 0;

-      vt = VT_BOOL;

-    }

-    template<typename T> void set(T value){

-      getField<T>() = value;

-      vt = getType<T>();

-    }

-    template<> void set<bool>(bool value){

-      setbool(value);

-    }

-    void setBOOL(BOOL value){

-      setbool(value != 0);

-    }

-    void setVARIANT_BOOL(VARIANT_BOOL value){

-      setbool(value != 0);

-    }

-

-    template<typename T> bool isType() const{

-      return vt == getType<T>();

-    }

-

-    bool isInteger() const{

-      switch (vt){

-        case VT_I8:

-        case VT_I4:

-        case VT_I2:

-        case VT_I1:

-        case VT_INT:

-          return true;

-        default:

-          return false;

-      }

-    }

-    bool isUnsignedInteger() const{

-      switch (vt){

-        case VT_UI8:

-        case VT_UI4:

-        case VT_UI2:

-        case VT_UI1:

-        case VT_UINT:

-          return true;

-        default:

-          return false;

-      }

-    }

-    bool isFloatingPoint() const{

-      switch (vt){

-        case VT_R8:

-        case VT_R4:

-          return true;

-        default:

-          return false;

-      }

-    }

-

-    template<typename T> VARTYPE getType() const{

-      constraint<T>();

-    }

-    template<> VARTYPE getType<LONGLONG>() const{

-      return VT_I8;

-    }

-    template<> VARTYPE getType<LONG>() const{

-      return VT_I4;

-    }

-    template<> VARTYPE getType<SHORT>() const{

-      return VT_I2;

-    }

-    template<> VARTYPE getType<CHAR>() const{

-      return VT_I1;

-    }

-    template<> VARTYPE getType<signed char>() const{

-      return VT_I1;

-    }

-    template<> VARTYPE getType<ULONGLONG>() const{

-      return VT_UI8;

-    }

-    template<> VARTYPE getType<ULONG>() const{

-      return VT_UI4;

-    }

-    template<> VARTYPE getType<USHORT>() const{

-      return VT_UI2;

-    }

-    template<> VARTYPE getType<BYTE>() const{

-      return VT_UI1;

-    }

-    template<> VARTYPE getType<float>() const{

-      return VT_R4;

-    }

-    template<> VARTYPE getType<double>() const{

-      return VT_R8;

-    }

-    //template<> VARTYPE getType<BOOL>() const{

-    //  return VT_BOOL;

-    //}

-    template<> VARTYPE getType<INT>() const{

-      return VT_INT;

-    }

-    template<> VARTYPE getType<UINT>() const{

-      return VT_UINT;

-    }

-

-    template<typename T> T &getField(){

-      constraint<T>();

-    }

-    template<> LONGLONG &getField<LONGLONG>(){

-      return llVal;

-    }

-    template<> LONG &getField<LONG>(){

-      return lVal;

-    }

-    template<> SHORT &getField<SHORT>(){

-      return iVal;

-    }

-    template<> CHAR &getField<CHAR>(){

-      return cVal;

-    }

-    template<> signed char &getField<signed char>(){

-      return (signed char&)cVal;

-    }

-    template<> ULONGLONG &getField<ULONGLONG>(){

-      return ullVal;

-    }

-    template<> ULONG &getField<ULONG>(){

-      return ulVal;

-    }

-    template<> USHORT &getField<USHORT>(){

-      return uiVal;

-    }

-    template<> BYTE &getField<BYTE>(){

-      return bVal;

-    }

-    template<> float &getField<float>(){

-      return fltVal;

-    }

-    template<> double &getField<double>(){

-      return dblVal;

-    }

-    template<> INT &getField<INT>(){

-      return intVal;

-    }

-    template<> UINT &getField<UINT>(){

-      return uintVal;

-    }

-

-    bool operator==(const Variant &other) const{

-      if(vt != other.vt) {

-        return false;

-      }

-      ULONGLONG mask = ~0ul;

-      switch (vt){

-        case VT_I4:

-        case VT_UI4:

-        case VT_INT:

-        case VT_UINT:

-        case VT_R4:

-          mask = 0xffffffffull;

-          break;

-        case VT_I2:

-        case VT_UI2:

-        case VT_BOOL:

-          mask = 0xffffull;

-          break;

-        case VT_I1:

-        case VT_UI1:

-          mask = 0xffull;

-          break;

-      }

-      return ((ullVal ^ other.ullVal) & mask) == 0;

-    }

-

-    /*!  \brief Compiler error, when used

-     *

-     *  This is only here to throw a compiler error when used. So the unsupported types are caught by the compiler

-     *  and not by the runtime system

-     */

-    template<typename T> static void constraint(){

-      char a[2];

-      a[1.2] = 0;

-    }

-};

-

-#endif //VARIANTNEW_H_

diff --git a/src/modules/opc/opccomlayer.cpp b/src/modules/opc/opccomlayer.cpp
deleted file mode 100644
index 4bf43d9..0000000
--- a/src/modules/opc/opccomlayer.cpp
+++ /dev/null
@@ -1,505 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Patrick Smejkal, Alois Zoitl, Martin Melik-Merkumians - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opccomlayer.h"

-#include "../../arch/devlog.h"

-#include "commfb.h"

-

-#include "opcconnection.h"

-#include "opcconnectionhandler.h"

-#include "Variant.h"

-#include <criticalregion.h>

-

-using namespace forte::com_infra;

-

-COpcComLayer::COpcComLayer(CComLayer* pa_poUpperLayer, CBaseCommFB* pa_poComFB) :

-CComLayer(pa_poUpperLayer, pa_poComFB), m_acHost(0), m_acServerName(0), m_nUpdateRate(0), m_nDeadBand(0), m_bLayerParamsOK(false), m_pOpcConnection(0), m_eInterruptResp(e_Nothing){

-  m_acOpcGroupName = m_poFb->getInstanceName();

-}

-

-COpcComLayer::~COpcComLayer(){

-}

-

-EComResponse COpcComLayer::sendData(void *pa_pvData, unsigned int pa_unSize){

-  EComResponse eRetVal = e_ProcessDataOk;

-

-  if((0 != m_poFb)){

-    if(m_pOpcConnection->isConnected()){

-      switch (m_poFb->getComServiceType()){

-      case e_Server:

-        //TODO

-        break;

-      case e_Client: {

-        convertInputData(pa_pvData, pa_unSize);

-

-        TOpcProcessVarList::Iterator itEnd = m_lFBInputVars.end();

-        for(TOpcProcessVarList::Iterator it = m_lFBInputVars.begin(); it != itEnd; ++it){

-            if(it->getIsActive()) {

-              m_pOpcConnection->send_sendItemData((*it));

-            }

-        }

-        break;

-                     }

-      case e_Publisher:

-        //do nothing as OPC cannot be publisher

-        break;

-      case e_Subscriber:

-        //do nothing as subscribers do not send data

-        break;

-      }

-    }

-  }

-  return eRetVal;

-}

-

-EComResponse COpcComLayer::processInterrupt(){

-  EComResponse eRet = e_Nothing;

-  EComResponse currentComResponse;

-

-  {

-    CCriticalRegion criticalRegion(m_oSync);

-    TComResponseList::Iterator comIt(m_lComResponses.begin());

-    currentComResponse = *comIt;

-    m_lComResponses.popFront();

-  }

-

-  switch (currentComResponse){

-    case e_ProcessDataOk:

-      switch (m_eConnectionState){

-      case e_Connected: {

-        CIEC_ANY *apoRDs = m_poFb->getRDs();

-        unsigned int nrRDs = m_poFb->getNumRD();

-

-        TOpcProcessVarList::Iterator itEnd = m_lFBOutputVars.end();

-        TOpcProcessVarList::Iterator it = m_lFBOutputVars.begin();

-        for(unsigned int i = 0; i < nrRDs && it != itEnd; i++, ++it){

-          setOutputValue(&apoRDs[i], &it->updateValue());

-        }

-

-        break;

-                        }

-      case e_Disconnected:

-      case e_Listening:

-      case e_ConnectedAndListening:

-      default:

-        break;

-      }

-      eRet = e_ProcessDataOk;

-      break;

-    case e_InitInvalidId:

-      eRet = e_InitInvalidId;

-      break;

-    case e_InitTerminated:

-      eRet = e_InitTerminated;

-      break;

-  }

-

-  return eRet;

-}

-

-EComResponse COpcComLayer::recvData(const void *, unsigned int){

-  EComResponse eRet = e_Nothing;

-

-  switch (m_poFb->getComServiceType()){

-    case e_Server:

-      //TODO

-      break;

-    case e_Client: {

-      switch (m_pOpcConnection->getConnectionState()){

-        case COpcConnection::e_Connected:

-          // Successfully connected --> adding OPC items

-          if(addOpcItems() < 0){

-            //TODO

-          } else {

-            m_eConnectionState = e_Connected;

-          }

-          break;

-        case COpcConnection::e_ConnectionFailed:

-          {

-            CCriticalRegion criticalRegion(m_oSync);

-            m_lComResponses.pushBack(e_InitTerminated);

-          }

-          m_poFb->interruptCommFB(this);

-          eRet = e_InitTerminated;

-          break;

-        case COpcConnection::e_ItemAddedOk:

-          //do nothing

-          break;

-        case COpcConnection::e_ItemAddedFailed:

-          {

-            CCriticalRegion criticalRegion(m_oSync);

-            m_lComResponses.pushBack(e_InitTerminated);

-          }

-          m_poFb->interruptCommFB(this);

-          eRet = e_InitTerminated;

-          break;

-        case COpcConnection::e_DataReceived: {

-          int nRetVal = m_pOpcConnection->receiveData(m_acOpcGroupName, &m_lFBOutputVars);

-          if (nRetVal > 0) {

-            //we successfully received data

-            CCriticalRegion criticalRegion(m_oSync);

-            m_lComResponses.pushBack(e_ProcessDataOk);

-          }

-          m_poFb->interruptCommFB(this);

-          eRet = e_ProcessDataOk;

-          break;

-        }

-        case COpcConnection::e_Disconnected:

-          //TODO error during connection try

-          break;

-        default:

-          break;

-      }

-      break;

-    }

-    case e_Publisher:

-      //do nothing as publisher cannot receive data

-    case e_Subscriber:

-      //do nothing as OPC cannot be subscribers

-      break;

-  }

-

-  return eRet;

-}

-

-  EComResponse COpcComLayer::openConnection(char *pa_acLayerParameter){

-    EComResponse eRetVal = e_InitInvalidId;

-    m_eConnectionState = e_Disconnected;

-

-    switch (m_poFb->getComServiceType()){

-    case e_Server:

-      //TODO

-      break;

-    case e_Client:

-      processClientParams(pa_acLayerParameter);

-      if(m_bLayerParamsOK){

-        eRetVal = e_InitOk;

-        m_pOpcConnection = COpcConnectionHandler::getInstance().getOpcConnection(m_acHost, m_acServerName, m_acOpcGroupName, m_nUpdateRate, m_nDeadBand, this);

-

-        m_pOpcConnection->send_connect();

-

-        COpcConnection::EOpcConnectionEvents connState = m_pOpcConnection->getConnectionState();

-        if (connState == COpcConnection::e_Connected) {

-          m_eConnectionState = e_Connected;

-          addOpcItems();

-        }

-        else if(connState == COpcConnection::e_ConnectionFailed) {

-          eRetVal = e_InitTerminated;

-        }

-      }

-      break;

-    case e_Publisher:

-      //do nothing, OPC cannot be publisher

-      break;

-    case e_Subscriber:

-      //do nothing, OPC cannot be subscriber

-      break;

-    }

-

-    return eRetVal;

-  }

-

-  void COpcComLayer::closeConnection(){

-    DEVLOG_DEBUG("COpcComLayer::closeConnection() \n");

-    COpcConnectionHandler::getInstance().removeOpcConnection(m_pOpcConnection->getHost(), m_pOpcConnection->getServerName(), m_acOpcGroupName);

-

-    m_eConnectionState = e_Disconnected;

-  }

-

-  int COpcComLayer::addOpcItems(){

-    int result = 0;

-

-    // Add input items

-    TOpcProcessVarList::Iterator itEnd = m_lFBInputVars.end();

-    for(TOpcProcessVarList::Iterator it = m_lFBInputVars.begin(); it != itEnd; ++it){

-      result = m_pOpcConnection->send_addItem(*it);

-    }

-

-    // Add output items

-    itEnd = m_lFBOutputVars.end();

-    for(TOpcProcessVarList::Iterator it = m_lFBOutputVars.begin(); it != itEnd; ++it){

-      result = m_pOpcConnection->send_addItem(*it);

-    }

-

-    return result;

-  }

-

-  void COpcComLayer::setOutputValue(CIEC_ANY *pa_pDataOut, Variant * pa_pValue){

-    switch (pa_pDataOut->getDataTypeID()){

-    case CIEC_ANY::e_BOOL:

-      pa_pDataOut->setValue(CIEC_BOOL(pa_pValue->get<bool>()));

-      break;

-    case CIEC_ANY::e_SINT:

-      pa_pDataOut->setValue(CIEC_SINT(pa_pValue->get<TForteInt8>()));

-      break;

-    case CIEC_ANY::e_INT:

-      pa_pDataOut->setValue(CIEC_INT(pa_pValue->get<TForteInt16>()));

-      break;

-    case CIEC_ANY::e_DINT:

-      pa_pDataOut->setValue(CIEC_DINT(pa_pValue->get<TForteInt32>()));

-      break;

-    case CIEC_ANY::e_LINT:

-      pa_pDataOut->setValue(CIEC_LINT(pa_pValue->get<TForteInt64>()));

-      break;

-    case CIEC_ANY::e_USINT:

-      pa_pDataOut->setValue(CIEC_USINT(pa_pValue->get<TForteUInt8>()));

-      break;

-    case CIEC_ANY::e_UINT:

-      pa_pDataOut->setValue(CIEC_UINT(pa_pValue->get<TForteUInt16>()));

-      break;

-    case CIEC_ANY::e_UDINT:

-      pa_pDataOut->setValue(CIEC_UDINT(pa_pValue->get<TForteUInt32>()));

-      break;

-    case CIEC_ANY::e_ULINT:

-      pa_pDataOut->setValue(CIEC_ULINT(pa_pValue->get<TForteUInt64>()));

-      break;

-    case CIEC_ANY::e_BYTE:

-      pa_pDataOut->setValue(CIEC_BYTE(pa_pValue->get<TForteByte>()));

-      break;

-    case CIEC_ANY::e_WORD:

-      pa_pDataOut->setValue(CIEC_WORD(pa_pValue->get<TForteWord>()));

-      break;

-    case CIEC_ANY::e_DWORD:

-      pa_pDataOut->setValue(CIEC_DWORD(pa_pValue->get<TForteDWord>()));

-      break;

-    case CIEC_ANY::e_LWORD:

-      pa_pDataOut->setValue(CIEC_LWORD(pa_pValue->get<TForteLWord>()));

-      break;

-    case CIEC_ANY::e_REAL:

-      pa_pDataOut->setValue(CIEC_REAL(pa_pValue->get<TForteFloat>()));

-      break;

-    case CIEC_ANY::e_LREAL:

-      pa_pDataOut->setValue(CIEC_LREAL(pa_pValue->get<TForteDFloat>()));

-      break;

-    default:

-      //TODO

-      break;

-    }

-  }

-

-  void COpcComLayer::processClientParams(char* pa_acLayerParams){

-

-    char *chrStorage;

-    char *chrHost;

-    char *chrServer;

-    char *temp;

-

-    // Get Host

-    chrStorage = strchr(pa_acLayerParams, ':');

-  if(chrStorage == 0) {

-      return;

-  }

-    *chrStorage = '\0';

-    ++chrStorage;

-    chrHost = (char*) malloc(strlen(pa_acLayerParams) + 1);

-    strcpy(chrHost, pa_acLayerParams);

-  if(strcmp(chrHost, "127.0.0.1") == 0 || strcmp(chrHost, "localhost") == 0) {

-      m_acHost = "";

-  } else {

-    m_acHost = chrHost;

-  }

-

-    // Get server name

-    temp = chrStorage;

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      if (chrHost){

-        free(chrHost);

-      }

-      return;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-    chrServer = (char*) malloc(strlen(temp) + 1);

-    strcpy(chrServer, temp);

-    m_acServerName = chrServer;

-

-    // Get update rate

-    m_nUpdateRate = atol(chrStorage);

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      if (chrHost){

-        free(chrHost);

-      }

-      return;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    // Get dead band

-    m_nDeadBand = (float) atof(chrStorage);

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      if (chrHost){

-        free(chrHost);

-      }

-      return;

-    }

-

-    *chrStorage = '\0';

-    ++chrStorage;

-

-    // Get FB input items

-    char * inputItems = chrStorage;

-    chrStorage = strchr(chrStorage, ':');

-    if(chrStorage == 0){

-      if (chrHost){

-        free(chrHost);

-      }

-      return;

-    }

-    *chrStorage = '\0';

-    ++chrStorage;

-    int nrItems = 0;

-    char *pch;

-    pch = strtok(inputItems, ",");

-    while(pch != NULL){

-      char *itemName = (char*) malloc(strlen(pch) + 1);

-      strcpy(itemName, pch);

-      m_lFBInputVars.pushBack(new COpcProcessVar(m_acOpcGroupName, itemName, COpcProcessVar::e_FBInput));

-      nrItems++;

-      pch = strtok(NULL, ",");

-    }

-

-    // Get FB output items

-    pch = strtok(chrStorage, ",");

-    while(pch != NULL){

-      char *itemName = (char*) malloc(strlen(pch) + 1);

-      strcpy(itemName, pch);

-      m_lFBOutputVars.pushBack(new COpcProcessVar(m_acOpcGroupName, itemName, COpcProcessVar::e_FBOutput));

-      nrItems++;

-

-      pch = strtok(NULL, ",");

-    }

-

-  if(nrItems > 0) {

-    m_bLayerParamsOK = true;

-  }

-

-  }

-

-  void COpcComLayer::convertInputData(void *pa_pData, unsigned int pa_nSize){

-    //CIEC_ANY *apoSDs =  static_cast<CIEC_ANY*>(pa_pData);

-    unsigned int nrSDs = pa_nSize;

-    unsigned int sdIndex = 0;

-

-    TOpcProcessVarList::Iterator it_var = m_lFBInputVars.begin();

-    TOpcProcessVarList::Iterator itEnd = m_lFBInputVars.end();

-

-    while(sdIndex < nrSDs && it_var != itEnd){

- //     CIEC_ANY *dataIn = &apoSDs[sdIndex];

-      Variant newVariant;

-      //unsigned int valueSize = 0;

-

-    //valueSize = getInputValueSize(dataIn, &newVariant);;

-

-      it_var->setNewValue(newVariant);

-

-      ++it_var;

-      ++sdIndex;

-    }

-

-  }

-

-  template<typename T>

-  void COpcComLayer::getInputValue(void * pa_pData, Variant * pa_pNewValue){

-    T* vData = (T*) pa_pData;

-    T data = vData[0];

-

-    pa_pNewValue->set<T>(data);

-  }

-

-  unsigned int COpcComLayer::getInputValueSize(CIEC_ANY* pa_pData, Variant * pa_pNewValue){

-    switch (pa_pData->getDataTypeID()){

-    case CIEC_ANY::e_BOOL:

-    {

-      pa_pNewValue->set<bool>((bool) *(dynamic_cast<CIEC_BOOL*>(pa_pData)));

-      return sizeof(bool);

-    }

-    case CIEC_ANY::e_SINT:

-    {

-      pa_pNewValue->set<CHAR>((CHAR) *(dynamic_cast<CIEC_SINT*>(pa_pData)));

-      return sizeof(TForteInt8);

-    }

-    case CIEC_ANY::e_INT:

-    {

-      CIEC_INT* tempInt = dynamic_cast<CIEC_INT*>(pa_pData);

-      TForteInt16 forteInt = (TForteInt16) (*tempInt);

-      pa_pNewValue->set<TForteInt16>(forteInt);

-      return sizeof(TForteInt16);

-    }

-    case CIEC_ANY::e_DINT:

-    {

-      pa_pNewValue->set<TForteInt32>((TForteInt32) *(dynamic_cast<CIEC_DINT*>(pa_pData)));

-      return sizeof(TForteInt32);

-    }

-    case CIEC_ANY::e_LINT:

-    {

-      pa_pNewValue->set<TForteInt64>((TForteInt64) *(dynamic_cast<CIEC_LINT*>(pa_pData)));

-      return sizeof(TForteInt64);

-    }

-    case CIEC_ANY::e_USINT:

-    {

-      pa_pNewValue->set<TForteUInt8>((TForteUInt8) *(dynamic_cast<CIEC_USINT*>(pa_pData)));

-      return sizeof(TForteUInt8);

-    }

-    case CIEC_ANY::e_UINT:

-    {

-      pa_pNewValue->set<TForteUInt16>((TForteUInt16) *(dynamic_cast<CIEC_UINT*>(pa_pData)));

-      return sizeof(TForteUInt16);

-    }

-    case CIEC_ANY::e_UDINT:

-    {

-      pa_pNewValue->set<TForteUInt32>((TForteUInt32) *(dynamic_cast<CIEC_UDINT*>(pa_pData)));

-      return sizeof(TForteUInt32);

-    }

-    case CIEC_ANY::e_ULINT:

-    {

-      pa_pNewValue->set<TForteUInt64>((TForteUInt64) *(dynamic_cast<CIEC_ULINT*>(pa_pData)));

-      return sizeof(TForteUInt64);

-    }

-    case CIEC_ANY::e_BYTE:

-    {

-      pa_pNewValue->set<TForteByte>((TForteByte) *(dynamic_cast<CIEC_BYTE*>(pa_pData)));

-      return sizeof(TForteByte);

-    }

-    case CIEC_ANY::e_WORD:

-    {

-      pa_pNewValue->set<TForteWord>((TForteWord) *(dynamic_cast<CIEC_WORD*>(pa_pData)));

-      return sizeof(TForteWord);

-    }

-    case CIEC_ANY::e_DWORD:

-    {

-      pa_pNewValue->set<TForteDWord>((TForteDWord) *(dynamic_cast<CIEC_DWORD*>(pa_pData)));

-      return sizeof(TForteDWord);

-    }

-    case CIEC_ANY::e_LWORD:

-    {

-      pa_pNewValue->set<TForteLWord>((TForteLWord) *(dynamic_cast<CIEC_LWORD*>(pa_pData)));

-      return sizeof(TForteLWord);

-    }

-    case CIEC_ANY::e_REAL:

-    {

-      pa_pNewValue->set<TForteFloat>((TForteFloat) *(dynamic_cast<CIEC_REAL*>(pa_pData)));

-      return sizeof(TForteFloat);

-    }

-    case CIEC_ANY::e_LREAL:

-    {

-      pa_pNewValue->set<TForteDFloat>((TForteDFloat) *(dynamic_cast<CIEC_LREAL*>(pa_pData)));

-      return sizeof(TForteDFloat);

-    }

-    default:

-      //TODO

-      break;

-    }

-

-    return 0;

-  }

diff --git a/src/modules/opc/opccomlayer.h b/src/modules/opc/opccomlayer.h
deleted file mode 100644
index fe66889..0000000
--- a/src/modules/opc/opccomlayer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2015 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef OPCCOMLAYER_H_

-#define OPCCOMLAYER_H_

-

-#include <forte_config.h>

-#include "comlayer.h"

-#include "opcprocessvar.h"

-

-class CIEC_ANY;

-class COpcConnection;

-struct Variant;

-

-namespace forte {

-

-  namespace com_infra {

-

-    class COpcComLayer : public CComLayer{

-      public:

-        COpcComLayer(CComLayer* pa_poUpperLayer, CBaseCommFB* pa_poComFB);

-        virtual ~COpcComLayer();

-

-        EComResponse sendData(void *pa_pvData, unsigned int pa_unSize); // top interface, called from top

-        EComResponse recvData(const void *pa_pvData, unsigned int pa_unSize);

-        EComResponse processInterrupt();

-

-      private:

-        EComResponse openConnection(char *pa_acLayerParameter);

-        void closeConnection();

-        int addOpcItems();

-        void setOutputValue(CIEC_ANY *pa_pDataOut, Variant * pa_pValue);

-        void processClientParams(char* pa_acLayerParams);

-        void convertInputData(void *pa_pData, unsigned int pa_nSize);

-

-        unsigned int getInputValueSize(CIEC_ANY* pa_pData, Variant * pa_pNewValue);

-

-        template<typename T>

-        void getInputValue(void * pa_pData, Variant * pa_pNewValue);

-

-        const char* m_acHost;

-        const char* m_acServerName;

-        long m_nUpdateRate;

-        float m_nDeadBand;

-        const char* m_acOpcGroupName;

-

-        bool m_bLayerParamsOK;

-

-        COpcConnection *m_pOpcConnection;

-

-        typedef CSinglyLinkedList<COpcProcessVar*> TOpcProcessVarList;

-        TOpcProcessVarList m_lFBOutputVars;

-        TOpcProcessVarList m_lFBInputVars;

-

-        EComResponse m_eInterruptResp;

-        typedef CSinglyLinkedList<EComResponse> TComResponseList;

-        TComResponseList m_lComResponses;

-

-        CSyncObject m_oSync;

-    };

-

-  }

-

-}

-

-#endif /* OPCCOMLAYER_H_ */

diff --git a/src/modules/opc/opcconnection.cpp b/src/modules/opc/opcconnection.cpp
deleted file mode 100644
index 32d636a..0000000
--- a/src/modules/opc/opcconnection.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opcconnection.h"

-#include "opcconnectionimpl.h"

-#include "opceventhandler.h"

-#include "opcprocessvar.h"

-#include "Cmd_AddConnection.h"

-#include "Cmd_AddOPCProcessVar.h"

-#include "Cmd_SetProcessVarValue.h"

-

-using namespace forte::com_infra;

-

-COpcConnection::COpcConnection(const char *pa_acHost, const char *pa_acServerName, COpcEventHandler* pa_eventHandler) :

-    m_nGroupCount(0), m_eConnectionEvent(e_Disconnected), m_acHost(pa_acHost), m_acServerName(pa_acServerName), m_acGroupName(0), m_nReqUpdateRate(0), m_nRealUpdateRate(0), m_nDeadBand(0), m_bIsConnected(false), m_bBlockingConnect(false),

-   m_eventHandler(pa_eventHandler){

-  m_pOpcConnectionImpl = new COpcConnectionImpl(pa_acHost, pa_acServerName, this);

-}

-

-COpcConnection::~COpcConnection(){

-  delete m_pOpcConnectionImpl;

-}

-

-void COpcConnection::addGroup(const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand, CComLayer* pa_pComCallback){

-  m_oSync.lock();

-  m_lOpcGroupMapList.pushBack(new SOpcGroupMap(pa_acGroupName, m_eventHandler->addComCallback(pa_pComCallback)));

-  m_oSync.unlock();

-

-  m_pOpcConnectionImpl->addGroup(pa_acGroupName, pa_nReqUpdateRate, pa_nDeadBand);

-

-  m_nGroupCount++;

-}

-

-void COpcConnection::removeGroup(const char* pa_acGroupName){

-  m_oSync.lock();

-  TOpcGroupMapList::Iterator itDelete = m_lOpcGroupMapList.begin();

-  TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin();

-  TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

-

-  if(it_group != itEnd_group){

-    if(strcmp(it_group->m_acGroupName, pa_acGroupName) == 0){

-      m_lOpcGroupMapList.popFront();

-      m_nGroupCount--;

-      m_oSync.unlock();

-      return;

-    }

-    ++it_group;

-    while(it_group != itEnd_group){

-      if(strcmp(it_group->m_acGroupName, pa_acGroupName) == 0){

-        m_lOpcGroupMapList.eraseAfter(itDelete);

-        m_nGroupCount--;

-        m_oSync.unlock();

-        return;

-      }

-

-      ++itDelete;

-      ++it_group;

-    }

-  }

-

-  m_oSync.unlock();

-}

-

-int COpcConnection::send_connect(){

-  switch (m_eConnectionEvent){

-    case e_Disconnected:

-      m_eConnectionEvent = e_Connecting;

-      m_eventHandler->sendCommand(new CCmd_AddConnection(m_pOpcConnectionImpl));

-      return 0;

-    case e_Connecting:

-      return 0;

-    default: // all other connection states

-      return 1;

-  }

-}

-

-int COpcConnection::send_connect(bool pa_bBlocking){

-  m_bBlockingConnect = pa_bBlocking;

-  if(pa_bBlocking && !m_bIsConnected){

-    m_pOpcConnectionImpl->connect();

-    return 1;

-  }

-

-  return send_connect();

-}

-

-int COpcConnection::send_addItem(COpcProcessVar* pa_pNewItem){

-  m_oSync.lock();

-  TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

-  for(TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin(); it_group != itEnd_group; ++it_group){

-    if(strcmp(it_group->m_acGroupName, pa_pNewItem->getItemGroupName()) == 0){

-      if(pa_pNewItem->getItemFunction() == COpcProcessVar::e_FBOutput){

-

-        //check if item already added

-        TItemDataList::Iterator itEnd_item = (*it_group)->m_lReadItemsList.end();

-        for(TItemDataList::Iterator it_item = (*it_group)->m_lReadItemsList.begin(); it_item != itEnd_item; ++it_item){

-          if(strcmp(it_item->m_acItemName, pa_pNewItem->getItemName()) == 0){

-            m_oSync.unlock();

-            return 1;

-          }

-        }

-

-        it_group->m_lReadItemsList.pushBack(new SOpcItemData(pa_pNewItem->getItemName()));

-        break;

-

-      }

-      else if(pa_pNewItem->getItemFunction() == COpcProcessVar::e_FBInput){

-        //check if item already added

-        TItemDataList::Iterator itEnd_item = (*it_group)->m_lWriteItemsList.end();

-        for(TItemDataList::Iterator it_item = (*it_group)->m_lWriteItemsList.begin(); it_item != itEnd_item; ++it_item){

-          if(strcmp(it_item->m_acItemName, pa_pNewItem->getItemName()) == 0){

-            m_oSync.unlock();

-            return 1;

-          }

-        }

-

-        it_group->m_lWriteItemsList.pushBack(new SOpcItemData(pa_pNewItem->getItemName()));

-        break;

-

-      }

-    }

-  }

-  m_oSync.unlock();

-

-  if(m_eConnectionEvent == e_Connected){

-    m_eventHandler->sendCommand(new CCmd_AddOPCProcessVar(m_pOpcConnectionImpl, pa_pNewItem));

-

-    return 0;

-  }

-

-  return -1;

-}

-

-int COpcConnection::send_sendItemData(COpcProcessVar* pa_pItem){

-  if(pa_pItem->getIsActive()) {

-    m_eventHandler->sendCommand(new CCmd_SetProcessVarValue(pa_pItem));

-  }

-  return 0;

-}

-

-void COpcConnection::response_connect(bool pa_bConnectionState){

-  m_bIsConnected = pa_bConnectionState;

-  if(pa_bConnectionState) {

-    m_eConnectionEvent = e_Connected;

-  } else {

-    m_eConnectionEvent = e_ConnectionFailed;

-  }

-    //m_eConnectionEvent = e_Disconnected;

-

-  if(!m_bBlockingConnect){

-    m_oSync.lock();

-

-    TOpcGroupMapList::Iterator itEnd = m_lOpcGroupMapList.end();

-    for(TOpcGroupMapList::Iterator it = m_lOpcGroupMapList.begin(); it != itEnd; ++it){

-      m_eventHandler->executeComCallback((*it)->m_nCallbackDesc);

-    }

-

-    m_oSync.unlock();

-  }

-}

-

-void COpcConnection::response_dataReceived(const char *pa_acGroupName, TItemDataList & pa_lItemDataList){

-  // Loop through OpcGroups

-  m_oSync.lock();

-  TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

-  for(TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin(); it_group != itEnd_group; ++it_group){

-

-    if(strcmp(it_group->m_acGroupName, pa_acGroupName) == 0){

-

-      // Loop through OpcItems in OpcGroup

-      TItemDataList::Iterator itEnd_item = (*it_group)->m_lReadItemsList.end();

-      for(TItemDataList::Iterator it_item = (*it_group)->m_lReadItemsList.begin(); it_item != itEnd_item; ++it_item){

-

-        // Loop through OpcItems in ItemDataList

-        TItemDataList::Iterator itEnd_newItem = pa_lItemDataList.end();

-        TItemDataList::Iterator itErase = pa_lItemDataList.begin();

-        for(TItemDataList::Iterator it_newItem = pa_lItemDataList.begin(); it_newItem != itEnd_newItem; ++it_newItem){

-

-          if(strcmp(it_newItem->m_acItemName, it_item->m_acItemName) == 0){

-            it_item->m_oItemData = it_newItem->m_oItemData;

-

-            if(it_newItem == pa_lItemDataList.begin()) {

-              pa_lItemDataList.popFront();

-            } else {

-              pa_lItemDataList.eraseAfter(itErase);

-            }

-

-            break;

-          }

-

-          if(it_newItem != pa_lItemDataList.begin()) {

-            ++itErase;

-          }

-        }

-          if(pa_lItemDataList.isEmpty()) {

-            break;

-          }

-      }

-

-      // Change state

-      m_eConnectionEvent = e_DataReceived;

-

-      // Notify Com Layer

-      m_eventHandler->executeComCallback(it_group->m_nCallbackDesc);

-      break;

-    }

-  }

-  m_oSync.unlock();

-}

-

-void COpcConnection::response_itemAdded(COpcProcessVar* pa_pOpcItem){

-  // Loop through OpcGroups

-  m_oSync.lock();

-  TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

-  for(TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin(); it_group != itEnd_group; ++it_group){

-    if(strcmp(it_group->m_acGroupName, pa_pOpcItem->getItemGroupName()) == 0){

-      // Change state

-      if (pa_pOpcItem->getIsActive()) {

-        m_eConnectionEvent = e_ItemAddedOk;

-      } else {

-        m_eConnectionEvent = e_ItemAddedFailed;

-      }

-      // Notify Com Layer

-      m_eventHandler->executeComCallback(it_group->m_nCallbackDesc);

-      break;

-    }

-  }

-  m_oSync.unlock();

-}

-

-int COpcConnection::receiveData(const char* pa_acGroupName, TOpcProcessVarList * pa_lOpcProcessVarList){

-  int nrData = 0;

-  // TODO Case when lists do not match in size

-

-  m_oSync.lock();

-  TOpcGroupMapList::Iterator itEnd_group = m_lOpcGroupMapList.end();

-  for(TOpcGroupMapList::Iterator it_group = m_lOpcGroupMapList.begin(); it_group != itEnd_group; ++it_group){

-

-    if(strcmp(it_group->m_acGroupName, pa_acGroupName) == 0){

-

-      TItemDataList::Iterator itEnd_item = it_group->m_lReadItemsList.end();

-      TItemDataList::Iterator it_item = it_group->m_lReadItemsList.begin();

-

-      TOpcProcessVarList::Iterator itEnd_procVar = pa_lOpcProcessVarList->end();

-      TOpcProcessVarList::Iterator it_procVar = pa_lOpcProcessVarList->begin();

-

-      while(it_procVar != itEnd_procVar && it_item != itEnd_item){

-

-        it_procVar->setNewValue(it_item->m_oItemData);

-

-        nrData++;

-

-        ++it_procVar;

-        ++it_item;

-      }

-

-      break;

-    }

-

-  }

-  m_oSync.unlock();

-  return nrData;

-}

-

diff --git a/src/modules/opc/opcconnection.h b/src/modules/opc/opcconnection.h
deleted file mode 100644
index af810ca..0000000
--- a/src/modules/opc/opcconnection.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef OPCCONNECTION_H_

-#define OPCCONNECTION_H_

-

-#include "comlayer.h"

-#include "fortelist.h"

-#include <forte_sync.h>

-#include "windows.h"

-#include "Variant.h"

-

-class COpcConnectionImpl;

-class COpcProcessVar;

-class COpcEventHandler;

-

-struct SOpcItemData{

-    const char* m_acItemName;

-    Variant m_oItemData;

-

-    explicit SOpcItemData(const char* pa_acItemName) :

-        m_acItemName(pa_acItemName){

-      m_oItemData.set<SHORT>(0);

-    }

-    SOpcItemData(const char* pa_acItemName, Variant pa_oItemData) :

-        m_acItemName(pa_acItemName), m_oItemData(pa_oItemData){

-    }

-};

-typedef CSinglyLinkedList<SOpcItemData*> TItemDataList;

-

-class COpcConnection{

-  public:

-

-    COpcConnection(const char *pa_acHost, const char *pa_acServerName, COpcEventHandler* pa_eventHandler);

-    ~COpcConnection();

-

-    /*** Functions for OpcConnectionHandler ****************************************/

-    void addGroup(const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand, forte::com_infra::CComLayer* pa_pComCallback);

-    void removeGroup(const char* pa_acGroupName);

-    /*** END ***********************************************************************/

-

-    /*** Functions for OpcComLayer *************************************************/

-    int send_connect();

-    int send_connect(bool pa_bBlocking);

-    int send_addItem(COpcProcessVar* pa_pNewItem);

-    int send_sendItemData(COpcProcessVar* pa_pItem);

-

-    typedef CSinglyLinkedList<COpcProcessVar*> TOpcProcessVarList;

-    int receiveData(const char* pa_acGroupName, TOpcProcessVarList * pa_lOpcProcessVarList);

-

-    bool isConnected() const {

-      return m_bIsConnected;

-    }

-    /*** END ***********************************************************************/

-

-    /*** Functions for OpcConnectionImpl *******************************************/

-    void response_connect(bool pa_bConnectionState);

-    void response_dataReceived(const char *pa_acGroupName, TItemDataList & pa_lItemDataList);

-    void response_itemAdded(COpcProcessVar* pa_pOpcItem);

-    /*** END ***********************************************************************/

-

-    /*** Common Functions **********************************************************/

-    enum EOpcConnectionEvents{

-      e_Disconnected, e_Connecting, e_ConnectionFailed, e_Connected, e_ItemAddedOk, e_ItemAddedFailed, e_DataReceived

-    };

-

-    const char* getHost() const {

-      return m_acHost;

-    }

-

-    const char* getServerName() const {

-      return m_acServerName;

-    }

-

-    unsigned int getGroupCount() const {

-      return m_nGroupCount;

-    }

-

-    EOpcConnectionEvents getConnectionState() const {

-      return m_eConnectionEvent;

-    }

-

-    /*** END ***********************************************************************/

-

-  private:

-    struct SOpcGroupMap{

-        const char* m_acGroupName;

-        int m_nCallbackDesc;

-        TItemDataList m_lReadItemsList;

-        TItemDataList m_lWriteItemsList;

-

-        SOpcGroupMap(const char* pa_acGroupName, int pa_nCallbackDesc) :

-            m_acGroupName(pa_acGroupName), m_nCallbackDesc(pa_nCallbackDesc){

-        }

-    };

-

-    typedef CSinglyLinkedList<SOpcGroupMap*> TOpcGroupMapList;

-    TOpcGroupMapList m_lOpcGroupMapList;

-

-    unsigned int m_nGroupCount;

-

-    COpcConnectionImpl *m_pOpcConnectionImpl;

-

-    EOpcConnectionEvents m_eConnectionEvent;

-

-    const char* m_acHost;

-    const char* m_acServerName;

-    const char* m_acGroupName;

-    unsigned long m_nReqUpdateRate;

-    unsigned long m_nRealUpdateRate;

-    float m_nDeadBand;

-

-    bool m_bIsConnected;

-    bool m_bBlockingConnect;

-

-    CSyncObject m_oSync;

-

-    COpcEventHandler* m_eventHandler;

-

-    //we don't want COpcConnection to be copy and assignable

-    COpcConnection(const COpcConnection&);

-    COpcConnection& operator = (const COpcConnection &);

-};

-

-#endif // OPCCONNECTION_H_

diff --git a/src/modules/opc/opcconnectionhandler.cpp b/src/modules/opc/opcconnectionhandler.cpp
deleted file mode 100644
index 910b930..0000000
--- a/src/modules/opc/opcconnectionhandler.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opcconnectionhandler.h"

-#include "opcconnection.h"

-#include <extevhandlerhelper.h>

-

-using namespace forte::com_infra;

-

-DEFINE_SINGLETON(COpcConnectionHandler);

-

-COpcConnectionHandler::COpcConnectionHandler(){

-

-}

-

-COpcConnectionHandler::~COpcConnectionHandler(){

-  TOpcConnectionList::Iterator itEnd = m_lOpcConnectionList.end();

-  for(TOpcConnectionList::Iterator it = m_lOpcConnectionList.begin(); it != itEnd; ++it){

-    delete (*it);

-  }

-}

-

-COpcConnection* COpcConnectionHandler::getOpcConnection(const char *pa_acHost, const char *pa_acServerName, const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand, CComLayer* pa_pComCallback){

-

-  COpcConnection *newConnection = findOpcConnection(pa_acHost, pa_acServerName);

-  if(newConnection == NULL){

-    newConnection = new COpcConnection(pa_acHost, pa_acServerName, getExtEvHandler<COpcEventHandler>(*pa_pComCallback->getCommFB()));

-

-    m_lOpcConnectionList.pushBack(newConnection);

-  }

-

-  newConnection->addGroup(pa_acGroupName, pa_nReqUpdateRate, pa_nDeadBand, pa_pComCallback);

-

-  return newConnection;

-}

-

-void COpcConnectionHandler::removeOpcConnection(const char *pa_acHost, const char *pa_acServerName, const char* pa_acGroupName){

-  COpcConnection *existingCon = findOpcConnection(pa_acHost, pa_acServerName);

-  if(existingCon != NULL){

-    existingCon->removeGroup(pa_acGroupName);

-

-    if(existingCon->getGroupCount() == 0) {

-      deleteOpcConnection(pa_acHost, pa_acServerName);

-    }

-  }

-}

-

-COpcConnection* COpcConnectionHandler::findOpcConnection(const char* pa_acHost, const char* pa_acServerName){

-  TOpcConnectionList::Iterator itEnd = m_lOpcConnectionList.end();

-  for(TOpcConnectionList::Iterator it = m_lOpcConnectionList.begin(); it != itEnd; ++it){

-    if(strcmp(it->getHost(), pa_acHost) == 0 && strcmp(it->getServerName(), pa_acServerName) == 0) {

-      return (*it);

-    }

-  }

-

-  return NULL;

-}

-

-void COpcConnectionHandler::deleteOpcConnection(const char* pa_acHost, const char* pa_acServerName){

-  TOpcConnectionList::Iterator itDelete = m_lOpcConnectionList.begin();

-  TOpcConnectionList::Iterator it = m_lOpcConnectionList.begin();

-  TOpcConnectionList::Iterator itEnd = m_lOpcConnectionList.end();

-

-  if(it != itEnd){

-    if(strcmp(it->getHost(), pa_acHost) == 0 && strcmp(it->getServerName(), pa_acServerName)){

-      m_lOpcConnectionList.popFront();

-      return;

-    }

-    ++it;

-    while(it != itEnd){

-      if(strcmp(it->getHost(), pa_acHost) == 0 && strcmp(it->getServerName(), pa_acServerName)){

-        m_lOpcConnectionList.eraseAfter(itDelete);

-        return;

-      }

-

-      ++itDelete;

-      ++it;

-    }

-  }

-}

diff --git a/src/modules/opc/opcconnectionhandler.h b/src/modules/opc/opcconnectionhandler.h
deleted file mode 100644
index 4f9825f..0000000
--- a/src/modules/opc/opcconnectionhandler.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 -2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef OPCCONNECTIONHANDLER_H_

-#define OPCCONNECTIONHANDLER_H_

-

-#include "singlet.h"

-#include "fortelist.h"

-#include <comlayer.h>

-#include <fortelist.h>

-

-class COpcConnection;

-

-class COpcConnectionHandler{

-  DECLARE_SINGLETON(COpcConnectionHandler)

-    ;

-  public:

-    /*! \brief returns existing or creates new OpcConnection

-     *

-     *  If a connection to the specified server already exist a pointer to this is returned. Otherwise a

-     *  new connection is created. The returned connection includes the group with the specified settings.

-     */

-    COpcConnection* getOpcConnection(const char *pa_acHost, const char *pa_acServerName, const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand, forte::com_infra::CComLayer* pa_pComCallback);

-

-    void removeOpcConnection(const char *pa_acHost, const char *pa_acServerName, const char* pa_acGroupName);

-

-  private:

-    COpcConnection* findOpcConnection(const char* pa_acHost, const char* pa_acServerName);

-    void deleteOpcConnection(const char* pa_acHost, const char* pa_acServerName);

-

-    typedef CSinglyLinkedList<COpcConnection*> TOpcConnectionList;

-    TOpcConnectionList m_lOpcConnectionList;

-

-};

-

-#endif // OPCCONNECTIONHANDLER_H_

diff --git a/src/modules/opc/opcconnectionimpl.cpp b/src/modules/opc/opcconnectionimpl.cpp
deleted file mode 100644
index 2520201..0000000
--- a/src/modules/opc/opcconnectionimpl.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, ACIN

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opcconnectionimpl.h"

-

-#include "opceventhandler.h"

-#include "opcconnection.h"

-#include "opcprocessvar.h"

-

-#include "OPCClient.h"

-#include "OPCHost.h"

-#include "OPCServer.h"

-#include "OPCGroup.h"

-#include "OPCItem.h"

-

-COpcConnectionImpl::COpcConnectionImpl(const char *pa_acHost, const char *pa_acServerName, COpcConnection* pa_pOpcConn) :

-  m_pOpcConn(pa_pOpcConn), m_pOpcHost(0), m_pOpcServer(0), m_acHost(pa_acHost), m_acServerName(pa_acServerName), m_acGroupName(0), m_nReqUpdateRate(0), m_nRealUpdateRate(0), m_nDeadBand(0) {

-}

-

-COpcConnectionImpl::~COpcConnectionImpl(){

-}

-

-void COpcConnectionImpl::connect(){

-  try{

-

-    COPCClient::init();

-

-    m_pOpcHost = COPCClient::makeHost(m_acHost);

-

-    m_pOpcServer = m_pOpcHost->connectDAServer(m_acServerName);

-  } catch (OPCException &e){

-    m_pOpcConn->response_connect(false);

-    return;

-  }

-

-  m_pOpcConn->response_connect(true);

-}

-

-void COpcConnectionImpl::addItem(COpcProcessVar* pa_pNewItem){

-  COPCGroup* itemGroup = getOpcGroup(pa_pNewItem->getItemGroupName(), pa_pNewItem->getItemFunction());

-

-  ATL::CString itemName(pa_pNewItem->getItemName());

-  try{

-    COPCItem* newItem = itemGroup->addItem(itemName, true);

-    pa_pNewItem->setOpcItem(newItem);

-    pa_pNewItem->setIsActive(true);

-  } catch (OPCException &e){

-    pa_pNewItem->setIsActive(false);

-  }

-  m_pOpcConn->response_itemAdded(pa_pNewItem);

-}

-

-void COpcConnectionImpl::addGroup(const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand){

-  m_lOpcGroupSettingsList.pushBack(new SOpcGroupSettings(pa_acGroupName, pa_nReqUpdateRate, pa_nDeadBand));

-}

-

-int COpcConnectionImpl::sendItemData(COpcProcessVar* pa_pNewItem){

-  return 0;

-}

-

-void COpcConnectionImpl::OnDataChange(COPCGroup & group, CAtlMap<COPCItem *, OPCItemData *> & changes){

-

-  TItemDataList itemList;

-  for(POSITION pos = changes.GetStartPosition(); pos != NULL;){

-    OPCItemData *itemData = changes.GetValueAt(pos);

-    COPCItem *item = changes.GetNextKey(pos);

-

-    itemList.pushBack(new SOpcItemData((LPCTSTR) (item->getName()), (Variant) itemData->vDataValue));

-  }

-

-  const char *c_groupName = (const char*) group.getName();

-

-  int position = 0;

-  const char * subStrRead = strstr(c_groupName, "_read");

-  if(subStrRead != NULL) {

-    position = subStrRead - c_groupName;

-  }

-  else{

-    //TODO Should not happen error

-  }

-

-  char * groupName = (char*) malloc(position + 1);

-  strncpy(groupName, c_groupName, position);

-  groupName[position] = '\0';

-

-  m_pOpcConn->response_dataReceived(groupName, itemList);

-

-  free(groupName);

-}

-

-COPCGroup* COpcConnectionImpl::getOpcGroup(const char* pa_acGroupName, COpcProcessVar::EOpcProcessVarFunctions pa_eFunction){

-  COPCGroup *retGroup = NULL;

-

-  TOpcGroupSettingsList::Iterator itEnd = m_lOpcGroupSettingsList.end();

-  for(TOpcGroupSettingsList::Iterator it = m_lOpcGroupSettingsList.begin(); it != itEnd; ++it){

-    if(strcmp(it->m_acGroupName, pa_acGroupName) == 0){

-      if(pa_eFunction == COpcProcessVar::e_FBOutput){

-        if(!(it->m_bReadGroupAdded)){

-          char *groupName = (char*) malloc(strlen(pa_acGroupName) + 5 + 1);

-          strcpy(groupName, pa_acGroupName);

-          strcat(groupName, "_read");

-          try{

-            it->m_pOpcGroupRead = retGroup = m_pOpcServer->makeGroup(groupName, true, it->m_nReqUpdateRate, it->m_nRevisedUpdateRate, it->m_nDeadBand);

-            it->m_pOpcGroupRead->enableAsynch(*this);

-            it->m_bReadGroupAdded = true;

-          } catch (OPCException &e){

-            // TODO

-          }

-          free(groupName);

-        } else {

-          retGroup = it->m_pOpcGroupRead;

-        }

-      }

-      else if(pa_eFunction == COpcProcessVar::e_FBInput){

-        if(!(it->m_bWriteGroupAdded)){

-          char *groupName = (char*) malloc(strlen(pa_acGroupName) + 6 + 1);

-          strcpy(groupName, pa_acGroupName);

-          strcat(groupName, "_write");

-          try{

-            it->m_pOpcGroupWrite = retGroup = m_pOpcServer->makeGroup(groupName, true, it->m_nReqUpdateRate, it->m_nRevisedUpdateRate, it->m_nDeadBand);

-            it->m_bWriteGroupAdded = true;

-          } catch (OPCException &e){

-            // TODO

-          }

-          free(groupName);

-        } else {

-          retGroup = it->m_pOpcGroupWrite;

-        }

-      }

-

-      break;

-    }

-  }

-

-  return retGroup;

-}

diff --git a/src/modules/opc/opcconnectionimpl.h b/src/modules/opc/opcconnectionimpl.h
deleted file mode 100644
index 7a6d7dc..0000000
--- a/src/modules/opc/opcconnectionimpl.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2015 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef OPCCONNECTIONIMPL_H_

-#define OPCCONNECTIONIMPL_H_

-

-#include "fortelist.h"

-

-#include "opcprocessvar.h"

-

-// Includes from OPC library

-#include "windows.h"

-#include "opcda.h"

-#include "OPCClient.h"

-

-class COpcConnection;

-

-class COpcConnectionImpl : public IAsynchDataCallback{

-  public:

-    COpcConnectionImpl(const char *pa_acHost, const char *pa_acServerName, COpcConnection* pa_pOpcConn);

-    ~COpcConnectionImpl();

-

-    void connect();

-    void addItem(COpcProcessVar* pa_pNewItem);

-    void addGroup(const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand);

-

-    int sendItemData(COpcProcessVar* pa_pNewItem);

-    int receiveData(const char* pa_acRecvBuffer);

-

-    const char* getHost(){

-      return m_acHost;

-    }

-    const char* getServerName(){

-      return m_acServerName;

-    }

-

-    virtual void OnDataChange(COPCGroup & group, CAtlMap<COPCItem *, OPCItemData *> & changes);

-

-  private:

-    COPCGroup* getOpcGroup(const char *pa_acGroupName, COpcProcessVar::EOpcProcessVarFunctions pa_eFunction);

-

-    struct SOpcGroupSettings{

-        COPCGroup* m_pOpcGroupRead;

-        COPCGroup* m_pOpcGroupWrite;

-        const char* m_acGroupName;

-        unsigned long m_nReqUpdateRate;

-        unsigned long m_nRevisedUpdateRate;

-        float m_nDeadBand;

-        bool m_bReadGroupAdded;

-        bool m_bWriteGroupAdded;

-

-        SOpcGroupSettings(const char* pa_acGroupName, unsigned long pa_nReqUpdateRate, float pa_nDeadBand) :

-          m_pOpcGroupRead(0), m_pOpcGroupWrite(0), m_acGroupName(pa_acGroupName), m_nReqUpdateRate(pa_nReqUpdateRate), m_nRevisedUpdateRate(0), m_nDeadBand(pa_nDeadBand), m_bReadGroupAdded(false), m_bWriteGroupAdded(false){

-        }

-    };

-

-    typedef CSinglyLinkedList<SOpcGroupSettings*> TOpcGroupSettingsList;

-    TOpcGroupSettingsList m_lOpcGroupSettingsList;

-

-    COpcConnection* m_pOpcConn;

-

-    COPCHost* m_pOpcHost;

-    COPCServer *m_pOpcServer;

-

-    const char* m_acHost;

-    const char* m_acServerName;

-    const char* m_acGroupName;

-    unsigned long m_nReqUpdateRate;

-    unsigned long m_nRealUpdateRate;

-    float m_nDeadBand;

-};

-

-#endif // OPCCONNECTIONIMPL_H_

diff --git a/src/modules/opc/opceventhandler.cpp b/src/modules/opc/opceventhandler.cpp
deleted file mode 100644
index f2ec4fc..0000000
--- a/src/modules/opc/opceventhandler.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 - 2014 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opceventhandler.h"

-#include "../core/devexec.h"

-#include <commfb.h>

-

-#include <ObjBase.h>

-

-DEFINE_HANDLER(COpcEventHandler);

-

-COpcEventHandler::TCallbackDescriptor COpcEventHandler::m_nCallbackDescCount = 0;

-

-COpcEventHandler::COpcEventHandler(CDeviceExecution& pa_poDeviceExecution) : CExternalEventHandler(pa_poDeviceExecution)  {

-  this->start();

-  // Sleep to allow new thread to start

-  CThread::sleep(100);

-}

-

-COpcEventHandler::~COpcEventHandler(){

-  this->end();

-}

-

-void COpcEventHandler::sendCommand(ICmd *pa_pCmd){

-  m_oSync.lock();

-  m_lCommandQueue.pushBack(pa_pCmd);

-  m_oSync.unlock();

-}

-

-void COpcEventHandler::run(){

-  HRESULT result = CoInitializeEx(NULL, COINIT_MULTITHREADED);

-

-  if(result == S_OK){

-    while(isAlive()){

-      ICmd* nextCommand = getNextCommand();

-      if(nextCommand != NULL) {

-        nextCommand->runCommand();

-      }

-

-      MSG msg;

-      while(PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE)){

-        TranslateMessage(&msg);

-        DispatchMessage(&msg);

-      }

-    }

-  }

-

-  CoUninitialize();

-}

-

-COpcEventHandler::TCallbackDescriptor COpcEventHandler::addComCallback(forte::com_infra::CComLayer* pa_pComCallback){

-  m_oSync.lock();

-  m_nCallbackDescCount++;

-  TComContainer stNewNode = { m_nCallbackDescCount, pa_pComCallback };

-  m_lstComCallbacks.pushBack(stNewNode);

-  m_oSync.unlock();

-

-  return m_nCallbackDescCount;

-}

-

-void COpcEventHandler::removeComCallback(COpcEventHandler::TCallbackDescriptor pa_nCallbackDesc){

-  m_oSync.lock();

-

-  TCallbackList::Iterator itRunner(m_lstComCallbacks.begin());

-

-  if(itRunner->m_nCallbackDesc == pa_nCallbackDesc){

-    m_lstComCallbacks.popFront();

-  }

-  else{

-    TCallbackList::Iterator itLastPos(itRunner);

-    TCallbackList::Iterator itEnd(m_lstComCallbacks.end());

-    ++itRunner;

-    while(itRunner != itEnd){

-      if(itRunner->m_nCallbackDesc == pa_nCallbackDesc){

-        m_lstComCallbacks.eraseAfter(itLastPos);

-        break;

-      }

-      itLastPos = itRunner;

-      ++itRunner;

-    }

-  }

-  m_oSync.unlock();

-}

-

-void COpcEventHandler::executeComCallback(COpcEventHandler::TCallbackDescriptor pa_nCallbackDesc){

-  m_oSync.lock();

-  TCallbackList::Iterator itEnd(m_lstComCallbacks.end());

-  for(TCallbackList::Iterator itCallback = m_lstComCallbacks.begin(); itCallback != itEnd; ++itCallback){

-    if(itCallback->m_nCallbackDesc == pa_nCallbackDesc){

-      //FIX

-      TComContainer comCon = (*itCallback);

-      m_oSync.unlock();

-      if(forte::com_infra::e_Nothing != comCon.m_pCallback->recvData(0,0)){

-        startNewEventChain(comCon.m_pCallback->getCommFB());

-      }

-      m_oSync.lock();

-      break;

-    }

-  }

-  m_oSync.unlock();

-}

-

-ICmd* COpcEventHandler::getNextCommand(){

-  ICmd* command;

-

-  m_oSync.lock();

-  TCommandQueue::Iterator itBegin = m_lCommandQueue.begin();

-  if(itBegin != m_lCommandQueue.end()){

-    command = (*itBegin);

-    m_lCommandQueue.popFront();

-  } else {

-    command = NULL;

-  }

-  m_oSync.unlock();

-

-  return command;

-}

diff --git a/src/modules/opc/opceventhandler.h b/src/modules/opc/opceventhandler.h
deleted file mode 100644
index 5689d3a..0000000
--- a/src/modules/opc/opceventhandler.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 AIT, fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation
- *******************************************************************************/
-#ifndef OPCEVENTHANDLER_H_
-#define OPCEVENTHANDLER_H_
-
-#include "extevhan.h"
-#include <forte_thread.h>
-#include "fortelist.h"
-#include <forte_sync.h>
-#include "comlayer.h"
-
-#include "ICmd.h"
-
-class COpcEventHandler : public CExternalEventHandler, private CThread{
-    DECLARE_HANDLER(COpcEventHandler)
-  public:
-    typedef int TCallbackDescriptor;
-
-    void sendCommand(ICmd *pa_pCmd);
-
-    TCallbackDescriptor addComCallback(forte::com_infra::CComLayer* pa_pComCallback);
-    void removeComCallback(TCallbackDescriptor pa_nCallbackDesc);
-
-    void executeComCallback(TCallbackDescriptor pa_nCallbackDesc);
-
-    /* functions needed for the external event handler interface */
-    void enableHandler(void){
-      start();
-    }
-
-    void disableHandler(void){
-      end();
-    }
-
-    void setPriority(int){
-      //currently we are doing nothing here.
-      //TODO We should adjust the thread priority.
-    }
-
-    int getPriority(void) const{
-      //the same as for setPriority
-      return 0;
-    }
-
-  protected:
-    virtual void run(void);
-
-  private:
-    ICmd* getNextCommand();
-
-    struct TComContainer{
-        TCallbackDescriptor m_nCallbackDesc;
-        forte::com_infra::CComLayer* m_pCallback;
-    };
-
-    typedef CSinglyLinkedList<TComContainer> TCallbackList;
-    TCallbackList m_lstComCallbacks;
-
-    static TCallbackDescriptor m_nCallbackDescCount;
-
-    CSyncObject m_oSync;
-
-    typedef CSinglyLinkedList<ICmd*> TCommandQueue;
-    TCommandQueue m_lCommandQueue;
-};
-
-#endif // OPCEVENTHANDLER_H_
diff --git a/src/modules/opc/opcprocessvar.cpp b/src/modules/opc/opcprocessvar.cpp
deleted file mode 100644
index ac8af41..0000000
--- a/src/modules/opc/opcprocessvar.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "opcprocessvar.h"

-#include "OPCGroup.h"

-#include "OPCItem.h"

-

-COpcProcessVar::COpcProcessVar(const char* pa_acItemGroupName, const char* pa_acItemName, EOpcProcessVarFunctions pa_eFunction) :

-  m_pOpcItem(0), m_acItemGroupName(pa_acItemGroupName), m_acItemName(pa_acItemName), m_bActive(false), m_eFunction(pa_eFunction){

-  m_oCurrentValue.set<SHORT>(0);

-}

-

-void COpcProcessVar::sendItemData(){

-  try{

-    if(getIsActive()) {

-      m_pOpcItem->writeSync(updateValue());

-    }

-  } catch (OPCException &e){

-    setIsActive(false);

-  }

-}

-

-void COpcProcessVar::setNewValue(Variant pa_oNewValue){

-  m_oSync.lock();

-  m_lNewValueQueue.pushBack(pa_oNewValue);

-  m_oSync.unlock();

-}

-

-Variant COpcProcessVar::peekNewValue(){

-  Variant retVal;

-

-  m_oSync.lock();

-  TVariantList::Iterator itBegin = m_lNewValueQueue.begin();

-  if(itBegin != m_lNewValueQueue.end()){

-    retVal = (*itBegin);

-  } else {

-    retVal = m_oCurrentValue;

-  }

-

-  m_oSync.unlock();

-

-  return retVal;

-}

-

-Variant COpcProcessVar::updateValue(){

-  Variant retVal;

-

-  m_oSync.lock();

-  TVariantList::Iterator itBegin = m_lNewValueQueue.begin();

-  TVariantList::Iterator itEnd = m_lNewValueQueue.end();

-  if(itBegin != m_lNewValueQueue.end()){

-    m_oCurrentValue = retVal = (*itBegin);

-    m_lNewValueQueue.popFront();

-  } else {

-    retVal = m_oCurrentValue;

-  }

-

-  m_oSync.unlock();

-

-  return retVal;

-}

diff --git a/src/modules/opc/opcprocessvar.h b/src/modules/opc/opcprocessvar.h
deleted file mode 100644
index 0c5ae51..0000000
--- a/src/modules/opc/opcprocessvar.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, ACIN

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef OPCPROCESSVAR_H_

-#define OPCPROCESSVAR_H_

-

-#include "windows.h"

-#include "Variant.h"

-#include "fortelist.h"

-#include <forte_sync.h>

-

-class COPCItem;

-

-class COpcProcessVar{

-  public:

-    enum EOpcProcessVarFunctions{

-      e_FBInput, e_FBOutput

-    };

-

-    COpcProcessVar(const char* pa_acItemGroupName, const char* pa_acItemName, EOpcProcessVarFunctions pa_eFunction);

-    ~COpcProcessVar(){

-    }

-

-    const char* getItemName() const {

-      return m_acItemName;

-    }

-    const char* getItemGroupName() const {

-      return m_acItemGroupName;

-    }

-    EOpcProcessVarFunctions getItemFunction() const {

-      return m_eFunction;

-    }

-

-    void setOpcItem(COPCItem* pa_pOpcItem){

-      m_pOpcItem = pa_pOpcItem;

-    }

-

-    void sendItemData();

-

-    void setNewValue(Variant pa_oNewValue);

-    Variant peekNewValue();

-

-    Variant updateValue();

-

-    bool getIsActive() const {

-      return m_bActive;

-    }

-

-    void setIsActive(bool pa_bActive){

-      m_bActive = pa_bActive;

-    }

-

-  private:

-    COPCItem* m_pOpcItem;

-

-    const char* m_acItemGroupName;

-    const char* m_acItemName;

-    bool m_bActive;

-

-    Variant m_oCurrentValue;

-

-    typedef CSinglyLinkedList<Variant> TVariantList;

-    TVariantList m_lNewValueQueue;

-

-    Variant m_oNewValue;

-

-    CSyncObject m_oSync;

-

-    EOpcProcessVarFunctions m_eFunction;

-

-};

-

-#endif // OPCPROCESSVAR_H_

diff --git a/src/modules/opc/readme.txt b/src/modules/opc/readme.txt
deleted file mode 100644
index 7dffddb..0000000
--- a/src/modules/opc/readme.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Installation Instructions

-The OPC com layer requires the following packages

-  - OPC Client library release 0.4 (http://sourceforge.net/projects/opcclient/)

-  - Boost Lexical Cast (http://www.boost.org)

-

-Before OPC Client is compiled the function init() in OPCClient.cpp must be changed from:

-void COPCClient::init()

-{  

-  HRESULT  result = CoInitialize(NULL);

-  if (FAILED(result))

-  {

-    throw OPCException("CoInitialize failed");

-  }

-

-  CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

-

-  result = CoGetMalloc(MEMCTX_TASK, &iMalloc);

-  if (FAILED(result))

-  {

-    throw OPCException("CoGetMalloc failed");

-  }

-}

-

-to:

-void COPCClient::init()

-{  

-  CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

-

-  HRESULT  result = CoGetMalloc(MEMCTX_TASK, &iMalloc);

-  if (FAILED(result))

-  {

-    throw OPCException("CoGetMalloc failed");

-  }

-}

-  

-  

-Once the OPC Client library is compiled performe the steps below:

-1. Place OPC Client library in the following folder structure:

-  <opcclientroot>/include - all headers should be placed here

-  <opcclientroot>/lib - OPCClientToolkit.lib

-2. Choose <opcclientroot> for FORTE_COM_OPC_LIB_ROOT in CMake

-3. Choose Boost root folder <boostroot> for FORTE_COM_OPC_BOOST_ROOT

-   (the lexical_cast.hpp header must be available in <boostroot>/boost)

-

-Parameter Documentation (all values are required)

-OPC Client

-opc[host:serverName:updateRate:deadBand:fbInputItems:fbOutputItems]

-  - host: 127.0.0.1 etc

-  - serverName: e.g. Matrikon.OPC.Simulation

-  - updateRate: update frequency in milliseconds

-  - deadBand: dead band used for update (same unit as value)

-  - fbInputItems/fbOutputItems: items to be added, items should be separated with a comma i.e.

-                  Random.Int2,Bucket Brigade.Int4

-

-example: opc[127.0.0.1:Matrikon.OPC.Simulation:2000:0.01:Bucket Brigade.Int4:Random.Int2,Bucket Brigade.Int4]

diff --git a/src/modules/piface/processinterface.h b/src/modules/piface/processinterface.h
index b4d2041..45c9701 100644
--- a/src/modules/piface/processinterface.h
+++ b/src/modules/piface/processinterface.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016 fortiss GmbH
+ * Copyright (c) 2016, 2021 fortiss GmbH, HIT robot group
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
  * http://www.eclipse.org/legal/epl-2.0.
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Monika Wenger, Alois Zoitl - initial API and implementation and/or initial documentation
+ *   Tibalt Zhao - adapt to new handler infrastructure
  *******************************************************************************/
 
 #ifndef PROCESSINTERFACE_H_
@@ -26,6 +27,8 @@
 
     virtual ~CPiFaceProcessInterface();
 
+  friend class CDeviceExecution;
+
   protected:
     bool initialise(bool paInput);
     bool deinitialise();
diff --git a/src/modules/powerlink/CMakeLists.txt b/src/modules/powerlink/CMakeLists.txt
deleted file mode 100644
index dd84685..0000000
--- a/src/modules/powerlink/CMakeLists.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-#*******************************************************************************

-# Copyright (c) 2012 - 2014 AIT, fortiss GmbH 

-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# SPDX-License-Identifier: EPL-2.0

-# 
-# Contributors:
-#    Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

-# *******************************************************************************/

-

-forte_add_module(POWERLINK "openPOWERLINK Service Interface Function Blocks")

-

-#############################################################################

-# COM Service Interface Function Blocks

-#############################################################################

-

-if("${FORTE_ARCHITECTURE}" STREQUAL "Win32")

-    forte_add_sourcefile_cpp(EplWrapper.cpp)  

-  forte_add_definition( -D_CONSOLE -DWPCAP )

-  

-  forte_add_include_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/Target/X86/Windows/WpdPack/Include)

-

-  forte_add_link_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/Target/X86/Windows/WpdPack/Lib)

-  

-  forte_add_sourcefile_with_path_cpp(${FORTE_MODULE_POWERLINK_LIB_DIR}/EplStack/trace.c)

-  

-  forte_add_link_library(openPOWERLINK.lib)

-  forte_add_link_library(wpcap.lib)

-  forte_add_link_library(iphlpapi.lib)

-

-elseif("${FORTE_ARCHITECTURE}" STREQUAL "Posix")

-  forte_add_sourcefile_cpp(EplWrapper.cpp)

-  forte_add_link_library(-lpowerlink -lpcap -lrt)

-else()

-  MESSAGE("openPOWERLINK is only supported for FORTE on Windows and Linux platforms. Disabled Module!")

-    set(FORTE_MODULE_POWERLINK OFF)

-endif()

-

-if(FORTE_MODULE_POWERLINK)  

-  SET(FORTE_MODULE_POWERLINK_LIB_DIR "" CACHE PATH "Path to openPOWERLINK-V1.08.1 directory")

-  SET(FORTE_MODULE_POWERLINK_TINYXML_DIR "" CACHE PATH "Path to TinyXML directory")

-    

-    forte_add_sourcefile_hcpp( POWERLINK_MN 

-                   X20DO9321

-                   X20DO9322

-                 X20DI4653                 

-                   X20DI9371

-                   X20DI9372

-                   X20AI4622

-                   X20AO4622

-                   X20AT2402

-                 X20AT4222

-                 X20DO4649

-                 X20DO4623

-                   EplXmlReader 

-                   ModuleList 

-                   ProcessImageMatrix )

-    

-    forte_add_sourcefile_h( EplWrapper.h )

-    

-    forte_add_link_directories(${FORTE_MODULE_POWERLINK_LIB_DIR})

-    

-    forte_add_include_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/Include)

-    forte_add_include_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/SharedBuff)

-    forte_add_include_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/ObjDicts/CiA302-4_MN)

-    forte_add_include_directories(${FORTE_MODULE_POWERLINK_LIB_DIR}/Examples/X86/Generic/powerlink_user_lib)

-  forte_add_sourcefile_with_path_cpp(${FORTE_MODULE_POWERLINK_LIB_DIR}/ObjDicts/CiA302-4_MN/EplApiProcessImageSetup.c)

-  forte_add_sourcefile_with_path_cpp(${FORTE_MODULE_POWERLINK_LIB_DIR}/EplStack/EplTgtConio.c)

-  

-  forte_add_include_directories(${FORTE_MODULE_POWERLINK_TINYXML_DIR})

-  forte_add_sourcefile_with_path_hcpp( ${FORTE_MODULE_POWERLINK_TINYXML_DIR}/tinystr 

-                     ${FORTE_MODULE_POWERLINK_TINYXML_DIR}/tinyxml )

-

-  forte_add_sourcefile_with_path_cpp( ${FORTE_MODULE_POWERLINK_TINYXML_DIR}/tinyxmlerror.cpp 

-                    ${FORTE_MODULE_POWERLINK_TINYXML_DIR}/tinyxmlparser.cpp )

-    

-    forte_add_definition( -DCONFIG_POWERLINK_USERSTACK )

-endif(FORTE_MODULE_POWERLINK)

diff --git a/src/modules/powerlink/EplCNCallback.h b/src/modules/powerlink/EplCNCallback.h
deleted file mode 100644
index 3d4368c..0000000
--- a/src/modules/powerlink/EplCNCallback.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, ACIN

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _EPLCNCALLBACK_H_

-#define _EPLCNCALLBACK_H_

-

-class IEplCNCallback{

-  public:

-

-    virtual void cnSynchCallback() = 0;

-

-  protected:

-    virtual ~IEplCNCallback(){

-    }

-    ;

-

-};

-

-#endif //_EPLCNCALLBACK_H_

diff --git a/src/modules/powerlink/EplWrapper.cpp b/src/modules/powerlink/EplWrapper.cpp
deleted file mode 100644
index f29c246..0000000
--- a/src/modules/powerlink/EplWrapper.cpp
+++ /dev/null
@@ -1,1081 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 - 2014 AIT, ACIN, fortiss

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl, Ewald Weinhandl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-#include "EplXmlReader.h"

-#include <forte_thread.h>

-

-#if (TARGET_SYSTEM == _WIN32_)

-#define _WINSOCKAPI_ // prevent windows.h from including winsock.h

-#endif  // (TARGET_SYSTEM == _WIN32_)

-/* includes */

-#include "Epl.h"

-

-#undef EPL_STACK_VERSION

-#define EPL_STACK_VERSION(ver,rev,rel)      (((((ver)) & 0xFF)<<24)|((((rev))&0xFF)<<16)|(((rel))&0xFFFF))

-

-#if (TARGET_SYSTEM == _LINUX_)

-#include <stdio.h>

-#include <unistd.h>

-#include <sys/types.h>

-#include <sys/socket.h>

-#include <sys/select.h>

-#include <sys/ioctl.h>

-#include <netinet/in.h>

-#include <net/if.h>

-#include <string.h>

-#include <termios.h>

-#include <pthread.h>

-#include <sys/syscall.h>

-#include <sys/resource.h>

-#include <errno.h>

-

-#include <sys/stat.h>

-#include <fcntl.h>

-#include <signal.h>

-#include <time.h>

-#include <stdarg.h>

-

-#ifndef CONFIG_POWERLINK_USERSTACK

-#include <pthread.h>

-#else

-#include <pcap.h>

-#endif

-

-#elif (TARGET_SYSTEM == _WIN32_)

-#include <Iphlpapi.h>

-#include <pcap.h>

-#endif  // (TARGET_SYSTEM == _WIN32_)

-#include <EplTgtConio.h>

-//#include <conio.h>

-

-/***************************************************************************/

-/*                                                                         */

-/*                                                                         */

-/*          G L O B A L   D E F I N I T I O N S                            */

-/*                                                                         */

-/*                                                                         */

-/***************************************************************************/

-

-//---------------------------------------------------------------------------

-// const defines

-//---------------------------------------------------------------------------

-#if (TARGET_SYSTEM == _LINUX_)

-

-#define SET_CPU_AFFINITY

-#define MAIN_THREAD_PRIORITY            20

-

-#elif (TARGET_SYSTEM == _WIN32_)

-

-// TracePoint support for realtime-debugging

-#ifdef _DBG_TRACE_POINTS_

-void PUBLIC TgtDbgSignalTracePoint (BYTE bTracePointNumber_p);

-#define TGT_DBG_SIGNAL_TRACE_POINT(p)   TgtDbgSignalTracePoint(p)

-#else

-#define TGT_DBG_SIGNAL_TRACE_POINT(p)

-#endif

-

-#endif // (TARGET_SYSTEM == _WIN32_)

-const DWORD NODEID = 0xF0; //=> MN

-const DWORD IP_ADDR = 0xc0a86401; // 192.168.100.1

-const DWORD SUBNET_MASK = 0xFFFFFF00; // 255.255.255.0

-const char* HOSTNAME = "EPL Stack";

-

-//---------------------------------------------------------------------------

-// module global vars

-//---------------------------------------------------------------------------

-

-CONST BYTE abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

-

-static unsigned int uiNodeId_g = EPL_C_ADR_INVALID;

-

-static tEplApiProcessImageCopyJob AppProcessImageCopyJob_g;

-

-static bool waitingUntilOperational;

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-

-//static char* pszCdcFilename_g = "mnobd.cdc";

-

-#else

-

-static pthread_t eventThreadId;

-static pthread_t syncThreadId;

-

-void *powerlinkEventThread(void * arg);

-void *powerlinkSyncThread(void * arg);

-

-#endif

-

-//---------------------------------------------------------------------------

-// local function prototypes

-//---------------------------------------------------------------------------

-

-// This function is the entry point for your object dictionary. It is defined

-// in OBJDICT.C by define EPL_OBD_INIT_RAM_NAME. Use this function name to define

-// this function prototype here. If you want to use more than one Epl

-// instances then the function name of each object dictionary has to differ.

-

-extern "C" tEplKernel PUBLIC EplObdInitRam (tEplObdInitParam MEM* pInitParam_p);

-

-tEplKernel PUBLIC AppCbEvent(

-    tEplApiEventType EventType_p,// IN: event type (enum)

-    tEplApiEventArg* pEventArg_p,// IN: event argument (union)

-    void GENERIC* pUserArg_p);

-

-tEplKernel PUBLIC AppCbSync(void);

-

-char* CEplStackWrapper::allocProcImage(unsigned int n_bytes){

-  char* procImage = (char*) malloc(n_bytes);

-  for(unsigned int i = 0; i < n_bytes; i++){

-    procImage[i] = 0x00;

-  }

-

-  return procImage;

-}

-

-//=========================================================================//

-//                                                                         //

-//          S T A T I C   F U N C T I O N S                                //

-//                                                                         //

-//=========================================================================//

-

-DEFINE_SINGLETON(CEplStackWrapper);

-

-void CEplStackWrapper::eplMainInit(){

-#if (TARGET_SYSTEM == _LINUX_)

-  sigset_t    mask;

-

-  /*

-   * We have to block the real time signals used by the timer modules so

-   * that they are able to wait on them using sigwaitinfo!

-   */

-  sigemptyset(&mask);

-  sigaddset(&mask, SIGRTMIN);

-  sigaddset(&mask, SIGRTMIN + 1);

-  pthread_sigmask(SIG_BLOCK, &mask, NULL);

-#endif

-}

-

-//=========================================================================//

-//                                                                         //

-//          C L A S S   F U N C T I O N S                                  //

-//                                                                         //

-//=========================================================================//

-

-CEplStackWrapper::CEplStackWrapper(){

-}

-

-CEplStackWrapper::~CEplStackWrapper(){

-}

-

-int CEplStackWrapper::eplStackInit(char* pa_chXmlFile, char* pa_chCdcFile, char* pa_chEthDeviceName){

-  tEplKernel EplRet;

-  static tEplApiInitParam EplApiInitParam;

-  const char* sHostname = HOSTNAME;

-

-  // Read and process XML file

-  CEplXmlReader xmlReader(&m_oProcMatrixIn, &m_oProcMatrixOut);

-  xmlReader.readXmlFile(pa_chXmlFile);

-

-  m_nProcInSize = m_oProcMatrixIn.getProcessImageSize();

-  m_nProcOutSize = m_oProcMatrixOut.getProcessImageSize();

-

-  m_pchAppProcessImageIn_g = allocProcImage(m_nProcInSize);

-  m_pchAppProcessImageOut_g = allocProcImage(m_nProcOutSize);

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-#if (TARGET_SYSTEM == _LINUX_)

-  struct sched_param schedParam;

-#endif

-

-  // variables for Pcap

-  char sErr_Msg[PCAP_ERRBUF_SIZE];

-  pcap_if_t *alldevs;

-  pcap_if_t *seldev;

-  int i = 0;

-#endif

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-

-#if (TARGET_SYSTEM == _LINUX_)

-  /* adjust process priority */

-  if(nice(-20) == -1) // push nice level in case we have no RTPreempt

-  {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-  EPL_DBGLVL_ERROR_TRACE("%s() couldn't set nice value! (%s)\n", __func__, strerror(errno));

-#else

-    EPL_DBGLVL_ERROR_TRACE2("%s() couldn't set nice value! (%s)\n", __func__, strerror(errno));

-#endif

-  

-  }

-  schedParam.__sched_priority = MAIN_THREAD_PRIORITY;

-  if(pthread_setschedparam(pthread_self(), SCHED_RR, &schedParam) != 0){

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)  

-  EPL_DBGLVL_ERROR_TRACE("%s() couldn't set thread scheduling parameters! %d\n", __func__, schedParam.__sched_priority);

-#else

-    EPL_DBGLVL_ERROR_TRACE2("%s() couldn't set thread scheduling parameters! %d\n", __func__, schedParam.__sched_priority);

-#endif

-  }

-

-  /* Initialize target specific stuff */

-  // EplTgtInit();

-#elif (TARGET_SYSTEM == _WIN32_)

-

-  // activate realtime priority class

-  SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);

-  // lower the priority of this thread

-  SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);

-

-#endif // (TARGET_SYSTEM == _WIN32_)

-#endif // CONFIG_POWERLINK_USERSTACK

-  /* Enabling ftrace for debugging */

-  FTRACE_OPEN();

-  FTRACE_ENABLE (TRUE);

-

-  EPL_MEMSET(&EplApiInitParam, 0, sizeof(EplApiInitParam));

-  EplApiInitParam.m_uiSizeOfStruct = sizeof(EplApiInitParam);

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-

-  ////////////////////////////////////////////////////////////////////////////////

-  // Find ETH card specified by user //

-  ////////////////////////////////////////////////////////////////////////////////

-

-  bool macFound;

-  char correctDevName[1024];

-

-  macFound = findMAC(pa_chEthDeviceName, &correctDevName[0]);

-

-  /* Retrieve the device list on the local machine */

-

-  if(pcap_findalldevs(&alldevs, sErr_Msg) == -1){

-    fprintf(stderr, "Error in pcap_findalldevs: %s\n", sErr_Msg);

-    EplRet = kEplNoResource;

-    return EplRet;

-  }

-

-  printf("\n");

-  for(seldev = alldevs, i = 0; seldev != NULL; seldev = seldev->next, i++){

-    if(seldev->description){

-      printf("%d: %s\n      %s\n", i, seldev->description, seldev->name);

-    }

-    else{

-      printf("%d: %s\n", i, seldev->name);

-    }

-

-    if(macFound){

-      const char* userDescLoc = strstr(seldev->name, correctDevName);

-      if(userDescLoc != NULL){

-        if(seldev->description){

-          printf("\nChosen Ethernet Card: %s\n      %s\n", seldev->description, seldev->name);

-        }

-        else{

-          printf("\nChosen Ethernet Card: %s\n", seldev->name);

-        }

-        break;

-      }

-    }

-

-    if(seldev->description){

-      const char* userDescLoc = strstr(seldev->description, pa_chEthDeviceName);

-      if(userDescLoc != NULL){

-        printf("\nChosen Ethernet Card: %s\n", seldev->description);

-        break;

-      }

-    }

-    else{

-      const char* userDescLoc = strstr(seldev->name, pa_chEthDeviceName);

-      if(userDescLoc != NULL){

-        printf("Chosen Ethernet Card: %s\n", seldev->name);

-        break;

-      }

-    }

-  }

-

-  // Check if a device was found, otherwise shutdown stack

-  if(!seldev){

-    fprintf(stderr, "%s(Err/Warn): Invalid MAC address or device name specified. Shutting down Powerlink stack\n", __func__);

-    EplRet = kEplNoResource;

-    return EplRet;

-  }

-

-  ////////////////////////////////////////////////////////////////////////////////

-  // Setup EplApiInitParam (some of them can be removed as we have obd?) //

-  ////////////////////////////////////////////////////////////////////////////////

-

-  // pass selected device name to Edrv

-  char devName[128];

-  strncpy(devName, seldev->name, 127);

-  EplApiInitParam.m_HwParam.m_pszDevName = devName;

-

-#endif

-

-  EplApiInitParam.m_uiNodeId = uiNodeId_g = NODEID;

-  EplApiInitParam.m_dwIpAddress = (0xFFFFFF00 & IP_ADDR) | EplApiInitParam.m_uiNodeId;

-

-  /* write 00:00:00:00:00:00 to MAC address, so that the driver uses the real hardware address */

-  EPL_MEMCPY(EplApiInitParam.m_abMacAddress, abMacAddr, sizeof(EplApiInitParam.m_abMacAddress));

-

-  EplApiInitParam.m_fAsyncOnly = FALSE;

-

-  EplApiInitParam.m_dwFeatureFlags = -1;

-  EplApiInitParam.m_dwCycleLen = 10000; // required for error detection

-  EplApiInitParam.m_uiIsochrTxMaxPayload = 256; // const

-  EplApiInitParam.m_uiIsochrRxMaxPayload = 256; // const

-  EplApiInitParam.m_dwPresMaxLatency = 50000; // const; only required for IdentRes

-  EplApiInitParam.m_uiPreqActPayloadLimit = 36; // required for initialisation (+28 bytes)

-  EplApiInitParam.m_uiPresActPayloadLimit = 36; // required for initialisation of Pres frame (+28 bytes)

-  EplApiInitParam.m_dwAsndMaxLatency = 150000; // const; only required for IdentRes

-  EplApiInitParam.m_uiMultiplCycleCnt = 0; // required for error detection

-  EplApiInitParam.m_uiAsyncMtu = 1500; // required to set up max frame size

-  EplApiInitParam.m_uiPrescaler = 2; // required for sync

-  EplApiInitParam.m_dwLossOfFrameTolerance = 500000;

-  EplApiInitParam.m_dwAsyncSlotTimeout = 3000000;

-  EplApiInitParam.m_dwWaitSocPreq = 150000;

-  EplApiInitParam.m_dwDeviceType = -1; // NMT_DeviceType_U32

-  EplApiInitParam.m_dwVendorId = -1; // NMT_IdentityObject_REC.VendorId_U32

-  EplApiInitParam.m_dwProductCode = -1; // NMT_IdentityObject_REC.ProductCode_U32

-  EplApiInitParam.m_dwRevisionNumber = -1; // NMT_IdentityObject_REC.RevisionNo_U32

-  EplApiInitParam.m_dwSerialNumber = -1; // NMT_IdentityObject_REC.SerialNo_U32

-

-  EplApiInitParam.m_dwSubnetMask = SUBNET_MASK;

-  EplApiInitParam.m_dwDefaultGateway = 0;

-  EPL_MEMCPY(EplApiInitParam.m_sHostname, sHostname, sizeof(EplApiInitParam.m_sHostname));

-  EplApiInitParam.m_uiSyncNodeId = EPL_C_ADR_SYNC_ON_SOA;

-  EplApiInitParam.m_fSyncOnPrcNode = FALSE;

-

-  // set callback functions

-  EplApiInitParam.m_pfnCbEvent = AppCbEvent;

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-  EplApiInitParam.m_pfnObdInitRam = EplObdInitRam;

-  EplApiInitParam.m_pfnCbSync = AppCbSync;

-#else

-  EplApiInitParam.m_pfnCbSync = NULL;

-#endif

-  ////////////////////////////////////////////////////////////////////////////////

-

-  ////////////////////////////////////////////////////////////////////////////////

-  // Initialize Powerlink Stack //

-  ////////////////////////////////////////////////////////////////////////////////

-  printf("\n\n Powerlink %s running.\n  (build: %s / %s)\n\n", (NODEID == EPL_C_ADR_MN_DEF_NODE_ID ? "Managing Node" : "Controlled Node"), __DATE__, __TIME__);

-

-  // initialize POWERLINK stack

-  EplRet = EplApiInitialize(&EplApiInitParam);

-  if(EplRet != kEplSuccessful){

-    return EplRet;

-  }

-

-#ifdef CONFIG_POWERLINK_USERSTACK

-  /* At this point, we don't need any more the device list. Free it */

-  pcap_freealldevs(alldevs);

-

-  EplRet = EplApiSetCdcFilename(pa_chCdcFile);

-  if(EplRet != kEplSuccessful){

-    return EplRet;

-  }

-#else

-  // create event thread

-  if(pthread_create(&eventThreadId, NULL, &powerlinkEventThread, NULL) != 0){

-    return EplRet;

-  }

-

-  // create sync thread

-  if(pthread_create(&syncThreadId, NULL, &powerlinkSyncThread, NULL) != 0){

-    return EplRet;

-  }

-#endif

-

-  AppProcessImageCopyJob_g.m_fNonBlocking = FALSE;

-  AppProcessImageCopyJob_g.m_uiPriority = 0;

-  AppProcessImageCopyJob_g.m_In.m_pPart = m_pchAppProcessImageIn_g;

-  AppProcessImageCopyJob_g.m_In.m_uiOffset = 0;

-  AppProcessImageCopyJob_g.m_In.m_uiSize = m_nProcInSize;

-  AppProcessImageCopyJob_g.m_Out.m_pPart = m_pchAppProcessImageOut_g;

-  AppProcessImageCopyJob_g.m_Out.m_uiOffset = 0;

-  AppProcessImageCopyJob_g.m_Out.m_uiSize = m_nProcOutSize;

-

-  EplRet = EplApiProcessImageAlloc(m_nProcInSize, m_nProcOutSize, 2, 2);

-  if(EplRet != kEplSuccessful){

-    eplStackShutdown();

-  }

-

-  EplRet = EplApiProcessImageSetup();

-  if(EplRet != kEplSuccessful){

-    eplStackShutdown();

-  }

-

-  // start processing

-  EplRet = EplApiExecNmtCommand(kEplNmtEventSwReset);

-  if(EplRet != kEplSuccessful){

-    eplStackShutdown();

-  }

-

-  waitingUntilOperational = false;

-  if(m_bWait == true){

-    while(!waitingUntilOperational){

-      // Waiting

-      CThread::sleepThread(1);

-    }

-  }

-

-  return EplRet;

-}

-

-////////////////////////////////////////////////////////////////////////////////

-// Stop the stack //

-////////////////////////////////////////////////////////////////////////////////

-int CEplStackWrapper::eplStackShutdown(void){

-  tEplKernel EplRet;

-

-  // halt the NMT state machine

-  // so the processing of POWERLINK frames stops

-  EplApiExecNmtCommand(kEplNmtEventSwitchOff);

-

-  // delete process image

-  EplApiProcessImageFree();

-

-  // delete instance for all modules

-  EplRet = EplApiShutdown();

-  printf("EplApiShutdown():  0x%X\n", EplRet);

-

-  m_oProcMatrixIn.clearAll();

-  m_oProcMatrixOut.clearAll();

-  m_lCallbackList.clearAll();

-  free(m_pchAppProcessImageIn_g);

-  free(m_pchAppProcessImageOut_g);

-

-  return EplRet;

-}

-

-CProcessImageMatrix* CEplStackWrapper::getProcessImageMatrixIn(){

-  return &m_oProcMatrixIn;

-}

-

-CProcessImageMatrix* CEplStackWrapper::getProcessImageMatrixOut(){

-  return &m_oProcMatrixOut;

-}

-

-char* CEplStackWrapper::getProcImageIn(){

-  return m_pchAppProcessImageIn_g;

-}

-

-char* CEplStackWrapper::getProcImageOut(){

-  return m_pchAppProcessImageOut_g;

-}

-

-void CEplStackWrapper::waitUntilOperational(bool pa_bWait){

-  m_bWait = pa_bWait;

-}

-

-void CEplStackWrapper::registerCallback(IEplCNCallback* pa_pCallback){

-  m_oSync.lock();

-  m_lCallbackList.pushBack(pa_pCallback);

-  m_oSync.unlock();

-}

-

-bool CEplStackWrapper::findMAC(const char* pa_pchUserMAC, char* pa_pchDeviceName){

-  //char* correctDevName;

-

-#if (TARGET_SYSTEM == _LINUX_)

-

-  int nSD; // Socket descriptor

-  struct ifreq sIfReq; // Interface request

-  struct if_nameindex *pIfList; // Ptr to interface name index

-  struct if_nameindex *pListSave; // Ptr to interface name index

-

-  //

-  // Initialize this function

-  //

-  pIfList = (struct if_nameindex *) NULL;

-  pListSave = (struct if_nameindex *) NULL;

-#ifndef SIOCGIFADDR

-  // The kernel does not support the required ioctls

-  return (false);

-#endif

-

-  //

-  // Create a socket that we can use for all of our ioctls

-  //

-  nSD = socket(PF_INET, SOCK_STREAM, 0);

-  if(nSD < 0){

-    // Socket creation failed, this is a fatal error

-    printf("File %s: line %d: Socket failed\n", __FILE__, __LINE__);

-    return (0);

-  }

-

-  //

-  // Obtain a list of dynamically allocated structures

-  //

-  pIfList = pListSave = if_nameindex();

-

-  //

-  // Walk thru the array returned and query for each interface's

-  // address

-  //

-  for(pIfList; *(char *) pIfList != 0; pIfList++){

-

-    strncpy(sIfReq.ifr_name, pIfList->if_name, IF_NAMESIZE);

-

-    //

-    // Get the MAC address for this interface

-    //

-    if(ioctl(nSD, SIOCGIFHWADDR, &sIfReq) != 0){

-      // We failed to get the MAC address for the interface

-      printf("File %s: line %d: Ioctl failed\n", __FILE__, __LINE__);

-      return false;

-    }

-

-    //

-    // Determine if we are processing the interface that we

-    // are interested in

-    //

-    char chMAC[6 * 2 + 5 + 2];

-    sprintf(chMAC, "%02X-%02X-%02X-%02X-%02X-%02X", (unsigned char) sIfReq.ifr_hwaddr.sa_data[0], (unsigned char) sIfReq.ifr_hwaddr.sa_data[1], (unsigned char) sIfReq.ifr_hwaddr.sa_data[2], (unsigned char) sIfReq.ifr_hwaddr.sa_data[3], (unsigned char) sIfReq.ifr_hwaddr.sa_data[4], (unsigned char) sIfReq.ifr_hwaddr.sa_data[5]);

-

-    if(compareMACs(chMAC, pa_pchUserMAC)){

-      strncpy(pa_pchDeviceName, pIfList->if_name, IF_NAMESIZE);

-

-      //

-      // Clean up things and return

-      //

-      if_freenameindex(pListSave);

-      close(nSD);

-

-      return true;

-    }

-  }

-

-  //

-  // Clean up things and return

-  //

-  if_freenameindex(pListSave);

-  close(nSD);

-

-#elif (TARGET_SYSTEM == _WIN32_)

-

-  // Find MAC address

-  IP_ADAPTER_INFO AdapterInfo[16];// Allocate information for up to 16 NICs

-  DWORD dwBufLen = sizeof(AdapterInfo);// Save memory size of buffer

-

-  DWORD dwStatus = GetAdaptersInfo(AdapterInfo, &dwBufLen);

-  assert(dwStatus == ERROR_SUCCESS);// Verify return value is valid, no buffer overflow

-

-  PIP_ADAPTER_INFO pAdapterInfo = AdapterInfo;// Contains pointer to current adapter info

-

-  do{

-    char* chMAC = new char[6*2+5+1];

-    BYTE *macAddr = pAdapterInfo->Address;

-    for (int i = 0; i < 6*2+5; i = i+2)

-    {

-      if (i>0){

-        chMAC[i] = '-';

-        i++;

-      }

-      sprintf(&chMAC[i],"%02x",*macAddr++);

-    }

-

-    if (compareMACs(chMAC, pa_pchUserMAC)){

-      //correctDevName = new char[strlen(pAdapterInfo->AdapterName)+1];

-      strcpy(pa_pchDeviceName,pAdapterInfo->AdapterName);

-      delete chMAC;

-

-      //pa_pchDeviceName = correctDevName;

-      return true;

-    }

-

-    pAdapterInfo = pAdapterInfo->Next; // Progress through linked list

-    delete chMAC;

-  }

-  while(pAdapterInfo); // Terminate if last adapter

-

-#endif

-

-  //pa_pchDeviceName = NULL; //No effect

-  return false;

-}

-

-bool CEplStackWrapper::compareMACs(const char* pa_chMACa, const char* pa_chMACb){

-  if(strcmp(pa_chMACa, pa_chMACb) == 0){

-    return true;

-  }

-

-  char* macCopyA = new char[strlen(pa_chMACa) + 1];

-  strcpy(macCopyA, pa_chMACa);

-  char* macCopyB = new char[strlen(pa_chMACb) + 1];

-  strcpy(macCopyB, pa_chMACb);

-

-  // Change to upper case

-  for(int i = 0; i < strlen(pa_chMACa); i++){

-    switch (macCopyA[i]){

-      case 'a':

-        macCopyA[i] = 'A';

-        break;

-      case 'b':

-        macCopyA[i] = 'B';

-        break;

-      case 'c':

-        macCopyA[i] = 'C';

-        break;

-      case 'd':

-        macCopyA[i] = 'D';

-        break;

-      case 'e':

-        macCopyA[i] = 'E';

-        break;

-      case 'f':

-        macCopyA[i] = 'F';

-        break;

-    }

-  }

-  for(int i = 0; i < strlen(pa_chMACb); i++){

-    switch (macCopyB[i]){

-      case 'a':

-        macCopyB[i] = 'A';

-        break;

-      case 'b':

-        macCopyB[i] = 'B';

-        break;

-      case 'c':

-        macCopyB[i] = 'C';

-        break;

-      case 'd':

-        macCopyB[i] = 'D';

-        break;

-      case 'e':

-        macCopyB[i] = 'E';

-        break;

-      case 'f':

-        macCopyB[i] = 'F';

-        break;

-    }

-  }

-

-  if(strcmp(macCopyA, macCopyB) == 0){

-    delete[] macCopyA;

-    delete[] macCopyB;

-    return true;

-  }

-

-  delete[] macCopyA;

-  delete[] macCopyB;

-  return false;

-}

-

-//=========================================================================//

-//                                                                         //

-//          P R I V A T E   F U N C T I O N S                              //

-//                                                                         //

-//=========================================================================//

-

-//---------------------------------------------------------------------------

-//

-// Function:    AppCbEvent

-//

-// Description: event callback function called by EPL API layer within

-//              user part (low priority).

-//

-// Parameters:  EventType_p     = event type

-//              pEventArg_p     = pointer to union, which describes

-//                                the event in detail

-//              pUserArg_p      = user specific argument

-//

-// Returns:     tEplKernel      = error code,

-//                                kEplSuccessful = no error

-//                                kEplReject = reject further processing

-//                                otherwise = post error event to API layer

-//

-// State:

-//

-//---------------------------------------------------------------------------

-

-tEplKernel PUBLIC AppCbEvent(

-    tEplApiEventType EventType_p,// IN: event type (enum)

-    tEplApiEventArg* pEventArg_p,// IN: event argument (union)

-    void GENERIC* pUserArg_p)

-{

-  tEplKernel EplRet = kEplSuccessful;

-

-  UNUSED_PARAMETER(pUserArg_p);

-

-  // check if NMT_GS_OFF is reached

-  switch (EventType_p)

-  {

-    case kEplApiEventNmtStateChange:

-    {

-      switch (pEventArg_p->m_NmtStateChange.m_NewNmtState)

-      {

-        case kEplNmtGsOff:

-        { // NMT state machine was shut down,

-          // because of user signal (CTRL-C) or critical EPL stack error

-          // -> also shut down EplApiProcess() and main()

-          EplRet = kEplShutdown;

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(kEplNmtGsOff) originating event = 0x%X\n", __func__, pEventArg_p->m_NmtStateChange.m_NmtEvent);

-#else

-          PRINTF2("%s(kEplNmtGsOff) originating event = 0x%X\n", __func__, pEventArg_p->m_NmtStateChange.m_NmtEvent);

-#endif

-          break;

-        }

-

-        case kEplNmtGsResetCommunication:

-        {

-          // continue

-        }

-

-        case kEplNmtGsResetConfiguration:

-        {

-          // continue

-        }

-

-        case kEplNmtMsPreOperational1:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(0x%X) originating event = 0x%X\n",

-              __func__,

-              pEventArg_p->m_NmtStateChange.m_NewNmtState,

-              pEventArg_p->m_NmtStateChange.m_NmtEvent);

-#else

-          PRINTF3("%s(0x%X) originating event = 0x%X\n",

-              __func__,

-              pEventArg_p->m_NmtStateChange.m_NewNmtState,

-              pEventArg_p->m_NmtStateChange.m_NmtEvent);

-#endif

-

-          // continue

-        }

-

-        case kEplNmtGsInitialising:

-        case kEplNmtGsResetApplication:

-        case kEplNmtMsNotActive:

-        case kEplNmtCsNotActive:

-        case kEplNmtCsPreOperational1:

-        {

-          break;

-        }

-        case kEplNmtCsOperational:

-        case kEplNmtMsOperational:

-        {

-          break;

-        }

-        default:

-        {

-          break;

-        }

-      }

-

-      break;

-    }

-

-    case kEplApiEventCriticalError:

-    case kEplApiEventWarning:

-    { // error or warning occured within the stack or the application

-      // on error the API layer stops the NMT state machine

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-      PRINTF("%s(Err/Warn): Source=%02X EplError=0x%03X",

-          __func__,

-          pEventArg_p->m_InternalError.m_EventSource,

-          pEventArg_p->m_InternalError.m_EplError);

-#else

-      PRINTF3("%s(Err/Warn): Source=%02X EplError=0x%03X",

-          __func__,

-          pEventArg_p->m_InternalError.m_EventSource,

-          pEventArg_p->m_InternalError.m_EplError);

-#endif

-      // check additional argument

-      switch (pEventArg_p->m_InternalError.m_EventSource)

-      {

-        case kEplEventSourceEventk:

-        case kEplEventSourceEventu:

-        { // error occured within event processing

-          // either in kernel or in user part

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF(" OrgSource=%02X\n", pEventArg_p->m_InternalError.m_Arg.m_EventSource);

-#else

-          PRINTF1(" OrgSource=%02X\n", pEventArg_p->m_InternalError.m_Arg.m_EventSource);

-#endif

-          break;

-        }

-

-        case kEplEventSourceDllk:

-        { // error occured within the data link layer (e.g. interrupt processing)

-          // the DWORD argument contains the DLL state and the NMT event

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF(" val=%lX\n", pEventArg_p->m_InternalError.m_Arg.m_dwArg);

-#else

-          PRINTF1(" val=%lX\n", pEventArg_p->m_InternalError.m_Arg.m_dwArg);

-#endif

-          break;

-        }

-

-        case kEplEventSourceObdk:

-        case kEplEventSourceObdu:

-        { // error occured within OBD module

-          // either in kernel or in user part

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF(" Object=0x%04X/%u\n", pEventArg_p->m_InternalError.m_Arg.m_ObdError.m_uiIndex, pEventArg_p->m_InternalError.m_Arg.m_ObdError.m_uiSubIndex);

-#else

-          PRINTF2(" Object=0x%04X/%u\n", pEventArg_p->m_InternalError.m_Arg.m_ObdError.m_uiIndex, pEventArg_p->m_InternalError.m_Arg.m_ObdError.m_uiSubIndex);

-#endif

-          break;

-        }

-

-        default:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("\n");

-#else

-          PRINTF0("\n");

-#endif

-          break;

-        }

-      }

-      break;

-    }

-

-    case kEplApiEventHistoryEntry:

-    { // new history entry

-      PRINTF("%s(HistoryEntry): Type=0x%04X Code=0x%04X (0x%02X %02X %02X %02X %02X %02X %02X %02X)\n",

-          __func__,

-          pEventArg_p->m_ErrHistoryEntry.m_wEntryType,

-          pEventArg_p->m_ErrHistoryEntry.m_wErrorCode,

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[0],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[1],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[2],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[3],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[4],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[5],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[6],

-          (WORD) pEventArg_p->m_ErrHistoryEntry.m_abAddInfo[7]);

-      break;

-    }

-

-    case kEplApiEventNode:

-    {

-      // check additional argument

-      switch (pEventArg_p->m_Node.m_NodeEvent)

-      {

-        case kEplNmtNodeEventCheckConf:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, CheckConf)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, CheckConf)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeEventUpdateConf:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, UpdateConf)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, UpdateConf)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeEventNmtState:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, NmtState=0x%X)\n", __func__, pEventArg_p->m_Node.m_uiNodeId, pEventArg_p->m_Node.m_NmtState);

-#else

-          PRINTF3("%s(Node=0x%X, NmtState=0x%X)\n", __func__, pEventArg_p->m_Node.m_uiNodeId, pEventArg_p->m_Node.m_NmtState);

-#endif

-          if (pEventArg_p->m_Node.m_NmtState == kEplNmtCsOperational){

-            printf("init finished\n");

-            waitingUntilOperational = true;

-          }

-          break;

-        }

-

-        case kEplNmtNodeEventError:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, Error=0x%X)\n", __func__, pEventArg_p->m_Node.m_uiNodeId, pEventArg_p->m_Node.m_wErrorCode);

-#else

-          PRINTF3("%s(Node=0x%X, Error=0x%X)\n", __func__, pEventArg_p->m_Node.m_uiNodeId, pEventArg_p->m_Node.m_wErrorCode);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeEventFound:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, Found)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, Found)\n", __func__, pEventArg_p->m_Node.m_uiNodeId);

-#endif

-          break;

-        }

-

-        default:

-        {

-          break;

-        }

-      }

-      break;

-    }

-

-#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFM)) != 0)

-    case kEplApiEventCfmProgress:

-    {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-      PRINTF("%s(Node=0x%X, CFM-Progress: Object 0x%X/%u, ", __func__, pEventArg_p->m_CfmProgress.m_uiNodeId, pEventArg_p->m_CfmProgress.m_uiObjectIndex, pEventArg_p->m_CfmProgress.m_uiObjectSubIndex);

-      PRINTF("%u/%u Bytes", pEventArg_p->m_CfmProgress.m_dwBytesDownloaded, pEventArg_p->m_CfmProgress.m_dwTotalNumberOfBytes);

-#else

-      PRINTF4("%s(Node=0x%X, CFM-Progress: Object 0x%X/%u, ", __func__, pEventArg_p->m_CfmProgress.m_uiNodeId, pEventArg_p->m_CfmProgress.m_uiObjectIndex, pEventArg_p->m_CfmProgress.m_uiObjectSubIndex);

-      PRINTF2("%u/%u Bytes", pEventArg_p->m_CfmProgress.m_dwBytesDownloaded, pEventArg_p->m_CfmProgress.m_dwTotalNumberOfBytes);

-#endif

-      if ((pEventArg_p->m_CfmProgress.m_dwSdoAbortCode != 0)

-          || (pEventArg_p->m_CfmProgress.m_EplError != kEplSuccessful))

-      {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-        PRINTF(" -> SDO Abort=0x%lX, Error=0x%X)\n", pEventArg_p->m_CfmProgress.m_dwSdoAbortCode, pEventArg_p->m_CfmProgress.m_EplError);

-#else

-        PRINTF2(" -> SDO Abort=0x%lX, Error=0x%X)\n", pEventArg_p->m_CfmProgress.m_dwSdoAbortCode, pEventArg_p->m_CfmProgress.m_EplError);

-#endif

-      }

-      else

-      {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-        PRINTF(")\n");

-#else

-        PRINTF0(")\n");

-#endif

-      }

-      break;

-    }

-

-    case kEplApiEventCfmResult:

-    {

-      switch (pEventArg_p->m_CfmResult.m_NodeCommand)

-      {

-        case kEplNmtNodeCommandConfOk:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, ConfOk)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, ConfOk)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeCommandConfErr:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, ConfErr)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, ConfErr)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeCommandConfReset:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, ConfReset)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, ConfReset)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#endif

-          break;

-        }

-

-        case kEplNmtNodeCommandConfRestored:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, ConfRestored)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#else

-          PRINTF2("%s(Node=0x%X, ConfRestored)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId);

-#endif

-          break;

-        }

-

-        default:

-        {

-#if EPL_DEFINED_STACK_VERSION >= EPL_STACK_VERSION(1, 8, 2)

-          PRINTF("%s(Node=0x%X, CfmResult=0x%X)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId, pEventArg_p->m_CfmResult.m_NodeCommand);

-#else

-          PRINTF3("%s(Node=0x%X, CfmResult=0x%X)\n", __func__, pEventArg_p->m_CfmResult.m_uiNodeId, pEventArg_p->m_CfmResult.m_NodeCommand);

-#endif

-          break;

-        }

-      }

-      break;

-    }

-#endif

-

-    default:

-    break;

-  }

-

-  return EplRet;

-}

-

-//---------------------------------------------------------------------------

-//

-// Function:    AppCbSync

-//

-// Description: sync event callback function called by event module within

-//              kernel part (high priority).

-//              This function sets the outputs, reads the inputs and runs

-//              the control loop.

-//

-// Parameters:  void

-//

-// Returns:     tEplKernel      = error code,

-//                                kEplSuccessful = no error

-//                                otherwise = post error event to API layer

-//

-// State:

-//

-//---------------------------------------------------------------------------

-

-tEplKernel PUBLIC AppCbSync(void){

-  tEplKernel EplRet = kEplSuccessful;

-

-  EplRet = EplApiProcessImageExchange(&AppProcessImageCopyJob_g);

-

-  // Loop through callback list and call each FB in the list

-  CEplStackWrapper::getInstance().executeAllCallbacks();

-

-  return EplRet;

-}

-

-void CEplStackWrapper::executeAllCallbacks(){

-  m_oSync.lock();

-  CSinglyLinkedList<IEplCNCallback*>::Iterator itEnd = m_lCallbackList.end();

-  for(CSinglyLinkedList<IEplCNCallback*>::Iterator it = m_lCallbackList.begin(); it != itEnd; ++it){

-    it->cnSynchCallback();

-  }

-  m_oSync.unlock();

-}

-

-#ifndef CONFIG_POWERLINK_USERSTACK

-

-void *powerlinkEventThread(void * arg __attribute__((unused))){

-  EplApiProcess();

-

-  return NULL;

-}

-

-void *powerlinkSyncThread(void * arg __attribute__((unused))){

-  while(1){

-    AppCbSync();

-  }

-  return NULL;

-}

-

-#endif

-

-// EOF

diff --git a/src/modules/powerlink/EplWrapper.h b/src/modules/powerlink/EplWrapper.h
deleted file mode 100644
index 5ae4ac6..0000000
--- a/src/modules/powerlink/EplWrapper.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 - 2104 AIT, ACIN, fortiss

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _EPLWRAPPER_H_

-#define _EPLWRAPPER_H_

-

-#include "ProcessImageMatrix.h"

-#include "EplCNCallback.h"

-#include <singlet.h>

-#include <fortelist.h>

-#include <forte_sync.h>

-

-struct SEplMapping{

-    struct SEplMappingValues{

-        unsigned int m_nDataSize;

-        unsigned int m_nPiOffset;

-        unsigned int m_nBitOffset;

-        char* m_pchCurrentValue;

-

-        SEplMappingValues(unsigned int pa_nDataSize, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset) :

-            m_nDataSize(pa_nDataSize), m_nPiOffset(pa_nPiOffset), m_nBitOffset(pa_nBitOffset){

-          m_pchCurrentValue = new char[pa_nDataSize];

-          for(unsigned int i = 0; i < pa_nDataSize; i++){

-            m_pchCurrentValue[i] = 0x00;

-          }

-        }

-

-        ~SEplMappingValues(){

-          delete[] m_pchCurrentValue;

-        }

-

-      private:

-        SEplMappingValues(const SEplMappingValues &obj);

-        SEplMappingValues& operator=(const SEplMappingValues &obj);

-    };

-

-    typedef CSinglyLinkedList<SEplMappingValues*> TEplMappingList;

-    TEplMappingList m_lCurrentValues;

-

-    ~SEplMapping(){

-      while(!m_lCurrentValues.isEmpty()){

-        delete *(TEplMappingList::Iterator) m_lCurrentValues.begin();

-        m_lCurrentValues.popFront();

-      }

-    }

-};

-

-// CEplStackWrapper implemented as class

-// cppcheck-suppress noConstructor

-class CEplStackWrapper{

-  DECLARE_SINGLETON(CEplStackWrapper)

-    ;

-  public:

-    /*! \brief Blocking of real-time signals

-     *

-     *  This must be called in main.cpp before the event execution thread is started

-     */

-    static void eplMainInit();

-

-    int eplStackInit(char* pa_chXmlFile, char* pa_chCdcFile, char* pa_chEthDeviceName);

-

-    int eplStackShutdown(void);

-

-    CProcessImageMatrix* getProcessImageMatrixIn();

-    CProcessImageMatrix* getProcessImageMatrixOut();

-

-    char* getProcImageIn();

-    char* getProcImageOut();

-

-    void waitUntilOperational(bool pa_bWait);

-

-    void registerCallback(IEplCNCallback* pa_pCallback);

-

-    void executeAllCallbacks();

-

-  private:

-    char* allocProcImage(unsigned int n_bytes);

-

-    bool findMAC(const char* pa_pchUserMAC, char* pa_pchDevieName);

-

-    bool compareMACs(const char* pa_chMACa, const char* pa_chMACb);

-

-    CProcessImageMatrix m_oProcMatrixIn;

-    CProcessImageMatrix m_oProcMatrixOut;

-

-    unsigned int m_nProcInSize;

-    char* m_pchAppProcessImageIn_g;

-    unsigned int m_nProcOutSize;

-    char* m_pchAppProcessImageOut_g;

-

-    bool m_bWait;

-

-    CSinglyLinkedList<IEplCNCallback*> m_lCallbackList;

-

-    CSyncObject m_oSync;

-

-};

-

-#endif

diff --git a/src/modules/powerlink/EplXmlReader.cpp b/src/modules/powerlink/EplXmlReader.cpp
deleted file mode 100644
index fc46fe3..0000000
--- a/src/modules/powerlink/EplXmlReader.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 - 2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "EplXmlReader.h"

-

-#include <string_utils.h>

-#include <cstdlib>

-#include <iostream>

-#include <fstream>

-#include <string.h>

-using namespace std;

-

-#include <tinyxml.h>

-

-CEplXmlReader::CEplXmlReader(CProcessImageMatrix* pa_pIn, CProcessImageMatrix* pa_pOut){

-  m_pProcImageIn = pa_pIn;

-  m_pProcImageOut = pa_pOut;

-}

-

-CEplXmlReader::~CEplXmlReader(){

-

-}

-

-void CEplXmlReader::setProcessImageIn(CProcessImageMatrix* pa_pIn){

-  m_pProcImageIn = pa_pIn;

-}

-

-void CEplXmlReader::setProcessImageOut(CProcessImageMatrix* pa_pOut){

-  m_pProcImageOut = pa_pOut;

-}

-

-void CEplXmlReader::readXmlFile(const char* pa_pchFileName){

-

-  TiXmlDocument xmlDoc(pa_pchFileName);

-

-  if(xmlDoc.LoadFile()){

-    TiXmlNode *appProcess = xmlDoc.FirstChild("ApplicationProcess");

-    TiXmlNode *processImageIn;

-    for(TiXmlNode *processImage = appProcess->ToElement()->FirstChild("ProcessImage"); processImage != NULL; processImage = processImage->NextSibling("ProcessImage")){

-      if(strcmp(processImage->ToElement()->Attribute("type"), "output") == 0){

-        createProcImageOut(processImage);

-      }

-      else if(strcmp(processImage->ToElement()->Attribute("type"), "input") == 0){

-        processImageIn = processImage;

-      }

-    }

-    createProcImageIn(processImageIn);

-  }

-  else{

-    cout << "ERROR: Could not open XML file" << endl;

-  }

-}

-

-void CEplXmlReader::createProcImageOut(TiXmlNode* pa_pProcessImage){

-  int currentCnId = -1;

-  int currentModuleNr = -1;

-  char currentModuleId[256];

-  int currentIoNr = -1;

-

-  TiXmlNode *channel;

-  for(channel = pa_pProcessImage->FirstChild("Channel"); channel != NULL; channel = channel->NextSibling("Channel")){

-    // New IO

-    currentIoNr++;

-

-    // Get "Name" attribute

-    const char *ioName = channel->ToElement()->Attribute("Name");

-    char *nameStr = new char[strlen(ioName) + 1];

-    strcpy(nameStr, ioName);

-

-    // Get CN ID

-    char* pch = strtok(nameStr, ".CN");

-    int cnId = forte::core::util::strtol(pch,0,10);

-

-    // Get module ID

-    char* modId = strtok(NULL, ".");

-

-    // Get dataSize

-    const char *temp = channel->ToElement()->Attribute("dataSize");

-    int dSize = forte::core::util::strtoul(temp,0,10);

-

-    // Get PIOffset

-    temp = channel->ToElement()->Attribute("PIOffset");

-    long piOffset = forte::core::util::strtol(temp, NULL, 16);

-

-    // Get BitOffset

-    long bitOffset = 0;

-    temp = channel->ToElement()->Attribute("BitOffset");

-    if(temp != NULL){

-      bitOffset = forte::core::util::strtol(temp, NULL, 16);

-    }

-

-    // Check CN id, module number and add new IO

-    if(cnId != currentCnId){ // New CN

-      currentCnId = cnId;

-      currentModuleNr = 0;

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListOut.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageOut->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else if(m_oModuleListOut.moduleNameExist(ioName)){ // IO name exist => this must be a new module with same brand as another

-      currentModuleNr++;

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListOut.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageOut->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else if(strcmp(modId, currentModuleId) == 0){ // same module ID as IO before => must be same module

-

-      m_pProcImageOut->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else{ // new module ID => new module

-      currentModuleNr++;

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListOut.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageOut->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-

-    cout << "<< " << currentCnId << ", " << currentModuleNr << ", " << ioName << ", " << currentIoNr << ", " << dSize << ", " << piOffset << ", " << bitOffset << endl;

-

-    delete[] nameStr;

-  }

-}

-

-void CEplXmlReader::createProcImageIn(TiXmlNode *pa_pProcessImage){

-  int currentCnId = -1;

-  int currentModuleNr = -1;

-  char currentModuleId[256];

-  int currentIoNr = -1;

-

-  TiXmlNode *channel;

-  for(channel = pa_pProcessImage->FirstChild("Channel"); channel != NULL; channel = channel->NextSibling("Channel")){

-    // New IO

-    currentIoNr++;

-

-    // Get "Name" attribute

-    const char *ioName = channel->ToElement()->Attribute("Name");

-    char *nameStr = new char[strlen(ioName) + 1];

-    strcpy(nameStr, ioName);

-

-    // Get CN ID

-    char* pch = strtok(nameStr, ".CN");

-    int cnId = forte::core::util::strtoul(pch,0,10);

-

-    // Get module ID

-    char* modId = strtok(NULL, ".");

-

-    // Get dataSize

-    const char *temp = channel->ToElement()->Attribute("dataSize");

-    int dSize = forte::core::util::strtoul(temp,0,10);

-

-    // Get PIOffset

-    temp = channel->ToElement()->Attribute("PIOffset");

-    long piOffset = forte::core::util::strtol(temp, NULL, 16);

-

-    // Get BitOffset

-    long bitOffset = 0;

-    temp = channel->ToElement()->Attribute("BitOffset");

-    if(temp != NULL){

-      bitOffset = forte::core::util::strtol(temp, NULL, 16);

-    }

-

-    // Check CN id, module number and add new IO

-    if(cnId != currentCnId){ // New CN

-      currentCnId = cnId;

-

-      currentModuleNr = getModuleNr(ioName);

-

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListIn.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageIn->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else if(m_oModuleListIn.moduleNameExist(ioName)){ // IO name exist => this must be a new module with same brand as another

-

-      currentModuleNr = getModuleNr(ioName);

-

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListIn.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageIn->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else if(strcmp(modId, currentModuleId) == 0){ // same module ID as IO before => must be same module

-

-      m_pProcImageIn->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-    else{ // new module ID => new module

-

-      currentModuleNr = getModuleNr(ioName);

-

-      strcpy(currentModuleId, modId);

-      currentIoNr = 0;

-

-      m_oModuleListIn.addEntry(ioName, piOffset, bitOffset, currentModuleNr);

-      m_pProcImageIn->addEntry(cnId, currentModuleNr, currentIoNr, dSize, piOffset, bitOffset);

-

-    }

-

-    cout << ">> " << currentCnId << ", " << currentModuleNr << ", " << ioName << ", " << currentIoNr << ", " << dSize << ", " << piOffset << ", " << bitOffset << endl;

-

-    delete[] nameStr;

-  }

-}

-

-int CEplXmlReader::getModuleNr(const char* pa_pchIoId){

-  char localCopy[256];

-  strcpy(localCopy, pa_pchIoId);

-

-  char dest[256];

-  char* pch = strtok(localCopy, ".");

-  strcpy(dest, pch);

-  strcat(dest, ".");

-  pch = strtok(NULL, ".");

-  strcat(dest, pch);

-

-  int occurences = m_oModuleListIn.getNrOfModules(dest);

-  int modNr = m_oModuleListOut.getModuleNr(dest, occurences + 1);

-  if(modNr == -1) {

-    cout << "ShouldNotHappenError" << endl;

-  }

-

-  return modNr;

-}

diff --git a/src/modules/powerlink/EplXmlReader.h b/src/modules/powerlink/EplXmlReader.h
deleted file mode 100644
index 12cedfb..0000000
--- a/src/modules/powerlink/EplXmlReader.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, ACIN

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _EPLXMLREADER_H_

-#define _EPLXMLREADER_H_

-

-#include "ProcessImageMatrix.h"

-#include "ModuleList.h"

-

-class TiXmlNode;

-

-class CEplXmlReader{

-  public:

-    CEplXmlReader(CProcessImageMatrix* pa_pIn, CProcessImageMatrix* pa_pOut);

-    ~CEplXmlReader();

-

-    void setProcessImageIn(CProcessImageMatrix* pa_pIn);

-    void setProcessImageOut(CProcessImageMatrix* pa_pOut);

-

-    void readXmlFile(const char* pa_pchFileName);

-

-    int getProcessImageIn();

-

-  private:

-    CModuleList m_oModuleListOut;

-    CModuleList m_oModuleListIn;

-    CProcessImageMatrix* m_pProcImageOut;

-    CProcessImageMatrix* m_pProcImageIn;

-

-    void createProcImageOut(TiXmlNode* pa_pProcessImage);

-    void createProcImageIn(TiXmlNode* pa_pProcessImage);

-

-    int getModuleNr(const char* pa_pchIoId);

-

-};

-

-#endif

diff --git a/src/modules/powerlink/ModuleList.cpp b/src/modules/powerlink/ModuleList.cpp
deleted file mode 100644
index bf56a2f..0000000
--- a/src/modules/powerlink/ModuleList.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2014 AIT, ACIN, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "ModuleList.h"

-#include <cstring>

-

-CModuleList::IoModule::IoModule(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset, unsigned int pa_nModuleNr) :

-    m_nPiOffset(pa_nPiOffset), m_nBitOffset(pa_nBitOffset), m_nModuleNr(pa_nModuleNr){

-

-  m_pchName = new char[strlen(pa_pchName) + 1];

-  strcpy(m_pchName, pa_pchName);

-}

-

-CModuleList::IoModule::~IoModule(){

-  delete[] m_pchName;

-}

-

-CModuleList::CModuleList() :

-    m_nNumberOfModules(0){

-

-}

-

-CModuleList::~CModuleList(){

-  // Delete modules in list

-  m_lModules.clearAll();

-

-}

-

-void CModuleList::addEntry(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset, unsigned int pa_nModuleNr){

-  m_lModules.pushBack(new IoModule(pa_pchName, pa_nPiOffset, pa_nBitOffset, pa_nModuleNr));

-

-  m_nNumberOfModules++;

-}

-

-int CModuleList::getModuleNr(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset){

-

-  TModuleList::Iterator itEnd(m_lModules.end());

-  for(TModuleList::Iterator it(m_lModules.begin()); it != itEnd; ++it){

-    if(strcmp(it->m_pchName, pa_pchName) == 0 && it->m_nPiOffset == pa_nPiOffset && it->m_nBitOffset == pa_nBitOffset){

-      return it->m_nModuleNr;

-    }

-  }

-

-  return -1;

-}

-

-int CModuleList::getModuleNr(const char* pa_pchName, unsigned int pa_nOccurence){

-  unsigned int nrOcc = 0;

-

-  TModuleList::Iterator itEnd(m_lModules.end());

-  for(TModuleList::Iterator it(m_lModules.begin()); it != itEnd; ++it){

-    char* pch = strstr(it->m_pchName, pa_pchName);

-    if(pch != NULL){

-      nrOcc++;

-      if(nrOcc == pa_nOccurence){

-        return it->m_nModuleNr;

-      }

-    }

-  }

-

-  return -1;

-}

-

-int CModuleList::getNrOfModules(const char* pa_pchName){

-  int nrMods = 0;

-

-  TModuleList::Iterator itEnd(m_lModules.end());

-  for(TModuleList::Iterator it(m_lModules.begin()); it != itEnd; ++it){

-    char* pch = strstr(it->m_pchName, pa_pchName);

-    if(pch != NULL){

-      nrMods++;

-    }

-  }

-

-  return nrMods;

-}

-

-bool CModuleList::moduleNameExist(const char* pa_pchName){

-

-  TModuleList::Iterator itEnd(m_lModules.end());

-  for(TModuleList::Iterator it(m_lModules.begin()); it != itEnd; ++it){

-    if(strcmp(it->m_pchName, pa_pchName) == 0){

-      return true;

-    }

-  }

-

-  return false;

-}

diff --git a/src/modules/powerlink/ModuleList.h b/src/modules/powerlink/ModuleList.h
deleted file mode 100644
index 69220fb..0000000
--- a/src/modules/powerlink/ModuleList.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, ACIN

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _MODULELIST_H_

-#define _MODULELIST_H_

-

-#include <fortelist.h>

-

-class CModuleList{

-  public:

-    CModuleList();

-    ~CModuleList();

-

-    void addEntry(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset, unsigned int pa_nModuleNr);

-

-    int getModuleNr(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset);

-

-    int getModuleNr(const char* pa_pchName, unsigned int pa_nOccurence);

-

-    int getNrOfModules(const char* pa_pchName);

-

-    bool moduleNameExist(const char* pa_pchName);

-

-  private:

-    class IoModule{

-      public:

-        IoModule(const char* pa_pchName, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset, unsigned int pa_nModuleNr);

-        ~IoModule();

-

-        char* m_pchName;

-        unsigned int m_nPiOffset;

-        unsigned int m_nBitOffset;

-

-        unsigned int m_nModuleNr;

-

-      private:

-        IoModule(const IoModule& obj);

-        IoModule& operator=(const IoModule& obj);

-    };

-

-    //std::vector<IoModule*> m_lModules;

-

-    typedef CSinglyLinkedList<IoModule*> TModuleList;

-    TModuleList m_lModules;

-

-    unsigned int m_nNumberOfModules;

-};

-

-#endif

diff --git a/src/modules/powerlink/POWERLINK_MN.cpp b/src/modules/powerlink/POWERLINK_MN.cpp
deleted file mode 100644
index b59997f..0000000
--- a/src/modules/powerlink/POWERLINK_MN.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "POWERLINK_MN.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "POWERLINK_MN_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include <cstdio>

-

-DEFINE_FIRMWARE_FB(FORTE_POWERLINK_MN, g_nStringIdPOWERLINK_MN)

-

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCDC_CFG, g_nStringIdAPP_CFG, g_nStringIdDEV_NAME };

-

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdSTRING };

-

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdSTATUS };

-

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING };

-

-const TForteInt16 FORTE_POWERLINK_MN::scm_anEIWithIndexes[] = { 0 };

-const TDataIOID FORTE_POWERLINK_MN::scm_anEIWith[] = { 0, 1, 2, 3, 255 };

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anEventInputNames[] = { g_nStringIdINIT };

-

-const TDataIOID FORTE_POWERLINK_MN::scm_anEOWith[] = { 0, 1, 255 };

-const TForteInt16 FORTE_POWERLINK_MN::scm_anEOWithIndexes[] = { 0, -1 };

-const CStringDictionary::TStringId FORTE_POWERLINK_MN::scm_anEventOutputNames[] = { g_nStringIdINITO };

-

-const SFBInterfaceSpec FORTE_POWERLINK_MN::scm_stFBInterfaceSpec = { 1, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 1, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 4, scm_anDataInputNames, scm_anDataInputTypeIds, 2, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-FORTE_POWERLINK_MN::~FORTE_POWERLINK_MN(){

-  shutdownStack();

-}

-

-void FORTE_POWERLINK_MN::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-

-      if(QI() == true){

-        QO() = QI();

-

-        CEplStackWrapper* eplStack = &CEplStackWrapper::getInstance();

-

-        eplStack->waitUntilOperational(false);

-        eplStack->eplStackInit(APP_CFG().getValue(), CDC_CFG().getValue(), DEV_NAME().getValue());

-

-        //TODO check if error occured during initialization

-

-      }

-      else if(QI() == false){

-        QO() = QI();

-        shutdownStack();

-      }

-

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-  }

-}

-

-void FORTE_POWERLINK_MN::shutdownStack(){

-  CEplStackWrapper::getInstance().eplStackShutdown();

-}

-

diff --git a/src/modules/powerlink/POWERLINK_MN.h b/src/modules/powerlink/POWERLINK_MN.h
deleted file mode 100644
index 3c9a361..0000000
--- a/src/modules/powerlink/POWERLINK_MN.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _POWERLINK_MN_H_

-#define _POWERLINK_MN_H_

-

-#include <funcbloc.h>

-

-class FORTE_POWERLINK_MN : public CFunctionBlock{

-  DECLARE_FIRMWARE_FB(FORTE_POWERLINK_MN)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_STRING &CDC_CFG(){

-      return *static_cast<CIEC_STRING*>(getDI(1));

-    }

-    ;

-

-    CIEC_STRING &APP_CFG(){

-      return *static_cast<CIEC_STRING*>(getDI(2));

-    }

-    ;

-

-    CIEC_STRING &DEV_NAME(){

-      return *static_cast<CIEC_STRING*>(getDI(3));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(1));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(1, 4, 2, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    void shutdownStack();

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_POWERLINK_MN){

-  };

-

-  virtual ~FORTE_POWERLINK_MN();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/powerlink/ProcessImageMatrix.cpp b/src/modules/powerlink/ProcessImageMatrix.cpp
deleted file mode 100644
index 2074b60..0000000
--- a/src/modules/powerlink/ProcessImageMatrix.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "ProcessImageMatrix.h"

-

-CProcessImageMatrix::CProcessImageMatrix(){

-

-  m_nBitSize = 0;

-  m_nNumberOfEntries = 0;

-

-}

-

-CProcessImageMatrix::~CProcessImageMatrix(){

-  clearAll();

-}

-

-void CProcessImageMatrix::addEntry(unsigned int pa_nCN, unsigned int pa_nModule, unsigned int pa_nIoId, unsigned int pa_nDataSize, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset){

-

-  m_lMatrix.pushBack(new SChannelEntry(pa_nCN, pa_nModule, pa_nIoId, pa_nDataSize, pa_nPiOffset, pa_nBitOffset));

-

-  // Check if 8, 16, 32 bit aligned

-  if((pa_nDataSize % 32 == 0) || (pa_nDataSize % 16 == 0) || (pa_nDataSize % 8 == 0)){

-    if(m_nBitSize % pa_nDataSize != 0){

-      unsigned long fillBits = pa_nDataSize - (m_nBitSize % pa_nDataSize);

-      m_nBitSize += fillBits;

-    }

-  }

-  m_nBitSize += pa_nDataSize;

-

-  m_nNumberOfEntries++;

-}

-

-// getEntry: Returns an array with [dataSize, PIOffset, BitOffset]

-unsigned int* CProcessImageMatrix::getEntry(unsigned int pa_nCN, unsigned int pa_nModule, unsigned int pa_nIoId){

-  static unsigned int data[3] = { 0, 0, 0 };

-

-  TChannelList::Iterator itEnd = m_lMatrix.end();

-  for(TChannelList::Iterator it = m_lMatrix.begin(); it != itEnd; ++it){

-    if(it->m_nCN == pa_nCN && it->m_nModuleId == pa_nModule && it->m_nIOid == pa_nIoId){

-      data[0] = it->m_nDataSize;

-      data[1] = it->m_nPIOffset;

-      data[2] = it->m_nBitOffset;

-      return data;

-    }

-  }

-

-  return NULL;

-}

-

-// getEntry: same as above but returns the values on row "index"

-unsigned int* CProcessImageMatrix::getEntry(unsigned int pa_nIndex){

-  if(pa_nIndex < m_nNumberOfEntries){

-    static unsigned int data[3] = { 0, 0, 0 };

-    TChannelList::Iterator it = m_lMatrix.begin();

-    for(unsigned int i = 0; i < pa_nIndex; i++){

-      ++it;

-    }

-    data[0] = it->m_nDataSize;

-    data[1] = it->m_nPIOffset;

-    data[2] = it->m_nBitOffset;

-    return data;

-  }

-

-  return NULL;

-}

-

-unsigned int CProcessImageMatrix::getNrOfEntries() const {

-  return m_nNumberOfEntries;

-}

-

-CProcessImageMatrix* CProcessImageMatrix::getModuleEntries(unsigned int pa_nCN, unsigned int pa_nModule){

-  CProcessImageMatrix* newMatrix = NULL;

-

-  TChannelList::Iterator itEnd = m_lMatrix.end();

-  for(TChannelList::Iterator it(m_lMatrix.begin()); it != itEnd; ++it){

-    if(it->m_nCN == pa_nCN && it->m_nModuleId == pa_nModule){

-      if(newMatrix == NULL) {

-        newMatrix = new CProcessImageMatrix();

-      }

-

-      newMatrix->addEntry(it->m_nCN, it->m_nModuleId, it->m_nIOid, it->m_nDataSize, it->m_nPIOffset, it->m_nBitOffset);

-    }

-  }

-

-  return newMatrix;

-}

-

-unsigned long CProcessImageMatrix::getProcessImageSize() const {

-  // Check if the whole matrix is 32 bit aligned

-  if(m_nBitSize % 32 != 0){

-    int fillBits = 32 - (m_nBitSize % 32);

-    return (unsigned long) (m_nBitSize + fillBits) / 8;

-  }

-  return (unsigned long) m_nBitSize / 8;

-}

-

-void CProcessImageMatrix::clearAll(){

-  while(!m_lMatrix.isEmpty()){

-    delete *(TChannelList::Iterator) m_lMatrix.begin();

-    m_lMatrix.popFront();

-  }

-}

diff --git a/src/modules/powerlink/ProcessImageMatrix.h b/src/modules/powerlink/ProcessImageMatrix.h
deleted file mode 100644
index 87704bf..0000000
--- a/src/modules/powerlink/ProcessImageMatrix.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT, fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Alois Zoitl - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _PROCIMAGEMATRIX_H_

-#define _PROCIMAGEMATRIX_H_

-

-//#include <vector>

-#include <fortelist.h>

-

-class CProcessImageMatrix{

-  public:

-    CProcessImageMatrix();

-    ~CProcessImageMatrix();

-

-    void addEntry(unsigned int pa_nCN, unsigned int pa_nModule, unsigned int pa_nIoId, unsigned int pa_nDataSize, unsigned int pa_nPiOffset, unsigned int pa_nBitOffset);

-

-    // getEntry: Returns an array with [dataSize, PIOffset, BitOffset]

-    unsigned int* getEntry(unsigned int pa_nCN, unsigned int pa_nModule, unsigned int pa_nIoId);

-    unsigned int* getEntry(unsigned int pa_nIndex);

-

-    unsigned int getNrOfEntries() const;

-

-    //ProcessImageMatrix* is owned by caller

-    CProcessImageMatrix* getModuleEntries(unsigned int pa_nCN, unsigned int pa_nModule);

-

-    unsigned long getProcessImageSize() const ;

-

-    void clearAll();

-

-  private:

-    struct SChannelEntry{

-        unsigned int m_nCN;

-        unsigned int m_nModuleId;

-        unsigned int m_nIOid;

-        unsigned int m_nDataSize;

-        unsigned int m_nPIOffset;

-        unsigned int m_nBitOffset;

-

-        SChannelEntry(unsigned int pa_nCN, unsigned int pa_nModuleId, unsigned int pa_nIOid, unsigned int pa_nDataSize, unsigned int pa_nPIOffset, unsigned int pa_nBitOffset) :

-            m_nCN(pa_nCN), m_nModuleId(pa_nModuleId), m_nIOid(pa_nIOid), m_nDataSize(pa_nDataSize), m_nPIOffset(pa_nPIOffset), m_nBitOffset(pa_nBitOffset){

-        }

-        ;

-

-    };

-

-    typedef CSinglyLinkedList<SChannelEntry*> TChannelList;

-    TChannelList m_lMatrix;

-

-    unsigned long m_nBitSize;

-

-    unsigned int m_nNumberOfEntries;

-};

-

-#endif

diff --git a/src/modules/powerlink/X20AI4622.cpp b/src/modules/powerlink/X20AI4622.cpp
deleted file mode 100644
index cf5538e..0000000
--- a/src/modules/powerlink/X20AI4622.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren, Thomas Strasser - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20AI4622.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20AI4622_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20AI4622, g_nStringIdX20AI4622)

-

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdAI01, g_nStringIdAI02, g_nStringIdAI03, g_nStringIdAI04 };

-

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdINT, g_nStringIdINT, g_nStringIdINT, g_nStringIdINT };

-

-const TForteInt16 FORTE_X20AI4622::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20AI4622::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20AI4622::scm_anEOWith[] = { 0, 1, 2, 255, 2, 3, 4, 5, 6, 0, 255 };

-const TForteInt16 FORTE_X20AI4622::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20AI4622::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20AI4622::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 7, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20AI4622::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for inputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          short ioVal = 0x0000;

-          ioVal = *((short*) (it->m_pchCurrentValue));

-          *static_cast<CIEC_INT*>(getDO(i)) = ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20AI4622::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(; it != itEnd; ++it){

-    short ioVal = 0x0000;

-    char lowByte;

-    char highByte;

-    lowByte = (eplStack.getProcImageOut()[it->m_nPiOffset] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    highByte = (eplStack.getProcImageOut()[it->m_nPiOffset + 1] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    ioVal = (short) ((0xFF00 & (highByte << 8))) | (short) (0xFF & lowByte);

-

-    *((short*) (it->m_pchCurrentValue)) = ioVal;

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20AI4622.h b/src/modules/powerlink/X20AI4622.h
deleted file mode 100644
index cc2bd6f..0000000
--- a/src/modules/powerlink/X20AI4622.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20AI4622_H_

-#define _X20AI4622_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20AI4622 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20AI4622)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_INT &AI01(){

-      return *static_cast<CIEC_INT*>(getDO(3));

-    }

-    ;

-

-    CIEC_INT &AI02(){

-      return *static_cast<CIEC_INT*>(getDO(4));

-    }

-    ;

-

-    CIEC_INT &AI03(){

-      return *static_cast<CIEC_INT*>(getDO(5));

-    }

-    ;

-

-    CIEC_INT &AI04(){

-      return *static_cast<CIEC_INT*>(getDO(6));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(3, 3, 7, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20AI4622){

-  };

-

-  virtual ~FORTE_X20AI4622(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/X20AO4622.cpp b/src/modules/powerlink/X20AO4622.cpp
deleted file mode 100644
index 0474df0..0000000
--- a/src/modules/powerlink/X20AO4622.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20AO4622.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20AO4622_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20AO4622, g_nStringIdX20AO4622)

-

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID, g_nStringIdAO01, g_nStringIdAO02, g_nStringIdAO03, g_nStringIdAO04 };

-

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT, g_nStringIdINT, g_nStringIdINT, g_nStringIdINT, g_nStringIdINT };

-

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS };

-

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING };

-

-const TForteInt16 FORTE_X20AO4622::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20AO4622::scm_anEIWith[] = { 0, 1, 2, 255, 3, 4, 5, 6, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20AO4622::scm_anEOWith[] = { 0, 1, 2, 255, 2, 0, 255 };

-const TForteInt16 FORTE_X20AO4622::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20AO4622::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20AO4622::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 7, scm_anDataInputNames, scm_anDataInputTypeIds, 3, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20AO4622::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixIn()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Outputs (process inputs) always start with i = 0

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 0; i < moduleIOs->getNrOfEntries(); i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDIs && it != itEnd; i++, ++it){

-          short ioVal = *static_cast<CIEC_INT*>(getDI(i));

-          *((short*) (it->m_pchCurrentValue)) = ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20AO4622::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    short ioVal = *((short*) (it->m_pchCurrentValue));

-    char highByte = (char) ((ioVal & 0xFF00) >> 8);

-    char lowByte = (char) (ioVal & 0x00FF);

-    (eplStack.getProcImageIn())[it->m_nPiOffset] &= (~(0xFF << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset] |= (lowByte << (it->m_nBitOffset));

-

-    (eplStack.getProcImageIn())[it->m_nPiOffset + 1] &= (~(0xFF << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset + 1] |= (highByte << (it->m_nBitOffset));

-  }

-

-  m_oSync.unlock();

-}

diff --git a/src/modules/powerlink/X20AO4622.h b/src/modules/powerlink/X20AO4622.h
deleted file mode 100644
index 1ae6629..0000000
--- a/src/modules/powerlink/X20AO4622.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20AO4622_H_

-#define _X20AO4622_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20AO4622 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20AO4622)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    CIEC_INT &AO01(){

-      return *static_cast<CIEC_INT*>(getDI(3));

-    }

-    ;

-

-    CIEC_INT &AO02(){

-      return *static_cast<CIEC_INT*>(getDI(4));

-    }

-    ;

-

-    CIEC_INT &AO03(){

-      return *static_cast<CIEC_INT*>(getDI(5));

-    }

-    ;

-

-    CIEC_INT &AO04(){

-      return *static_cast<CIEC_INT*>(getDI(6));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 7, 3, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20AO4622){

-  };

-

-  virtual ~FORTE_X20AO4622(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/X20AT2402.cpp b/src/modules/powerlink/X20AT2402.cpp
deleted file mode 100644
index 8fefb01..0000000
--- a/src/modules/powerlink/X20AT2402.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20AT2402.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20AT2402_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20AT2402, g_nStringIdX20AT2402)

-

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdT01, g_nStringIdT02 };

-

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdREAL, g_nStringIdREAL };

-

-const TForteInt16 FORTE_X20AT2402::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20AT2402::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20AT2402::scm_anEOWith[] = { 0, 1, 2, 255, 2, 3, 4, 0, 255 };

-const TForteInt16 FORTE_X20AT2402::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20AT2402::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20AT2402::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 5, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20AT2402::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          short ioVal = *((short*) (it->m_pchCurrentValue));

-          TForteFloat ioValFloat = static_cast<TForteFloat>(ioVal);

-          *static_cast<CIEC_REAL*>(getDO(i)) = ioValFloat / 10;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20AT2402::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    short ioVal = 0x0000;

-    char lowByte;

-    char highByte;

-    lowByte = (eplStack.getProcImageOut()[it->m_nPiOffset] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    highByte = (eplStack.getProcImageOut()[it->m_nPiOffset + 1] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    ioVal = (short) ((0xFF00 & (highByte << 8))) | (short) (0xFF & lowByte);

-

-    *((short*) (it->m_pchCurrentValue)) = ioVal;

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20AT2402.h b/src/modules/powerlink/X20AT2402.h
deleted file mode 100644
index 2bd2b74..0000000
--- a/src/modules/powerlink/X20AT2402.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20AT2402_H_

-#define _X20AT2402_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20AT2402 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20AT2402)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_REAL &T01(){

-      return *static_cast<CIEC_REAL*>(getDO(3));

-    }

-    ;

-

-    CIEC_REAL &T02(){

-      return *static_cast<CIEC_REAL*>(getDO(4));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 3, 5, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20AT2402){

-  };

-

-  virtual ~FORTE_X20AT2402(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/powerlink/X20AT4222.cpp b/src/modules/powerlink/X20AT4222.cpp
deleted file mode 100644
index 9acbba3..0000000
--- a/src/modules/powerlink/X20AT4222.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20AT4222.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20AT4222_gen.cpp"

-#endif

-

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20AT4222, g_nStringIdX20AT4222)

-

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdT01, g_nStringIdT02, g_nStringIdT03, g_nStringIdT04 };

-

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdREAL, g_nStringIdREAL, g_nStringIdREAL, g_nStringIdREAL };

-

-const TForteInt16 FORTE_X20AT4222::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20AT4222::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20AT4222::scm_anEOWith[] = { 0, 1, 2, 255, 2, 3, 4, 0, 5, 6, 255 };

-const TForteInt16 FORTE_X20AT4222::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20AT4222::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20AT4222::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 7, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20AT4222::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          short ioVal = *((short*) (it->m_pchCurrentValue));

-          TForteFloat ioValFloat = static_cast<TForteFloat>(ioVal);

-          *static_cast<CIEC_REAL*>(getDO(i)) = ioValFloat / 10;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20AT4222::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    short ioVal = 0x0000;

-    char lowByte;

-    char highByte;

-    lowByte = (eplStack.getProcImageOut()[it->m_nPiOffset] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    highByte = (eplStack.getProcImageOut()[it->m_nPiOffset + 1] & (0xFF << it->m_nBitOffset)) >> it->m_nBitOffset;

-    ioVal = (short) ((0xFF00 & (highByte << 8))) | (short) (0xFF & lowByte);

-

-    *((short*) (it->m_pchCurrentValue)) = ioVal;

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20AT4222.h b/src/modules/powerlink/X20AT4222.h
deleted file mode 100644
index b35e406..0000000
--- a/src/modules/powerlink/X20AT4222.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20AT4222_H_

-#define _X20AT4222_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20AT4222 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20AT4222)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_REAL &T01(){

-      return *static_cast<CIEC_REAL*>(getDO(3));

-    }

-    ;

-

-    CIEC_REAL &T02(){

-      return *static_cast<CIEC_REAL*>(getDO(4));

-    }

-    ;

-

-    CIEC_REAL &T03(){

-      return *static_cast<CIEC_REAL*>(getDO(5));

-    }

-    ;

-

-    CIEC_REAL &T04(){

-      return *static_cast<CIEC_REAL*>(getDO(6));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 3, 7, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20AT4222){

-  };

-

-  virtual ~FORTE_X20AT4222(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/powerlink/X20DI4653.cpp b/src/modules/powerlink/X20DI4653.cpp
deleted file mode 100644
index dfaf11f..0000000
--- a/src/modules/powerlink/X20DI4653.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DI4653.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DI4653_gen.cpp"

-#endif

-
-DEFINE_FIRMWARE_FB(FORTE_X20DI4653, g_nStringIdX20DI4653)
-

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anDataInputNames[] = {g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID};
-

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anDataInputTypeIds[] = {g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT};
-

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anDataOutputNames[] = {g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdDI01, g_nStringIdDI02, g_nStringIdDI03, g_nStringIdDI04};
-

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anDataOutputTypeIds[] = {g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL};
-

-const TForteInt16 FORTE_X20DI4653::scm_anEIWithIndexes[] = {0, 4};

-const TDataIOID FORTE_X20DI4653::scm_anEIWith[] = {0, 1, 2, 255, 0, 255};

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anEventInputNames[] = {g_nStringIdINIT, g_nStringIdREQ};
-

-const TDataIOID FORTE_X20DI4653::scm_anEOWith[] = {0, 2, 1, 255, 3, 4, 5, 6, 2, 0, 255};

-const TForteInt16 FORTE_X20DI4653::scm_anEOWithIndexes[] = {0, 4, -1};

-const CStringDictionary::TStringId FORTE_X20DI4653::scm_anEventOutputNames[] = {g_nStringIdINITO, g_nStringIdCNF};
-

-const SFBInterfaceSpec FORTE_X20DI4653::scm_stFBInterfaceSpec = {

-  2,  scm_anEventInputNames,  scm_anEIWith,  scm_anEIWithIndexes,

-  2,  scm_anEventOutputNames,  scm_anEOWith, scm_anEOWithIndexes,  3,  scm_anDataInputNames, scm_anDataInputTypeIds,

-  7,  scm_anDataOutputNames, scm_anDataOutputTypeIds,

-  0, 0
-};
-

-
-void FORTE_X20DI4653::executeEvent(int pa_nEIID){

-  switch(pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-          *static_cast<CIEC_BOOL*>(getDO(i)) = ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DI4653::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(; it != itEnd; ++it){

-    bool ioVal = (eplStack.getProcImageOut()[it->m_nPiOffset] & (char) (0x01 << it->m_nBitOffset)) != 0x00;

-    *(it->m_pchCurrentValue) = (char) ioVal;

-  }

-

-  m_oSync.unlock();

-}
-

-
-

diff --git a/src/modules/powerlink/X20DI4653.h b/src/modules/powerlink/X20DI4653.h
deleted file mode 100644
index 634bb18..0000000
--- a/src/modules/powerlink/X20DI4653.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DI4653_H_

-#define _X20DI4653_H_

-
-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-
-// cppcheck-suppress noConstructor

-class FORTE_X20DI4653: public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DI4653)

-
-private:

-  static const CStringDictionary::TStringId scm_anDataInputNames[];

-  static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &QI() {

-    return *static_cast<CIEC_BOOL*>(getDI(0));
-  };
-

-  CIEC_USINT &CNID() {

-    return *static_cast<CIEC_USINT*>(getDI(1));
-  };
-

-  CIEC_UINT &MODID() {

-    return *static_cast<CIEC_UINT*>(getDI(2));
-  };
-

-  static const CStringDictionary::TStringId scm_anDataOutputNames[];

-  static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &QO() {

-    return *static_cast<CIEC_BOOL*>(getDO(0));
-  };
-

-  CIEC_USINT &CNIDO() {

-    return *static_cast<CIEC_USINT*>(getDO(1));
-  };
-

-  CIEC_STRING &STATUS() {

-    return *static_cast<CIEC_STRING*>(getDO(2));
-  };
-

-  CIEC_BOOL &DI01() {

-    return *static_cast<CIEC_BOOL*>(getDO(3));
-  };
-

-  CIEC_BOOL &DI02() {

-    return *static_cast<CIEC_BOOL*>(getDO(4));
-  };
-

-  CIEC_BOOL &DI03() {

-    return *static_cast<CIEC_BOOL*>(getDO(5));
-  };
-

-  CIEC_BOOL &DI04() {

-    return *static_cast<CIEC_BOOL*>(getDO(6));
-  };
-

-  static const TEventID scm_nEventINITID = 0;

-  static const TEventID scm_nEventREQID = 1;

-  static const TForteInt16 scm_anEIWithIndexes[];

-  static const TDataIOID scm_anEIWith[];

-  static const CStringDictionary::TStringId scm_anEventInputNames[];
-

-  static const TEventID scm_nEventINITOID = 0;

-  static const TEventID scm_nEventCNFID = 1;

-  static const TForteInt16 scm_anEOWithIndexes[];

-  static const TDataIOID scm_anEOWith[];

-  static const CStringDictionary::TStringId scm_anEventOutputNames[];
-

-  static const SFBInterfaceSpec scm_stFBInterfaceSpec;
-

-   FORTE_FB_DATA_ARRAY(2, 3, 7, 0);

-
-  void executeEvent(int pa_nEIID);

-

-  // Variables for mapping between inputs and POWERLINK stack

-

-  SEplMapping m_oEplMapping;

-  CSyncObject m_oSync;

-  bool m_bInitOk;

-  // ...

-
-public:

-  FUNCTION_BLOCK_CTOR(FORTE_X20DI4653){
-  };
-

-  virtual ~FORTE_X20DI4653(){};

-

-  void cnSynchCallback();

-
-};
-
-#endif //close the ifdef sequence from the beginning of the file
-

diff --git a/src/modules/powerlink/X20DI9371.cpp b/src/modules/powerlink/X20DI9371.cpp
deleted file mode 100644
index 15243fc..0000000
--- a/src/modules/powerlink/X20DI9371.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DI9371.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DI9371_gen.cpp"

-#endif

-

-DEFINE_FIRMWARE_FB(FORTE_X20DI9371, g_nStringIdX20DI9371)

-

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdDI01, g_nStringIdDI02, g_nStringIdDI03, g_nStringIdDI04, g_nStringIdDI05, g_nStringIdDI06, g_nStringIdDI07, g_nStringIdDI08, g_nStringIdDI09, g_nStringIdDI10, g_nStringIdDI11, g_nStringIdDI12 };

-

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const TForteInt16 FORTE_X20DI9371::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20DI9371::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20DI9371::scm_anEOWith[] = { 0, 2, 1, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2, 0, 255 };

-const TForteInt16 FORTE_X20DI9371::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20DI9371::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20DI9371::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 15, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DI9371::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-          *static_cast<CIEC_BOOL*>(getDO(i)) = ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DI9371::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(; it != itEnd; ++it){

-    bool ioVal = (eplStack.getProcImageOut()[it->m_nPiOffset] & (char) (0x01 << it->m_nBitOffset)) != 0x00;

-    *(it->m_pchCurrentValue) = (char) ioVal;

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20DI9371.h b/src/modules/powerlink/X20DI9371.h
deleted file mode 100644
index 6ee6031..0000000
--- a/src/modules/powerlink/X20DI9371.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DI9371_H_

-#define _X20DI9371_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20DI9371 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DI9371)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_BOOL &DI01(){

-      return *static_cast<CIEC_BOOL*>(getDO(3));

-    }

-    ;

-

-    CIEC_BOOL &DI02(){

-      return *static_cast<CIEC_BOOL*>(getDO(4));

-    }

-    ;

-

-    CIEC_BOOL &DI03(){

-      return *static_cast<CIEC_BOOL*>(getDO(5));

-    }

-    ;

-

-    CIEC_BOOL &DI04(){

-      return *static_cast<CIEC_BOOL*>(getDO(6));

-    }

-    ;

-

-    CIEC_BOOL &DI05(){

-      return *static_cast<CIEC_BOOL*>(getDO(7));

-    }

-    ;

-

-    CIEC_BOOL &DI06(){

-      return *static_cast<CIEC_BOOL*>(getDO(8));

-    }

-    ;

-

-    CIEC_BOOL &DI07(){

-      return *static_cast<CIEC_BOOL*>(getDO(9));

-    }

-    ;

-

-    CIEC_BOOL &DI08(){

-      return *static_cast<CIEC_BOOL*>(getDO(10));

-    }

-    ;

-

-    CIEC_BOOL &DI09(){

-      return *static_cast<CIEC_BOOL*>(getDO(11));

-    }

-    ;

-

-    CIEC_BOOL &DI10(){

-      return *static_cast<CIEC_BOOL*>(getDO(12));

-    }

-    ;

-

-    CIEC_BOOL &DI11(){

-      return *static_cast<CIEC_BOOL*>(getDO(13));

-    }

-    ;

-

-    CIEC_BOOL &DI12(){

-      return *static_cast<CIEC_BOOL*>(getDO(14));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 3, 15, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DI9371){

-  };

-

-  virtual ~FORTE_X20DI9371(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/powerlink/X20DI9372.cpp b/src/modules/powerlink/X20DI9372.cpp
deleted file mode 100644
index b7e2f68..0000000
--- a/src/modules/powerlink/X20DI9372.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DI9372.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DI9372_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20DI9372, g_nStringIdX20DI9372)

-

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdDI01, g_nStringIdDI02, g_nStringIdDI03, g_nStringIdDI04, g_nStringIdDI05, g_nStringIdDI06, g_nStringIdDI07, g_nStringIdDI08, g_nStringIdDI09, g_nStringIdDI10, g_nStringIdDI11, g_nStringIdDI12 };

-

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const TForteInt16 FORTE_X20DI9372::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20DI9372::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20DI9372::scm_anEOWith[] = { 0, 2, 1, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2, 0, 255 };

-const TForteInt16 FORTE_X20DI9372::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20DI9372::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20DI9372::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 15, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DI9372::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for inputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Inputs (process inputs) always start with i = 1

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-          bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-          *static_cast<CIEC_BOOL*>(getDO(i)) = ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DI9372::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(; it != itEnd; ++it){

-    bool ioVal = (eplStack.getProcImageOut()[it->m_nPiOffset] & (char) (0x01 << it->m_nBitOffset)) != 0x00;

-    *(it->m_pchCurrentValue) = (char) ioVal;

-  }

-

-  m_oSync.unlock();

-}

diff --git a/src/modules/powerlink/X20DI9372.h b/src/modules/powerlink/X20DI9372.h
deleted file mode 100644
index ad3d8da..0000000
--- a/src/modules/powerlink/X20DI9372.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DI9372_H_

-#define _X20DI9372_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20DI9372 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DI9372)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_BOOL &DI01(){

-      return *static_cast<CIEC_BOOL*>(getDO(3));

-    }

-    ;

-

-    CIEC_BOOL &DI02(){

-      return *static_cast<CIEC_BOOL*>(getDO(4));

-    }

-    ;

-

-    CIEC_BOOL &DI03(){

-      return *static_cast<CIEC_BOOL*>(getDO(5));

-    }

-    ;

-

-    CIEC_BOOL &DI04(){

-      return *static_cast<CIEC_BOOL*>(getDO(6));

-    }

-    ;

-

-    CIEC_BOOL &DI05(){

-      return *static_cast<CIEC_BOOL*>(getDO(7));

-    }

-    ;

-

-    CIEC_BOOL &DI06(){

-      return *static_cast<CIEC_BOOL*>(getDO(8));

-    }

-    ;

-

-    CIEC_BOOL &DI07(){

-      return *static_cast<CIEC_BOOL*>(getDO(9));

-    }

-    ;

-

-    CIEC_BOOL &DI08(){

-      return *static_cast<CIEC_BOOL*>(getDO(10));

-    }

-    ;

-

-    CIEC_BOOL &DI09(){

-      return *static_cast<CIEC_BOOL*>(getDO(11));

-    }

-    ;

-

-    CIEC_BOOL &DI10(){

-      return *static_cast<CIEC_BOOL*>(getDO(12));

-    }

-    ;

-

-    CIEC_BOOL &DI11(){

-      return *static_cast<CIEC_BOOL*>(getDO(13));

-    }

-    ;

-

-    CIEC_BOOL &DI12(){

-      return *static_cast<CIEC_BOOL*>(getDO(14));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 3, 15, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DI9372){

-  };

-

-  virtual ~FORTE_X20DI9372(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/X20DI937X.cpp b/src/modules/powerlink/X20DI937X.cpp
deleted file mode 100644
index 6391410..0000000
--- a/src/modules/powerlink/X20DI937X.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DI937X.h"

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20DI937X, g_nStringIdX20DI937X)

-

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID };

-

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT };

-

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS, g_nStringIdDI01, g_nStringIdDI02, g_nStringIdDI03, g_nStringIdDI04, g_nStringIdDI05, g_nStringIdDI06, g_nStringIdDI07, g_nStringIdDI08, g_nStringIdDI09, g_nStringIdDI10, g_nStringIdDI11, g_nStringIdDI12 };

-

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const TForteInt16 FORTE_X20DI937X::scm_anEIWithIndexes[] = { 0, -1, -1 };

-const TDataIOID FORTE_X20DI937X::scm_anEIWith[] = { 0, 1, 2, 255 };

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ, g_nStringIdRSP };

-

-const TDataIOID FORTE_X20DI937X::scm_anEOWith[] = { 0, 2, 1, 255, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2, 255 };

-const TForteInt16 FORTE_X20DI937X::scm_anEOWithIndexes[] = { 0, 4, 18, -1 };

-const CStringDictionary::TStringId FORTE_X20DI937X::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF, g_nStringIdIND };

-

-const SFBInterfaceSpec FORTE_X20DI937X::scm_stFBInterfaceSpec = { 3, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 3, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 15, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DI937X::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID: {

-      //#error add code for INIT event!

-

-      EplStackWrapper &eplStack = EplStackWrapper::getInstance();

-

-      // Get settings for intputs

-      ProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixOut()->getModuleEntries(CNID(), MODID());

-

-      // Inputs (process inputs) always start with i = 1

-      // Check xap.xml if a BitUnused is present

-      for(unsigned int i = 1; i < moduleIOs->getNrOfEntries() - 1; i++){

-        m_oEplMapping.m_anDataSizes[i] = moduleIOs->getEntry(i)[0];

-        m_oEplMapping.m_anPiOffsets[i] = moduleIOs->getEntry(i)[1];

-        m_oEplMapping.m_anBitOffsets[i] = moduleIOs->getEntry(i)[2];

-

-        char* newVal = new char[m_oEplMapping.m_anDataSizes[i]]();

-        m_oEplMapping.m_lCurrentValues.pushBack(newVal);

-      }

-

-      delete moduleIOs;

-

-      eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    }

-    case scm_nEventREQID: {

-      m_oSync.lock();

-      CSinglyLinkedList<char*>::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-      CSinglyLinkedList<char*>::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-      for(int i = 3; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, ++it){

-        bool ioVal = (bool) **it;

-        *static_cast<CIEC_BOOL*>(getDO(i)) = ioVal;

-      }

-      m_oSync.unlock();

-

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-    }

-    case scm_nEventRSPID:

-      break;

-  }

-}

-

-void FORTE_X20DI937X::cnSynchCallback(){

-  EplStackWrapper &eplStack = EplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  CSinglyLinkedList<char*>::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  CSinglyLinkedList<char*>::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(int i = 3, j = 1; i < m_pstInterfaceSpec->m_nNumDOs && it != itEnd; i++, j++, ++it){

-    bool ioVal = (bool) (eplStack.getProcImageOut()[m_oEplMapping.m_anPiOffsets[j]] & (char) (0x01 << m_oEplMapping.m_anBitOffsets[j]));

-    **it = (char) ioVal;

-  }

-

-  m_oSync.unlock();

-}

diff --git a/src/modules/powerlink/X20DI937X.h b/src/modules/powerlink/X20DI937X.h
deleted file mode 100644
index 0ac6e3a..0000000
--- a/src/modules/powerlink/X20DI937X.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DI937X_H_

-#define _X20DI937X_H_

-

-#include <funcbloc.h>

-

-#include <fortelist.h>

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-class FORTE_X20DI937X : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DI937X)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    CIEC_BOOL &DI01(){

-      return *static_cast<CIEC_BOOL*>(getDO(3));

-    }

-    ;

-

-    CIEC_BOOL &DI02(){

-      return *static_cast<CIEC_BOOL*>(getDO(4));

-    }

-    ;

-

-    CIEC_BOOL &DI03(){

-      return *static_cast<CIEC_BOOL*>(getDO(5));

-    }

-    ;

-

-    CIEC_BOOL &DI04(){

-      return *static_cast<CIEC_BOOL*>(getDO(6));

-    }

-    ;

-

-    CIEC_BOOL &DI05(){

-      return *static_cast<CIEC_BOOL*>(getDO(7));

-    }

-    ;

-

-    CIEC_BOOL &DI06(){

-      return *static_cast<CIEC_BOOL*>(getDO(8));

-    }

-    ;

-

-    CIEC_BOOL &DI07(){

-      return *static_cast<CIEC_BOOL*>(getDO(9));

-    }

-    ;

-

-    CIEC_BOOL &DI08(){

-      return *static_cast<CIEC_BOOL*>(getDO(10));

-    }

-    ;

-

-    CIEC_BOOL &DI09(){

-      return *static_cast<CIEC_BOOL*>(getDO(11));

-    }

-    ;

-

-    CIEC_BOOL &DI10(){

-      return *static_cast<CIEC_BOOL*>(getDO(12));

-    }

-    ;

-

-    CIEC_BOOL &DI11(){

-      return *static_cast<CIEC_BOOL*>(getDO(13));

-    }

-    ;

-

-    CIEC_BOOL &DI12(){

-      return *static_cast<CIEC_BOOL*>(getDO(14));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TEventID scm_nEventRSPID = 2;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TEventID scm_nEventINDID = 2;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(3, 3, 15, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DI937X){

-  };

-

-  virtual ~FORTE_X20DI937X(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/X20DO4623.cpp b/src/modules/powerlink/X20DO4623.cpp
deleted file mode 100644
index f9f9073..0000000
--- a/src/modules/powerlink/X20DO4623.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DO4623.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DO4623_gen.cpp"

-#endif

-
-DEFINE_FIRMWARE_FB(FORTE_X20DO4623, g_nStringIdX20DO4623)
-

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anDataInputNames[] = {g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID, g_nStringIdDO01, g_nStringIdDO02, g_nStringIdDO03, g_nStringIdDO04};
-

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anDataInputTypeIds[] = {g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL};
-

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anDataOutputNames[] = {g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS};
-

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anDataOutputTypeIds[] = {g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING};
-

-const TForteInt16 FORTE_X20DO4623::scm_anEIWithIndexes[] = {0, 4};

-const TDataIOID FORTE_X20DO4623::scm_anEIWith[] = {0, 1, 2, 255, 3, 4, 5, 6, 0, 255};

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anEventInputNames[] = {g_nStringIdINIT, g_nStringIdREQ};
-

-const TDataIOID FORTE_X20DO4623::scm_anEOWith[] = {0, 2, 1, 255, 2, 0, 255};

-const TForteInt16 FORTE_X20DO4623::scm_anEOWithIndexes[] = {0, 4, -1};

-const CStringDictionary::TStringId FORTE_X20DO4623::scm_anEventOutputNames[] = {g_nStringIdINITO, g_nStringIdCNF};
-

-const SFBInterfaceSpec FORTE_X20DO4623::scm_stFBInterfaceSpec = {

-  2,  scm_anEventInputNames,  scm_anEIWith,  scm_anEIWithIndexes,

-  2,  scm_anEventOutputNames,  scm_anEOWith, scm_anEOWithIndexes,  7,  scm_anDataInputNames, scm_anDataInputTypeIds,

-  3,  scm_anDataOutputNames, scm_anDataOutputTypeIds,

-  0, 0
-};
-

-
-void FORTE_X20DO4623::executeEvent(int pa_nEIID){

-  switch(pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixIn()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Outputs (process inputs) always start with i = 0

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 0; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDIs && it != itEnd; i++, ++it){

-          bool ioVal = *static_cast<CIEC_BOOL*>(getDI(i));

-          *(it->m_pchCurrentValue) = (char) ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DO4623::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-    (eplStack.getProcImageIn())[it->m_nPiOffset] &= (char) (~(0x01 << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset] |= (char) (ioVal << it->m_nBitOffset);

-  }

-

-  m_oSync.unlock();

-}
-

-
-

diff --git a/src/modules/powerlink/X20DO4623.h b/src/modules/powerlink/X20DO4623.h
deleted file mode 100644
index af4cfd1..0000000
--- a/src/modules/powerlink/X20DO4623.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DO4623_H_

-#define _X20DO4623_H_

-
-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-
-// cppcheck-suppress noConstructor

-class FORTE_X20DO4623: public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DO4623)

-
-private:

-  static const CStringDictionary::TStringId scm_anDataInputNames[];

-  static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-  CIEC_BOOL &QI() {

-    return *static_cast<CIEC_BOOL*>(getDI(0));
-  };
-

-  CIEC_USINT &CNID() {

-    return *static_cast<CIEC_USINT*>(getDI(1));
-  };
-

-  CIEC_UINT &MODID() {

-    return *static_cast<CIEC_UINT*>(getDI(2));
-  };
-

-  CIEC_BOOL &DO01() {

-    return *static_cast<CIEC_BOOL*>(getDI(3));
-  };
-

-  CIEC_BOOL &DO02() {

-    return *static_cast<CIEC_BOOL*>(getDI(4));
-  };
-

-  CIEC_BOOL &DO03() {

-    return *static_cast<CIEC_BOOL*>(getDI(5));
-  };
-

-  CIEC_BOOL &DO04() {

-    return *static_cast<CIEC_BOOL*>(getDI(6));
-  };
-

-  static const CStringDictionary::TStringId scm_anDataOutputNames[];

-  static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-  CIEC_BOOL &QO() {

-    return *static_cast<CIEC_BOOL*>(getDO(0));
-  };
-

-  CIEC_USINT &CNIDO() {

-    return *static_cast<CIEC_USINT*>(getDO(1));
-  };
-

-  CIEC_STRING &STATUS() {

-    return *static_cast<CIEC_STRING*>(getDO(2));
-  };
-

-  static const TEventID scm_nEventINITID = 0;

-  static const TEventID scm_nEventREQID = 1;

-  static const TForteInt16 scm_anEIWithIndexes[];

-  static const TDataIOID scm_anEIWith[];

-  static const CStringDictionary::TStringId scm_anEventInputNames[];
-

-  static const TEventID scm_nEventINITOID = 0;

-  static const TEventID scm_nEventCNFID = 1;

-  static const TForteInt16 scm_anEOWithIndexes[];

-  static const TDataIOID scm_anEOWith[];

-  static const CStringDictionary::TStringId scm_anEventOutputNames[];
-

-  static const SFBInterfaceSpec scm_stFBInterfaceSpec;
-

-  FORTE_FB_DATA_ARRAY(2, 7, 3, 0);

-
-  void executeEvent(int pa_nEIID);

-

-  // Variables for mapping between inputs and POWERLINK stack

-  SEplMapping m_oEplMapping;

-  CSyncObject m_oSync;

-  bool m_bInitOk;

-  // ...

-
-public:

-  FUNCTION_BLOCK_CTOR(FORTE_X20DO4623){
-  };
-

-  virtual ~FORTE_X20DO4623(){};

-

-  void cnSynchCallback();

-
-};
-
-#endif //close the ifdef sequence from the beginning of the file
-

diff --git a/src/modules/powerlink/X20DO4649.cpp b/src/modules/powerlink/X20DO4649.cpp
deleted file mode 100644
index 409713b..0000000
--- a/src/modules/powerlink/X20DO4649.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DO4649.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DO4649_gen.cpp"

-#endif

-

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20DO4649, g_nStringIdX20DO4649)

-

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID, g_nStringIdDO01, g_nStringIdDO02, g_nStringIdDO03, g_nStringIdDO04 };

-

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS };

-

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING };

-

-const TForteInt16 FORTE_X20DO4649::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20DO4649::scm_anEIWith[] = { 0, 1, 2, 255, 3, 4, 5, 6, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20DO4649::scm_anEOWith[] = { 0, 2, 1, 255, 2, 0, 255 };

-const TForteInt16 FORTE_X20DO4649::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20DO4649::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20DO4649::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 7, scm_anDataInputNames, scm_anDataInputTypeIds, 3, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DO4649::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixIn()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Outputs (process inputs) always start with i = 0

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 0; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDIs && it != itEnd; i++, ++it){

-          bool ioVal = *static_cast<CIEC_BOOL*>(getDI(i));

-          *(it->m_pchCurrentValue) = (char) ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DO4649::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-    (eplStack.getProcImageIn())[it->m_nPiOffset] &= (char) (~(0x01 << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset] |= (char) (ioVal << it->m_nBitOffset);

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20DO4649.h b/src/modules/powerlink/X20DO4649.h
deleted file mode 100644
index 163bddf..0000000
--- a/src/modules/powerlink/X20DO4649.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DO4649_H_

-#define _X20DO4649_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20DO4649 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DO4649)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    CIEC_BOOL &DO01(){

-      return *static_cast<CIEC_BOOL*>(getDI(3));

-    }

-    ;

-

-    CIEC_BOOL &DO02(){

-      return *static_cast<CIEC_BOOL*>(getDI(4));

-    }

-    ;

-

-    CIEC_BOOL &DO03(){

-      return *static_cast<CIEC_BOOL*>(getDI(5));

-    }

-    ;

-

-    CIEC_BOOL &DO04(){

-      return *static_cast<CIEC_BOOL*>(getDI(6));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 7, 3, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DO4649){

-  };

-

-  virtual ~FORTE_X20DO4649(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/powerlink/X20DO9321.cpp b/src/modules/powerlink/X20DO9321.cpp
deleted file mode 100644
index eaa8aa7..0000000
--- a/src/modules/powerlink/X20DO9321.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DO9321.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DO9321_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20DO9321, g_nStringIdX20DO9321)

-

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID, g_nStringIdDO01, g_nStringIdDO02, g_nStringIdDO03, g_nStringIdDO04, g_nStringIdDO05, g_nStringIdDO06, g_nStringIdDO07, g_nStringIdDO08, g_nStringIdDO09, g_nStringIdDO10, g_nStringIdDO11, g_nStringIdDO12 };

-

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS };

-

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING };

-

-const TForteInt16 FORTE_X20DO9321::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20DO9321::scm_anEIWith[] = { 0, 1, 2, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20DO9321::scm_anEOWith[] = { 0, 2, 1, 255, 2, 0, 255 };

-const TForteInt16 FORTE_X20DO9321::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20DO9321::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20DO9321::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 15, scm_anDataInputNames, scm_anDataInputTypeIds, 3, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DO9321::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for inputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixIn()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Outputs (process inputs) always start with i = 0

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 0; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDIs && it != itEnd; i++, ++it){

-          bool ioVal = *static_cast<CIEC_BOOL*>(getDI(i));

-          *(it->m_pchCurrentValue) = (char) ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DO9321::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-    (eplStack.getProcImageIn())[it->m_nPiOffset] &= (char) (~(0x01 << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset] |= (char) (ioVal << it->m_nBitOffset);

-  }

-

-  m_oSync.unlock();

-}

-

diff --git a/src/modules/powerlink/X20DO9321.h b/src/modules/powerlink/X20DO9321.h
deleted file mode 100644
index 63e4572..0000000
--- a/src/modules/powerlink/X20DO9321.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DO9321_H_

-#define _X20DO9321_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20DO9321 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DO9321)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    CIEC_BOOL &DO01(){

-      return *static_cast<CIEC_BOOL*>(getDI(3));

-    }

-    ;

-

-    CIEC_BOOL &DO02(){

-      return *static_cast<CIEC_BOOL*>(getDI(4));

-    }

-    ;

-

-    CIEC_BOOL &DO03(){

-      return *static_cast<CIEC_BOOL*>(getDI(5));

-    }

-    ;

-

-    CIEC_BOOL &DO04(){

-      return *static_cast<CIEC_BOOL*>(getDI(6));

-    }

-    ;

-

-    CIEC_BOOL &DO05(){

-      return *static_cast<CIEC_BOOL*>(getDI(7));

-    }

-    ;

-

-    CIEC_BOOL &DO06(){

-      return *static_cast<CIEC_BOOL*>(getDI(8));

-    }

-    ;

-

-    CIEC_BOOL &DO07(){

-      return *static_cast<CIEC_BOOL*>(getDI(9));

-    }

-    ;

-

-    CIEC_BOOL &DO08(){

-      return *static_cast<CIEC_BOOL*>(getDI(10));

-    }

-    ;

-

-    CIEC_BOOL &DO09(){

-      return *static_cast<CIEC_BOOL*>(getDI(11));

-    }

-    ;

-

-    CIEC_BOOL &DO10(){

-      return *static_cast<CIEC_BOOL*>(getDI(12));

-    }

-    ;

-

-    CIEC_BOOL &DO11(){

-      return *static_cast<CIEC_BOOL*>(getDI(13));

-    }

-    ;

-

-    CIEC_BOOL &DO12(){

-      return *static_cast<CIEC_BOOL*>(getDI(14));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 15, 3, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DO9321){

-  };

-

-  virtual ~FORTE_X20DO9321(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/X20DO9322.cpp b/src/modules/powerlink/X20DO9322.cpp
deleted file mode 100644
index efb5ce9..0000000
--- a/src/modules/powerlink/X20DO9322.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012, 2013 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#include "X20DO9322.h"

-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP

-#include "X20DO9322_gen.cpp"

-#endif

-

-#include "EplWrapper.h"

-#include "ProcessImageMatrix.h"

-

-DEFINE_FIRMWARE_FB(FORTE_X20DO9322, g_nStringIdX20DO9322)

-

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdCNID, g_nStringIdMODID, g_nStringIdDO01, g_nStringIdDO02, g_nStringIdDO03, g_nStringIdDO04, g_nStringIdDO05, g_nStringIdDO06, g_nStringIdDO07, g_nStringIdDO08, g_nStringIdDO09, g_nStringIdDO10, g_nStringIdDO11, g_nStringIdDO12 };

-

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdUINT, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL, g_nStringIdBOOL };

-

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdCNIDO, g_nStringIdSTATUS };

-

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdUSINT, g_nStringIdSTRING };

-

-const TForteInt16 FORTE_X20DO9322::scm_anEIWithIndexes[] = { 0, 4 };

-const TDataIOID FORTE_X20DO9322::scm_anEIWith[] = { 0, 1, 2, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 255 };

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };

-

-const TDataIOID FORTE_X20DO9322::scm_anEOWith[] = { 0, 2, 1, 255, 2, 0, 255 };

-const TForteInt16 FORTE_X20DO9322::scm_anEOWithIndexes[] = { 0, 4, -1 };

-const CStringDictionary::TStringId FORTE_X20DO9322::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };

-

-const SFBInterfaceSpec FORTE_X20DO9322::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 15, scm_anDataInputNames, scm_anDataInputTypeIds, 3, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };

-

-void FORTE_X20DO9322::executeEvent(int pa_nEIID){

-  switch (pa_nEIID){

-    case scm_nEventINITID:

-      if(QI() == true){

-        m_bInitOk = false;

-

-        CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-        // Get settings for intputs

-        CProcessImageMatrix* moduleIOs = eplStack.getProcessImageMatrixIn()->getModuleEntries(CNID(), MODID());

-

-        if(moduleIOs){

-          // Outputs (process inputs) always start with i = 0

-          // Check xap.xml if a BitUnused is present

-          for(unsigned int i = 0; i < moduleIOs->getNrOfEntries() - 1; i++){

-            m_oEplMapping.m_lCurrentValues.pushBack(new SEplMapping::SEplMappingValues(moduleIOs->getEntry(i)[0], moduleIOs->getEntry(i)[1], moduleIOs->getEntry(i)[2]));

-          }

-          delete moduleIOs;

-

-          eplStack.registerCallback(static_cast<IEplCNCallback*>(this));

-

-          m_bInitOk = true;

-        }

-      }

-      QO() = QI();

-      CNIDO() = CNID();

-      sendOutputEvent(scm_nEventINITOID);

-      break;

-    case scm_nEventREQID:

-      if(QI() == true && m_bInitOk){

-        m_oSync.lock();

-        SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-        SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-        for(int i = 3; i < m_pstInterfaceSpec->m_nNumDIs && it != itEnd; i++, ++it){

-          bool ioVal = *static_cast<CIEC_BOOL*>(getDI(i));

-          *(it->m_pchCurrentValue) = (char) ioVal;

-        }

-        m_oSync.unlock();

-      }

-      QO() = QI();

-      sendOutputEvent(scm_nEventCNFID);

-      break;

-  }

-}

-

-void FORTE_X20DO9322::cnSynchCallback(){

-  CEplStackWrapper &eplStack = CEplStackWrapper::getInstance();

-

-  m_oSync.lock();

-

-  SEplMapping::TEplMappingList::Iterator itEnd = m_oEplMapping.m_lCurrentValues.end();

-  SEplMapping::TEplMappingList::Iterator it = m_oEplMapping.m_lCurrentValues.begin();

-  for(it; it != itEnd; ++it){

-    bool ioVal = *(it->m_pchCurrentValue) != 0x00;

-    (eplStack.getProcImageIn())[it->m_nPiOffset] &= (char) (~(0x01 << it->m_nBitOffset));

-    (eplStack.getProcImageIn())[it->m_nPiOffset] |= (char) (ioVal << it->m_nBitOffset);

-  }

-

-  m_oSync.unlock();

-}

diff --git a/src/modules/powerlink/X20DO9322.h b/src/modules/powerlink/X20DO9322.h
deleted file mode 100644
index 2b2541c..0000000
--- a/src/modules/powerlink/X20DO9322.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2012 AIT

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *   Filip Andren - initial API and implementation and/or initial documentation

- *******************************************************************************/

-#ifndef _X20DO9322_H_

-#define _X20DO9322_H_

-

-#include <funcbloc.h>

-

-#include "EplCNCallback.h"

-#include "EplWrapper.h"

-

-// cppcheck-suppress noConstructor

-class FORTE_X20DO9322 : public CFunctionBlock, public IEplCNCallback{

-  DECLARE_FIRMWARE_FB(FORTE_X20DO9322)

-

-  private:

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_USINT &CNID(){

-      return *static_cast<CIEC_USINT*>(getDI(1));

-    }

-    ;

-

-    CIEC_UINT &MODID(){

-      return *static_cast<CIEC_UINT*>(getDI(2));

-    }

-    ;

-

-    CIEC_BOOL &DO01(){

-      return *static_cast<CIEC_BOOL*>(getDI(3));

-    }

-    ;

-

-    CIEC_BOOL &DO02(){

-      return *static_cast<CIEC_BOOL*>(getDI(4));

-    }

-    ;

-

-    CIEC_BOOL &DO03(){

-      return *static_cast<CIEC_BOOL*>(getDI(5));

-    }

-    ;

-

-    CIEC_BOOL &DO04(){

-      return *static_cast<CIEC_BOOL*>(getDI(6));

-    }

-    ;

-

-    CIEC_BOOL &DO05(){

-      return *static_cast<CIEC_BOOL*>(getDI(7));

-    }

-    ;

-

-    CIEC_BOOL &DO06(){

-      return *static_cast<CIEC_BOOL*>(getDI(8));

-    }

-    ;

-

-    CIEC_BOOL &DO07(){

-      return *static_cast<CIEC_BOOL*>(getDI(9));

-    }

-    ;

-

-    CIEC_BOOL &DO08(){

-      return *static_cast<CIEC_BOOL*>(getDI(10));

-    }

-    ;

-

-    CIEC_BOOL &DO09(){

-      return *static_cast<CIEC_BOOL*>(getDI(11));

-    }

-    ;

-

-    CIEC_BOOL &DO10(){

-      return *static_cast<CIEC_BOOL*>(getDI(12));

-    }

-    ;

-

-    CIEC_BOOL &DO11(){

-      return *static_cast<CIEC_BOOL*>(getDI(13));

-    }

-    ;

-

-    CIEC_BOOL &DO12(){

-      return *static_cast<CIEC_BOOL*>(getDI(14));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_USINT &CNIDO(){

-      return *static_cast<CIEC_USINT*>(getDO(1));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(2));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventREQID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventCNFID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 15, 3, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    // Variables for mapping between inputs and POWERLINK stack

-    SEplMapping m_oEplMapping;CSyncObject m_oSync;

-    bool m_bInitOk;

-    // ...

-

-  public:

-    FUNCTION_BLOCK_CTOR(FORTE_X20DO9322){

-  };

-

-  virtual ~FORTE_X20DO9322(){};

-

-  void cnSynchCallback();

-

-};

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/powerlink/readme.txt b/src/modules/powerlink/readme.txt
deleted file mode 100644
index ef7c87b..0000000
--- a/src/modules/powerlink/readme.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-openPOWERLINK interface for FORTE

-

-Instructions

-

-Prerequisits

-The following is needed in order to use openPOWERLINK with FORTE:

-

- - openPOWERLINK V1.8.0

- - TinyXML

-

-To use openPOWERLINK download openPOWERLINK V1.8.0 from Sourceforge (http://sourceforge.net/projects/openpowerlink/). The stack should be compiled using at least the following options in CMake:

-

- - CFG_POWERLINK_CHM

- - CFG_POWERLINK_PROCESS_IMAGE

- - CFG_X86_WINDOWS_DLL (only available on Windows)

-

-If compiled on Windows the resulting DLL and LIB must be copied to the main openPOWERLINK-V1.8.0 folder.

-

-TinyXML can be downloaded from http://sourceforge.net/projects/tinyxml/.

-

-Configure FORTE

-Check FORTE_MODULE_POWERLINK and set FORTE_MODULE_POWERLINK_LIB_DIR to [OPENPOWERLINK-V1.08.0_HOME] and FORTE_MODULE_POWERLINK_TINYXML_DIR to the directory where you unpacked TinyXML.

diff --git a/src/modules/ros/CMakeLists.txt b/src/modules/ros/CMakeLists.txt
deleted file mode 100644
index d57b0eb..0000000
--- a/src/modules/ros/CMakeLists.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-#  Copyright (c) 2018 fortiss GmbH
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-#  Contributors:
-#    Ben Schneider - initial API and implementation and/or initial documentation
-#############################################################################
-
-#############################################################################
-# ROS Example Publish and Subscribe FBs
-#############################################################################
-
-forte_add_module(ROS "Function Blocks to communicate with ROS (publish/subscribe)")
-
-if (FORTE_MODULE_ROS)
-  forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-  forte_add_definition("-DFORTE_ROS")
-
-  #############################################################################
-  # Communication Layer for ROS (publish, subscribe)
-  #############################################################################
-
-  forte_add_handler(CROSManager ROSManager)
-  forte_add_handler(CServiceCallManager ServiceCallManager)
-
-
-  forte_add_network_layer(ROS ON "ros" CROSLayer ROSLayer "Layer for providing and receiving data to/from ROS via publish/subscribe")
-
-  forte_add_sourcefile_hcpp(ROSManager)
-  forte_add_sourcefile_hcpp(ServiceCallManager)
-  forte_add_sourcefile_hcpp(TRIGGER_SERVICE_CLIENT)
-  forte_add_sourcefile_hcpp(TRIGGER_SERVICE_SERVER)
-  forte_add_sourcefile_hcpp(EXECUTE_ACTION_CLIENT)
-  forte_add_sourcefile_hcpp(EXECUTE_ACTION_SERVER)
-
-
-  find_package(catkin QUIET COMPONENTS actionlib reapp_msgs roscpp std_msgs std_srvs topic_tools)
-  if (catkin_FOUND)
-      forte_add_include_directories(${catkin_INCLUDE_DIRS})
-  else()
-      forte_add_link_directories(/opt/ros/indigo/lib)
-      forte_add_include_system_directories(/opt/ros/indigo/include)
-
-      set(catkin_LIBRARIES
-          -lroscpp
-          -lrosconsole
-          -lroscpp_serialization
-          -ltopic_tools
-          -lactionlib
-
-          -lrostime
-          -lboost_system
-          -lboost_thread
-      )
-  endif(catkin_FOUND)
-
-  forte_add_link_library(${catkin_LIBRARIES})
-
-endif(FORTE_MODULE_ROS)
diff --git a/src/modules/ros/EXECUTE_ACTION_CLIENT.cpp b/src/modules/ros/EXECUTE_ACTION_CLIENT.cpp
deleted file mode 100644
index ba91046..0000000
--- a/src/modules/ros/EXECUTE_ACTION_CLIENT.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include <ros/ros.h>
-#include "ROSManager.h"
-#include <extevhandlerhelper.h>
-
-#include "EXECUTE_ACTION_CLIENT.h"
-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP
-#include "EXECUTE_ACTION_CLIENT_gen.cpp"
-#endif
-
-DEFINE_FIRMWARE_FB(FORTE_EXECUTE_ACTION_CLIENT, g_nStringIdEXECUTE_ACTION_CLIENT)
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdACTIONNAMESPACE, g_nStringIdACTIONMSGNAME, g_nStringIdCOMMAND, g_nStringIdID1, g_nStringIdID2 };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdDINT, g_nStringIdDINT };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdFBSTATUS, g_nStringIdACTIONSTATUS, g_nStringIdRESULT, g_nStringIdID, g_nStringIdSTATE };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdDINT, g_nStringIdSTRING };
-
-const TForteInt16 FORTE_EXECUTE_ACTION_CLIENT::scm_anEIWithIndexes[] = { 0, 4 };
-const TDataIOID FORTE_EXECUTE_ACTION_CLIENT::scm_anEIWith[] = { 0, 1, 2, 255, 0, 3, 4, 5, 255 };
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };
-
-const TDataIOID FORTE_EXECUTE_ACTION_CLIENT::scm_anEOWith[] = { 0, 1, 255, 0, 1, 2, 4, 3, 255, 5, 255 };
-const TForteInt16 FORTE_EXECUTE_ACTION_CLIENT::scm_anEOWithIndexes[] = { 0, 3, 9 };
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_CLIENT::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };
-
-const SFBInterfaceSpec FORTE_EXECUTE_ACTION_CLIENT::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 6, scm_anDataInputNames, scm_anDataInputTypeIds, 6, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };
-
-void FORTE_EXECUTE_ACTION_CLIENT::executeEvent(int pa_nEIID){
-  switch (pa_nEIID){
-    case scm_nEventINITID:
-      //initialize FB
-      if(!m_Initiated){
-
-        connectToActionServer();
-        QO() = true;
-      }
-      //already initialized
-      else if(QI() && m_Initiated){
-        FBSTATUS() = "Already initiated";
-        QO() = true;
-      }
-      //termintate FB
-      else if(!QI() && m_Initiated){
-        m_ActionClient->cancelAllGoals();
-        ros::shutdown();
-        m_Initiated = false;
-        FBSTATUS() = "Terminated - All goals canceled";
-        QO() = false;
-      }
-      sendOutputEvent(scm_nEventINITOID);
-      break;
-
-    case scm_nEventREQID:
-      //send new goal to the action server
-      if(m_Initiated){
-        //send new goal
-        if(QI() && !m_GoalActive){
-          if(m_ActionClient->isServerConnected()){
-            //register the external eventchain on the thread of the Request event
-            setEventChainExecutor(m_poInvokingExecEnv);
-            reapp_msgs::ExecuteGoal goal;
-            goal.id1 = ID1();
-            goal.id2 = ID2();
-            goal.command = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(COMMAND());
-
-            m_ActionClient->sendGoal(goal, boost::bind(&FORTE_EXECUTE_ACTION_CLIENT::doneCallback, this, _1, _2), boost::bind(&FORTE_EXECUTE_ACTION_CLIENT::activeCallback, this), boost::bind(&FORTE_EXECUTE_ACTION_CLIENT::feedbackCallback, this, _1));
-
-            FBSTATUS() = "New action goal sent";
-            QO() = true;
-          }
-          else{ //not connected
-            FBSTATUS() = "Sending goal not possible. Server not Connected";
-            QO() = false;
-          }
-        }
-        //ignore goals that are sent while another goal is active
-        else if(!QI() && !m_GoalActive){
-          FBSTATUS() = "Goal not sent, server busy";
-        }
-        //cancel the goal at the action server that was sent by the client
-        else if(!QI() && m_GoalActive){
-          FBSTATUS() = "Canceling goals";
-          m_ActionClient->cancelAllGoals();
-          FBSTATUS() = "Goals canceled";
-          QO() = false;
-          sendOutputEvent(scm_nEventCNFID);
-        }
-      }
-
-      //FB is not initiated at all/correctly
-      else{
-        FBSTATUS() = "FB not initiated";
-        QO() = false;
-      }
-      break;
-
-    case cg_nExternalEventID:
-      //we received feedback (QO=false)
-      if(false == QO()){
-
-        const std::string callbackFeedback = m_ExecuteFeedbackConstPtr->state;
-
-        STATE() = callbackFeedback.c_str();
-        FBSTATUS() = "Feedback received";
-      }
-      //we received a result (QO=true)
-      else{
-        const std::string callbackResultResult = m_ExecuteResultConstPtr->result;
-        const int callbackResultID = m_ExecuteResultConstPtr->id;
-        ID() = callbackResultID;
-        RESULT() = callbackResultResult.c_str();
-
-        ACTIONSTATUS() = getCurrentActionState().c_str();
-        FBSTATUS() = "Result received";
-      }
-      sendOutputEvent(scm_nEventCNFID);
-      break;
-  }
-}
-
-void FORTE_EXECUTE_ACTION_CLIENT::doneCallback(const actionlib::SimpleClientGoalState&, const ExecuteResultConstPtr& pa_result){
-  m_ExecuteResultConstPtr = pa_result;
-
-  ACTIONSTATUS() = getCurrentActionState().c_str();
-  QO() = true;
-  m_GoalActive = false;
-  getExtEvHandler<CROSManager>(*this).startChain(this);
-}
-
-void FORTE_EXECUTE_ACTION_CLIENT::activeCallback(){
-  ACTIONSTATUS() = getCurrentActionState().c_str();
-  m_GoalActive = true;
-}
-
-void FORTE_EXECUTE_ACTION_CLIENT::feedbackCallback(const ExecuteFeedbackConstPtr &pa_feedback){
-  m_ExecuteFeedbackConstPtr = pa_feedback;
-
-  ACTIONSTATUS() = getCurrentActionState().c_str();
-  QO() = false;
-  getExtEvHandler<CROSManager>(*this).startChain(this);
-}
-
-std::string FORTE_EXECUTE_ACTION_CLIENT::getCurrentActionState(){
-  std::string retVal = "UNKNOWN";
-
-  int i = m_ActionClient->getState().state_;
-  switch (i){
-    case actionlib::SimpleClientGoalState::PENDING:
-      retVal = "PENDING";
-      break;
-    case actionlib::SimpleClientGoalState::ACTIVE:
-      retVal = "ACTIVE";
-      break;
-    case actionlib::SimpleClientGoalState::PREEMPTED:
-      retVal = "PREEMPTED";
-      break;
-    case actionlib::SimpleClientGoalState::SUCCEEDED:
-      retVal = "SUCCEEDED";
-      break;
-    case actionlib::SimpleClientGoalState::ABORTED:
-    case actionlib::SimpleClientGoalState::REJECTED:
-      retVal = "ABORTED";
-      break;
-    case actionlib::SimpleClientGoalState::RECALLED:
-      retVal = "RECALLED";
-      break;
-    case actionlib::SimpleClientGoalState::LOST:
-      retVal = "LOST";
-      break;
-  }
-  return retVal;
-}
-
-void FORTE_EXECUTE_ACTION_CLIENT::connectToActionServer(){
-  m_RosNamespace = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(ACTIONNAMESPACE());
-  m_RosMsgName = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(ACTIONMSGNAME());
-  DEVLOG_DEBUG("[EXEC_CLIENT] Namespace: %s \nMessage name : %s \n", m_RosNamespace.c_str(), m_RosMsgName.c_str());
-
-  nh = new ros::NodeHandle(m_RosNamespace);
-
-  m_ActionClient = new actionClient(*nh, m_RosMsgName, true);
-
-  FBSTATUS() = "Client waits for server";
-  m_ActionClient->waitForServer();
-  FBSTATUS() = "Client connected to server";
-  m_Initiated = true;
-}
diff --git a/src/modules/ros/EXECUTE_ACTION_CLIENT.h b/src/modules/ros/EXECUTE_ACTION_CLIENT.h
deleted file mode 100644
index cd47601..0000000
--- a/src/modules/ros/EXECUTE_ACTION_CLIENT.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef _EXECUTE_ACTION_CLIENT_H_
-#define _EXECUTE_ACTION_CLIENT_H_
-
-#include <esfb.h>
-#include <forte_bool.h>
-#include <forte_string.h>
-#include <forte_dint.h>
-
-#include <actionlib/client/simple_action_client.h>
-#include <reapp_msgs/ExecuteAction.h>
-#include <reapp_msgs/ExecuteResult.h>
-
-typedef boost::shared_ptr<reapp_msgs::ExecuteResult const> ExecuteResultConstPtr;
-typedef boost::shared_ptr<reapp_msgs::ExecuteFeedback const> ExecuteFeedbackConstPtr;
-
-typedef actionlib::SimpleActionClient<reapp_msgs::ExecuteAction> actionClient;
-
-// cppcheck-suppress noConstructor
-class FORTE_EXECUTE_ACTION_CLIENT : public CEventSourceFB{
-  DECLARE_FIRMWARE_FB(FORTE_EXECUTE_ACTION_CLIENT)
-
-  private:
-
-    bool m_Initiated;
-    bool m_GoalActive;
-    actionClient* m_ActionClient;
-    ExecuteResultConstPtr m_ExecuteResultConstPtr;
-    ExecuteFeedbackConstPtr m_ExecuteFeedbackConstPtr;
-    bool mResultReady;
-
-    ros::NodeHandle* nh;
-    std::string m_RosNamespace;
-    std::string m_RosMsgName;
-
-    static const CStringDictionary::TStringId scm_anDataInputNames[];
-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-    CIEC_BOOL &QI(){
-      return *static_cast<CIEC_BOOL*>(getDI(0));
-    }
-    ;
-
-    CIEC_STRING &ACTIONNAMESPACE(){
-      return *static_cast<CIEC_STRING*>(getDI(1));
-    }
-    ;
-
-    CIEC_STRING &ACTIONMSGNAME(){
-      return *static_cast<CIEC_STRING*>(getDI(2));
-    }
-    ;
-
-    CIEC_STRING &COMMAND(){
-      return *static_cast<CIEC_STRING*>(getDI(3));
-    }
-    ;
-
-    CIEC_DINT &ID1(){
-      return *static_cast<CIEC_DINT*>(getDI(4));
-    }
-    ;
-
-    CIEC_DINT &ID2(){
-      return *static_cast<CIEC_DINT*>(getDI(5));
-    }
-    ;
-
-    static const CStringDictionary::TStringId scm_anDataOutputNames[];
-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-    CIEC_BOOL &QO(){
-      return *static_cast<CIEC_BOOL*>(getDO(0));
-    }
-    ;
-
-    CIEC_STRING &FBSTATUS(){
-      return *static_cast<CIEC_STRING*>(getDO(1));
-    }
-    ;
-
-    CIEC_STRING &ACTIONSTATUS(){
-      return *static_cast<CIEC_STRING*>(getDO(2));
-    }
-    ;
-
-    CIEC_STRING &RESULT(){
-      return *static_cast<CIEC_STRING*>(getDO(3));
-    }
-    ;
-
-    CIEC_DINT &ID(){
-      return *static_cast<CIEC_DINT*>(getDO(4));
-    }
-    ;
-
-    CIEC_STRING &STATE(){
-      return *static_cast<CIEC_STRING*>(getDO(5));
-    }
-    ;
-
-    static const TEventID scm_nEventINITID = 0;
-    static const TEventID scm_nEventREQID = 1;
-    static const TForteInt16 scm_anEIWithIndexes[];
-    static const TDataIOID scm_anEIWith[];
-    static const CStringDictionary::TStringId scm_anEventInputNames[];
-
-    static const TEventID scm_nEventINITOID = 0;
-    static const TEventID scm_nEventCNFID = 1;
-    static const TForteInt16 scm_anEOWithIndexes[];
-    static const TDataIOID scm_anEOWith[];
-    static const CStringDictionary::TStringId scm_anEventOutputNames[];
-
-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;
-
-    FORTE_FB_DATA_ARRAY(2, 6, 6, 0)
-    ;
-
-    void executeEvent(int pa_nEIID);
-
-    void doneCallback(const actionlib::SimpleClientGoalState& state, const ExecuteResultConstPtr& result);
-    void activeCallback();
-    void feedbackCallback(const ExecuteFeedbackConstPtr &feedback);
-
-    std::string getCurrentActionState();
-
-    void connectToActionServer();
-
-  public:
-    EVENT_SOURCE_FUNCTION_BLOCK_CTOR(FORTE_EXECUTE_ACTION_CLIENT), m_Initiated(false), m_GoalActive(false), m_ActionClient(0), mResultReady(false), nh(0), m_RosNamespace(""), m_RosMsgName(""){
-    };
-
-    virtual ~FORTE_EXECUTE_ACTION_CLIENT(){};
-
-  };
-
-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/ros/EXECUTE_ACTION_SERVER.cpp b/src/modules/ros/EXECUTE_ACTION_SERVER.cpp
deleted file mode 100644
index 194ca0e..0000000
--- a/src/modules/ros/EXECUTE_ACTION_SERVER.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ROSManager.h"
-#include <ros/ros.h>
-#include <extevhandlerhelper.h>
-
-#include "EXECUTE_ACTION_SERVER.h"
-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP
-#include "EXECUTE_ACTION_SERVER_gen.cpp"
-#endif
-
-DEFINE_FIRMWARE_FB(FORTE_EXECUTE_ACTION_SERVER, g_nStringIdEXECUTE_ACTION_SERVER)
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdACTIONNAMESPACE, g_nStringIdACTIONMSGNAME, g_nStringIdRESULT, g_nStringIdID, g_nStringIdSTATE };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdDINT, g_nStringIdSTRING };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdFBSTATUS, g_nStringIdACTIONSTATUS, g_nStringIdCOMMAND, g_nStringIdID1, g_nStringIdID2 };
-
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdDINT, g_nStringIdDINT };
-
-const TForteInt16 FORTE_EXECUTE_ACTION_SERVER::scm_anEIWithIndexes[] = { 0, 4 };
-const TDataIOID FORTE_EXECUTE_ACTION_SERVER::scm_anEIWith[] = { 0, 1, 2, 255, 0, 5, 4, 3, 255 };
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdRSP };
-
-const TDataIOID FORTE_EXECUTE_ACTION_SERVER::scm_anEOWith[] = { 0, 1, 255, 0, 1, 3, 2, 4, 5, 255 };
-const TForteInt16 FORTE_EXECUTE_ACTION_SERVER::scm_anEOWithIndexes[] = { 0, 3, -1 };
-const CStringDictionary::TStringId FORTE_EXECUTE_ACTION_SERVER::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdIND };
-
-const SFBInterfaceSpec FORTE_EXECUTE_ACTION_SERVER::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 6, scm_anDataInputNames, scm_anDataInputTypeIds, 6, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };
-
-void FORTE_EXECUTE_ACTION_SERVER::executeEvent(int pa_nEIID){
-  switch (pa_nEIID){
-    case scm_nEventINITID:
-
-      if(QI() && !m_Initiated){
-        
-        m_RosNamespace = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(ACTIONNAMESPACE());
-        m_RosMsgName = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(ACTIONMSGNAME());
-        DEVLOG_DEBUG("[EXEC_SERVER] Namespace: %s \n[EXEC_SERVER] Message name : %s \n", m_RosNamespace.c_str(), m_RosMsgName.c_str());
-
-        m_nh = new ros::NodeHandle(m_RosNamespace);
-
-        m_ActionServer = new actionServer(*m_nh, m_RosMsgName, boost::bind(&FORTE_EXECUTE_ACTION_SERVER::ActionExecuteCB, this, _1), false);
-        m_ActionServer->start(); //not needed if auto_start=true (last param in ctor of server)
-
-        QO() = true;
-        m_Initiated = true;
-        FBSTATUS() = "Server started";
-      }
-
-      //server already initialized
-      else if(QI() && m_Initiated){
-        FBSTATUS() = "Server already initialized";
-        QO() = true;
-      }
-      //terminate server and function block
-      else{
-        m_Initiated = false;
-        m_ResultAvailable = false;
-        if(m_ActionServer->isActive()){
-          m_ActionServer->setAborted();
-        }
-        m_ActionServer->shutdown(); //TODO test this!
-        //ros::shutdown();
-        FBSTATUS() = "Action Server Shutdown";
-        //DEVLOG_DEBUG("[EXEC_SERVER] Action server shutdown\n");
-      }
-      sendOutputEvent(scm_nEventINITOID);
-      break;
-
-    case scm_nEventRSPID:
-      //send a result (see executeCB)
-      if(QI()){
-        m_Result.result = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(RESULT());
-        m_Result.id = ID();
-        FBSTATUS() = "Server sends result";
-        m_ResultAvailable = true;
-      }
-      //send feedback
-      else{
-        // get feedback data from STATE() input
-        m_Feedback.state = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(STATE());
-        m_ActionServer->publishFeedback(m_Feedback);
-      }
-      break;
-
-      //The server received a new goal
-    case cg_nExternalEventID:
-      if(m_ActionServer->isPreemptRequested() || !ros::ok()){
-        m_ActionServer->setPreempted();
-        ACTIONSTATUS() = "PREEMPTED";
-        QO() = false;
-        //DEVLOG_DEBUG("[EXEC_SERVER] ExternalEvent: preempted or !ok\n");
-      }
-      else{
-        int stringLength = std::strlen(m_GoalConstPtr->command.c_str());
-        CIEC_STRING tmpResult;
-        tmpResult.assign(m_GoalConstPtr->command.c_str(), static_cast<TForteUInt16>(stringLength));
-        COMMAND().saveAssign(tmpResult);
-        ID1() = m_GoalConstPtr->id1;
-        ID2() = m_GoalConstPtr->id2;
-
-        FBSTATUS() = "Server received new goal";
-        ACTIONSTATUS() = "ACTIVE";
-        QO() = true;
-      }
-      sendOutputEvent(scm_nEventINDID);
-      break;
-  }
-}
-
-void FORTE_EXECUTE_ACTION_SERVER::ActionExecuteCB(const ExecuteGoalConstPtr &pa_goal){
-
-  m_GoalConstPtr = pa_goal;
-  ros::Rate r(2); //2Hz
-
-  setEventChainExecutor(m_poInvokingExecEnv);
-  //DEVLOG_DEBUG("[EXEC_SERVER] Received goal is: %s \n", mGoalConstPtr->command.c_str());
-  getExtEvHandler<CROSManager>(*this).startChain(this);
-
-  // FIXME better idea as flag polling?
-  //wait for an available result(mResultAvailable set in case of RSP+)
-  while(!m_ResultAvailable && m_Initiated){
-    // send cyclic feedback here if needed
-    // mActionServer->publishFeedback(mFeedback);
-
-    r.sleep();
-  }
-  m_ResultAvailable = false;
-  m_ActionServer->setSucceeded(m_Result);
-  //DEVLOG_DEBUG("[EXEC_SERVER] result is: %s \n", mResult.result.c_str());
-  FBSTATUS() = "Server has sent result for current goal";
-  ACTIONSTATUS() = "SUCCEEDED";
-}
diff --git a/src/modules/ros/EXECUTE_ACTION_SERVER.h b/src/modules/ros/EXECUTE_ACTION_SERVER.h
deleted file mode 100644
index 1c39930..0000000
--- a/src/modules/ros/EXECUTE_ACTION_SERVER.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef _EXECUTE_ACTION_SERVER_H_
-#define _EXECUTE_ACTION_SERVER_H_
-
-#include <esfb.h>
-#include <forte_bool.h>
-#include <forte_string.h>
-#include <forte_dint.h>
-
-#include <actionlib/server/simple_action_server.h>
-#include <reapp_msgs/ExecuteAction.h>
-#include <reapp_msgs/ExecuteResult.h>
-
-typedef boost::shared_ptr<reapp_msgs::ExecuteGoal const> ExecuteGoalConstPtr; //Warum funktioniert boost::bind mit typedef, aber nicht ohne??
-typedef actionlib::SimpleActionServer<reapp_msgs::ExecuteAction> actionServer;
-
-// cppcheck-suppress noConstructor
-class FORTE_EXECUTE_ACTION_SERVER : public CEventSourceFB{
-  DECLARE_FIRMWARE_FB(FORTE_EXECUTE_ACTION_SERVER)
-
-  private:
-
-    ros::NodeHandle* m_nh;
-    std::string m_RosNamespace;
-    std::string m_RosMsgName;
-
-    bool m_Initiated;
-    bool m_ResultAvailable;
-    actionServer* m_ActionServer;
-    reapp_msgs::ExecuteFeedback m_Feedback;
-    reapp_msgs::ExecuteResult m_Result;
-    ExecuteGoalConstPtr m_GoalConstPtr;
-
-    static const CStringDictionary::TStringId scm_anDataInputNames[];
-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-    CIEC_BOOL &QI(){
-      return *static_cast<CIEC_BOOL*>(getDI(0));
-    }
-    ;
-
-    CIEC_STRING &ACTIONNAMESPACE(){
-      return *static_cast<CIEC_STRING*>(getDI(1));
-    }
-    ;
-
-    CIEC_STRING &ACTIONMSGNAME(){
-      return *static_cast<CIEC_STRING*>(getDI(2));
-    }
-    ;
-
-    CIEC_STRING &RESULT(){
-      return *static_cast<CIEC_STRING*>(getDI(3));
-    }
-    ;
-
-    CIEC_DINT &ID(){
-      return *static_cast<CIEC_DINT*>(getDI(4));
-    }
-    ;
-
-    CIEC_STRING &STATE(){
-      return *static_cast<CIEC_STRING*>(getDI(5));
-    }
-    ;
-
-    static const CStringDictionary::TStringId scm_anDataOutputNames[];
-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-    CIEC_BOOL &QO(){
-      return *static_cast<CIEC_BOOL*>(getDO(0));
-    }
-    ;
-
-    CIEC_STRING &FBSTATUS(){
-      return *static_cast<CIEC_STRING*>(getDO(1));
-    }
-    ;
-
-    CIEC_STRING &ACTIONSTATUS(){
-      return *static_cast<CIEC_STRING*>(getDO(2));
-    }
-    ;
-
-    CIEC_STRING &COMMAND(){
-      return *static_cast<CIEC_STRING*>(getDO(3));
-    }
-    ;
-
-    CIEC_DINT &ID1(){
-      return *static_cast<CIEC_DINT*>(getDO(4));
-    }
-    ;
-
-    CIEC_DINT &ID2(){
-      return *static_cast<CIEC_DINT*>(getDO(5));
-    }
-    ;
-
-    static const TEventID scm_nEventINITID = 0;
-    static const TEventID scm_nEventRSPID = 1;
-    static const TForteInt16 scm_anEIWithIndexes[];
-    static const TDataIOID scm_anEIWith[];
-    static const CStringDictionary::TStringId scm_anEventInputNames[];
-
-    static const TEventID scm_nEventINITOID = 0;
-    static const TEventID scm_nEventINDID = 1;
-    static const TForteInt16 scm_anEOWithIndexes[];
-    static const TDataIOID scm_anEOWith[];
-    static const CStringDictionary::TStringId scm_anEventOutputNames[];
-
-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;
-
-    FORTE_FB_DATA_ARRAY(2, 6, 6, 0)
-    ;
-
-    void executeEvent(int pa_nEIID);
-
-    void ActionExecuteCB(const ExecuteGoalConstPtr &pa_goal);
-
-  public:
-    // cppcheck-suppress noConstructor
-    EVENT_SOURCE_FUNCTION_BLOCK_CTOR(FORTE_EXECUTE_ACTION_SERVER), m_nh(0) ,m_RosNamespace(""), m_RosMsgName(""), m_Initiated(false), m_ResultAvailable(false), m_ActionServer(0) {
-    };
-
-    virtual ~FORTE_EXECUTE_ACTION_SERVER(){};
-
-  };
-
-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/ros/ROSLayer.cpp b/src/modules/ros/ROSLayer.cpp
deleted file mode 100644
index d569af6..0000000
--- a/src/modules/ros/ROSLayer.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ROSLayer.h"
-#include "ROSManager.h"
-
-#include <std_msgs/Float64.h>
-#include <std_msgs/Int32.h>
-#include <std_msgs/String.h>
-#include <std_msgs/Bool.h>
-#include <std_msgs/Empty.h>
-#include <commfb.h>
-
-using namespace forte::com_infra;
-
-CROSLayer::CROSLayer(CComLayer* pa_poUpperLayer, CBaseCommFB* pa_poComFB) :
-    CComLayer(pa_poUpperLayer, pa_poComFB){
-
-  m_eInterruptResp = e_ProcessDataOk;
-  m_TopicName = "";
-  m_TopicType = "";
-  m_NumSDs = -1;
-  m_NumRDs = -1;
-}
-
-CROSLayer::~CROSLayer(){
-
-}
-
-// initializes current layer
-EComResponse CROSLayer::openConnection(char *pa_acLayerParameter){
-
-  EComResponse retVal = e_InitOk;
-  m_eCommServiceType = getCommFB()->getComServiceType();
-
-  std::string layerParams = pa_acLayerParameter;
-
-  // extract layerparams from ID input between the square brackets
-  // example: ID = ros[/signal:std_msgs/Float64], layerparams = /signal:std_msgs/Float64
-  int doublePoint = static_cast<int>(layerParams.find_last_of(":"));
-  m_TopicName = layerParams.substr(0, doublePoint);
-
-  if(e_Subscriber == m_eCommServiceType){
-
-    m_NumRDs = getCommFB()->getNumRD();
-
-    if(0 == m_NumRDs || 1 == m_NumRDs){
-      m_Sub = m_Nh.subscribe < topic_tools::ShapeShifter > (m_TopicName, 100, &CROSLayer::handleReceivedValue, const_cast<CROSLayer*>(this));
-    }
-    else{
-      DEVLOG_ERROR("[ROSLAYER] Subscribers with more than 1 RD output are not supported at the moment");
-    }
-  }
-  else if(e_Publisher == m_eCommServiceType){
-    m_NumSDs = getCommFB()->getNumSD();
-
-    if(0 == m_NumSDs){
-      m_Pub = m_Nh.advertise < std_msgs::Empty > (m_TopicName, 100);
-    }
-    else if(1 == m_NumSDs){
-
-      m_TopicType = layerParams.substr(doublePoint + 1);
-
-      if("std_msgs/Float64" == m_TopicType) {
-        m_Pub = m_Nh.advertise < std_msgs::Float64 > (m_TopicName, 100);
-      } else if("std_msgs/Int32" == m_TopicType) {
-        m_Pub = m_Nh.advertise < std_msgs::Int32 > (m_TopicName, 100);
-      } else if("std_msgs/Bool" == m_TopicType) {
-        m_Pub = m_Nh.advertise < std_msgs::Bool > (m_TopicName, 100);
-      } else if("std_msgs/String" == m_TopicType) {
-        m_Pub = m_Nh.advertise < std_msgs::String > (m_TopicName, 100);
-      } else {
-        DEVLOG_ERROR("[ROSLAYER] Publisher could not be initialized: unknown topic type \n");
-      }
-     //FIXME successful initialization message also on error..
-    }
-    else{
-      retVal = e_InitInvalidId;
-      DEVLOG_ERROR("[ROSLAYER] Publishers with more than 1 SD intput are not supported at the moment. There are %d SD inputs configured", m_NumSDs);
-    }
-  }
-  // We are a Service
-  else if(e_Server == m_eCommServiceType){
-    //TODO implement this
-  }
-  else if(e_Client == m_eCommServiceType){
-    //TODO implement this
-  }
-
-  else{
-    retVal = e_InitInvalidId;
-    DEVLOG_ERROR("[ROSLAYER] SIFB could not be initialized with an appropriate ROS communication type: block type is neither Publisher nor Subscriber nor Server nor Client\n");
-  }
-
-  return retVal;
-}
-
-// callback for subscribers
-void CROSLayer::handleReceivedValue(const boost::shared_ptr<const topic_tools::ShapeShifter>& pa_Message){
-
-  // writing received values to RD output: getRDs() returns adress of Data from the RDs -> overwrite them
-  CIEC_ANY *DataArray = getCommFB()->getRDs();
-
-  m_TopicType = pa_Message->getDataType();
-
-  if(0 == m_NumRDs){
-
-  }
-  else if(1 == m_NumRDs){
-
-    if("std_msgs/Float64" == m_TopicType){
-      boost::shared_ptr < std_msgs::Float64 > instantiated = pa_Message->instantiate<std_msgs::Float64>();
-      double ROSValue = instantiated->data;
-      *(CIEC_LREAL *) DataArray = ROSValue;
-    }
-    else if("std_msgs/Int32" == m_TopicType){
-      boost::shared_ptr < std_msgs::Int32 > instantiated = pa_Message->instantiate<std_msgs::Int32>();
-      int ROSValue = instantiated->data;
-      *(CIEC_DINT *) DataArray = ROSValue;
-    }
-    else if("std_msgs/Bool" == m_TopicType){
-      boost::shared_ptr < std_msgs::Bool > instantiated = pa_Message->instantiate<std_msgs::Bool>();
-      bool ROSValue = instantiated->data;
-      *(CIEC_BOOL *) DataArray = ROSValue;
-    }
-    else if("std_msgs/String" == m_TopicType){
-      boost::shared_ptr < std_msgs::String > instantiated = pa_Message->instantiate<std_msgs::String>();
-      std::string ROSValue = instantiated->data;
-
-      int stringLength = static_cast<int>(std::strlen(ROSValue.c_str()));
-      CIEC_STRING tmpString;
-      tmpString.assign(ROSValue.c_str(), static_cast<TForteUInt16>(stringLength));
-
-      *(CIEC_STRING *) DataArray = tmpString;
-    }
-    else{
-      DEVLOG_ERROR("[ROSLAYER] Subscriber received a message with unknown type: %s \n", m_TopicType.c_str());
-    }
-  }
-  else{
-    // TODO implement this:
-    DEVLOG_ERROR("[ROSLAYER] More than 1 RD outputs are not supported at the Moment \n");
-  }
-
-  getCommFB()->interruptCommFB(this);
-
-  getExtEvHandler<CROSManager>().startChain(this->getCommFB());
-}
-
-void CROSLayer::closeConnection(){
-  m_Nh.shutdown();
-}
-
-//TODO use sendData parameters instead of e.g., getCommFB()->getSDs()
-EComResponse CROSLayer::sendData(void *, unsigned int){
-  EComResponse RetVal = e_ProcessDataOk;
-
-  CIEC_ANY *DataArray = getCommFB()->getSDs();
-
-  // process SD inputs
-  if(0 == m_NumSDs){ //Publish 0
-    std_msgs::Empty ROSValue;
-    m_Pub.publish(ROSValue);
-  }
-  // Publish 1
-  else if(1 == m_NumSDs){
-    switch (DataArray->getDataTypeID()){
-      case CIEC_ANY::e_BOOL: {
-        std_msgs::Bool ROSValue;
-        bool FORTEValue = (*(CIEC_BOOL *) DataArray);
-
-        ROSValue.data = FORTEValue;
-        m_Pub.publish(ROSValue);
-      }
-        break;
-      case CIEC_ANY::e_LREAL: {
-        std_msgs::Float64 ROSValue;
-
-        double FORTEValue = *(CIEC_LREAL *) DataArray;
-        ROSValue.data = FORTEValue;
-
-        m_Pub.publish(ROSValue);
-      }
-        break;
-      case CIEC_ANY::e_DINT: {
-        std_msgs::Int32 ROSValue;
-
-        int FORTEValue = *(CIEC_DINT *) DataArray;
-        ROSValue.data = FORTEValue;
-
-        m_Pub.publish(ROSValue);
-      }
-        break;
-      case CIEC_ANY::e_STRING: {
-        std_msgs::String ROSValue;
-
-        CIEC_STRING ciecString = *(CIEC_STRING *) DataArray;
-        const char * buf = ciecString.getValue();
-        std::size_t len = std::strlen(buf);
-        std::string tmpString(buf, 0, len);
-
-        ROSValue.data = tmpString;
-        m_Pub.publish(ROSValue);
-      }
-        break;
-      case CIEC_ANY::e_ANY:
-      case CIEC_ANY::e_SINT:
-      case CIEC_ANY::e_INT:
-      case CIEC_ANY::e_USINT:
-      case CIEC_ANY::e_UINT:
-      case CIEC_ANY::e_BYTE:
-      case CIEC_ANY::e_WORD:
-      case CIEC_ANY::e_LINT:
-      case CIEC_ANY::e_UDINT:
-      case CIEC_ANY::e_ULINT:
-      case CIEC_ANY::e_DWORD:
-      case CIEC_ANY::e_LWORD:
-      case CIEC_ANY::e_REAL:
-      case CIEC_ANY::e_WSTRING:
-      case CIEC_ANY::e_DATE:
-      case CIEC_ANY::e_DATE_AND_TIME:
-      case CIEC_ANY::e_TIME_OF_DAY:
-      case CIEC_ANY::e_TIME:
-      case CIEC_ANY::e_DerivedData:
-      case CIEC_ANY::e_DirectlyDerivedData:
-      case CIEC_ANY::e_EnumeratedData:
-      case CIEC_ANY::e_SubrangeData:
-      case CIEC_ANY::e_ARRAY:
-      case CIEC_ANY::e_STRUCT:
-      case CIEC_ANY::e_External:
-      case CIEC_ANY::e_Max:
-        DEVLOG_ERROR("[ROSLAYER] Publisher with unsupported data type");
-        break;
-    }
-  }
-  // Publish n for n > 1
-  else{
-    DEVLOG_ERROR("[ROSLAYER] Publisher with more than 1 SD input is not supported at the moment");
-  }
-  return RetVal;
-}
-
-EComResponse CROSLayer::recvData(const void *, unsigned int){
-  return e_ProcessDataOk;
-}
-
-EComResponse CROSLayer::processInterrupt(){
-  //we don't need to do anything here (only 1 layer)
-  return m_eInterruptResp;
-}
diff --git a/src/modules/ros/ROSLayer.h b/src/modules/ros/ROSLayer.h
deleted file mode 100644
index 849e1c1..0000000
--- a/src/modules/ros/ROSLayer.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef CROSLAYER_H_
-#define CROSLAYER_H_
-
-#include <ros/ros.h>
-#include <ros/service_callback_helper.h>
-#include <topic_tools/shape_shifter.h>
-
-#include <comlayer.h>
-#include <extevhan.h>
-#include <forte_thread.h>
-#include <singlet.h>
-
-#include <string>
-
-class CROSLayer : public forte::com_infra::CComLayer{
-
-  public:
-    CROSLayer(forte::com_infra::CComLayer* pa_poUpperLayer, forte::com_infra::CBaseCommFB* pa_poComFB);
-    virtual ~CROSLayer();
-
-    virtual void closeConnection();
-
-    virtual forte::com_infra::EComResponse sendData(void *pa_pvData, unsigned int pa_unSize);
-    virtual forte::com_infra::EComResponse recvData(const void *pa_pvData, unsigned int pa_unSize);
-
-    virtual forte::com_infra::EComResponse processInterrupt();
-
-  private:
-    virtual forte::com_infra::EComResponse openConnection(char *pa_acLayerParameter);
-
-    forte::com_infra::EComServiceType m_eCommServiceType;
-    forte::com_infra::EComResponse m_eInterruptResp;
-
-    ros::NodeHandle m_Nh;
-    ros::Publisher m_Pub;
-    ros::Subscriber m_Sub;
-    std::string m_TopicName;
-    std::string m_TopicType;
-    int m_NumRDs;
-    int m_NumSDs;
-
-    void handleReceivedValue(const boost::shared_ptr<const topic_tools::ShapeShifter>& pa_message);
-};
-
-#endif //_CROSLAYER_H_
diff --git a/src/modules/ros/ROSManager.cpp b/src/modules/ros/ROSManager.cpp
deleted file mode 100644
index 5769dd9..0000000
--- a/src/modules/ros/ROSManager.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ROSManager.h"
-
-#include <ros/ros.h>
-
-//------------------------- CROSLayer::CROSManager -------------------------
-
-DEFINE_HANDLER(CROSManager);
-
-CROSManager::CROSManager(CDeviceExecution& paDeviceExecution) : CExternalEventHandler(paDeviceExecution),
-    CThread(/* long stacksize , 3500*/){
-  start();
-}
-
-CROSManager::~CROSManager(){
-  end();
-}
-
-void CROSManager::enableHandler(){
-
-}
-
-void CROSManager::disableHandler(){
-  ros::shutdown();
-}
-
-void CROSManager::setPriority(int){
-//FIXME adjust thread priority correctly
-}
-
-int CROSManager::getPriority() const{
-  return 0;
-}
-
-void CROSManager::startChain(CEventSourceFB *pa_poECStartF){
-  if(0 != pa_poECStartF){
-    startNewEventChain(pa_poECStartF);
-  }
-}
-
-void CROSManager::run(){
-  while(isAlive() && ros::ok()){
-    ros::spinOnce();
-  }
-}
-
-std::string CROSManager::ciecStringToStdString(const CIEC_STRING &pa_DataInput){
-  return std::string(pa_DataInput.getValue());
-}
-
-CIEC_STRING CROSManager::stdStringToCiecString(const std::string &pa_inputString){
-  int stringLength = static_cast<int>(std::strlen(pa_inputString.c_str()));
-  CIEC_STRING tmpString;
-  tmpString.assign(pa_inputString.c_str(), static_cast<TForteUInt16>(stringLength));
-  return tmpString;
-}
diff --git a/src/modules/ros/ROSManager.h b/src/modules/ros/ROSManager.h
deleted file mode 100644
index ff852a0..0000000
--- a/src/modules/ros/ROSManager.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef CROSMANAGER_H_
-#define CROSMANAGER_H_
-
-#include <extevhan.h>
-#include <forte_thread.h>
-
-#include <forte_string.h>
-#include <string>
-
-class CROSManager : public CExternalEventHandler, private CThread{
-  DECLARE_HANDLER(CROSManager)
-
-  public:
-    virtual void enableHandler();
-    virtual void disableHandler();
-    virtual void setPriority(int pa_prio);
-    virtual int getPriority() const;
-
-    void startChain(CEventSourceFB *pa_poECStartF);
-    std::string ciecStringToStdString(const CIEC_STRING &pa_DataInput);
-    CIEC_STRING stdStringToCiecString(const std::string &pa_inputString);
-
-  protected:
-    virtual void run();
-
-};
-
-#endif /* CROSMANAGER_H_ */
diff --git a/src/modules/ros/ServiceCallManager.cpp b/src/modules/ros/ServiceCallManager.cpp
deleted file mode 100644
index 9ac864b..0000000
--- a/src/modules/ros/ServiceCallManager.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ServiceCallManager.h"
-#include "TRIGGER_SERVICE_CLIENT.h"
-#include <ros/ros.h>
-#include <std_srvs/Trigger.h>
-
-//TODO add locking for the vector..
-
-DEFINE_HANDLER(CServiceCallManager);
-
-CServiceCallManager::CServiceCallManager(CDeviceExecution& paDeviceExecution) : CExternalEventHandler(paDeviceExecution),
-    CThread(/* long stacksize , 3500*/){
-  start();
-}
-
-CServiceCallManager::~CServiceCallManager(){
-  end();
-}
-
-void CServiceCallManager::enableHandler(){
-}
-
-void CServiceCallManager::disableHandler(){
-  ros::shutdown();
-}
-
-void CServiceCallManager::setPriority(int){
-}
-
-int CServiceCallManager::getPriority() const{
-  return 0;
-}
-
-void CServiceCallManager::startChain(CEventSourceFB *pa_poECStartF){
-  if(0 != pa_poECStartF){
-    startNewEventChain(pa_poECStartF);
-  }
-}
-
-void CServiceCallManager::queueServiceCall(FORTE_TRIGGER_SERVICE_CLIENT* pa_serviceClientPtr){
-  m_callerVector.push_back(pa_serviceClientPtr);
-}
-
-void CServiceCallManager::queueConnectWait(FORTE_TRIGGER_SERVICE_CLIENT* pa_serviceClientPtr){
-  m_connectVector.push_back(pa_serviceClientPtr);
-}
-
-void CServiceCallManager::run(){
-  while(isAlive() && ros::ok()){
-
-    if(!m_connectVector.empty()){
-      m_connectVector.front()->waitForServer();
-      m_connectVector.erase(m_connectVector.begin());
-    }
-
-    if(!m_callerVector.empty()){
-      m_callerVector.front()->callService();
-      m_callerVector.erase(m_callerVector.begin());
-    }
-    //TODO maybe sleep for a small amount of time?
-    //this.waitfor(std::chrono::milliseconds(1));
-    //this.sleepfor();
-  }
-}
diff --git a/src/modules/ros/ServiceCallManager.h b/src/modules/ros/ServiceCallManager.h
deleted file mode 100644
index 85b76ad..0000000
--- a/src/modules/ros/ServiceCallManager.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef CSERVICECALLMANAGER_H
-#define CSERVICECALLMANAGER_H
-
-#include <esfb.h>
-#include <extevhan.h>
-#include <forte_thread.h>
-
-#include <vector>
-
-class FORTE_TRIGGER_SERVICE_CLIENT;
-
-class CServiceCallManager : public CExternalEventHandler, private CThread{
-  DECLARE_HANDLER(CServiceCallManager)
-
-  private:
-    std::vector<FORTE_TRIGGER_SERVICE_CLIENT*> m_callerVector;
-    std::vector<FORTE_TRIGGER_SERVICE_CLIENT*> m_connectVector;
-
-  public:
-    virtual void enableHandler();
-    virtual void disableHandler();
-    virtual void setPriority(int pa_prio);
-    virtual int getPriority() const;
-
-    void startChain(CEventSourceFB* pa_poECStartF);
-    void queueServiceCall(FORTE_TRIGGER_SERVICE_CLIENT* pa_serviceClientPtr);
-    void queueConnectWait(FORTE_TRIGGER_SERVICE_CLIENT* pa_serviceClientPtr);
-
-  protected:
-    virtual void run();
-
-};
-
-#endif
diff --git a/src/modules/ros/TRIGGER_SERVICE_CLIENT.cpp b/src/modules/ros/TRIGGER_SERVICE_CLIENT.cpp
deleted file mode 100644
index cb7603f..0000000
--- a/src/modules/ros/TRIGGER_SERVICE_CLIENT.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ServiceCallManager.h"
-#include "ROSManager.h"
-#include <extevhandlerhelper.h>
-
-#include "TRIGGER_SERVICE_CLIENT.h"
-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP
-#include "TRIGGER_SERVICE_CLIENT_gen.cpp"
-#endif
-
-DEFINE_FIRMWARE_FB(FORTE_TRIGGER_SERVICE_CLIENT, g_nStringIdTRIGGER_SERVICE_CLIENT)
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdNAMESPACE, g_nStringIdSRVNAME };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdSTATUS, g_nStringIdSUCCESS, g_nStringIdMESSAGE };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdSTRING };
-
-const TForteInt16 FORTE_TRIGGER_SERVICE_CLIENT::scm_anEIWithIndexes[] = { 0, 4 };
-const TDataIOID FORTE_TRIGGER_SERVICE_CLIENT::scm_anEIWith[] = { 0, 1, 2, 255, 0, 255 };
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdREQ };
-
-const TDataIOID FORTE_TRIGGER_SERVICE_CLIENT::scm_anEOWith[] = { 0, 1, 255, 0, 1, 2, 3, 255 };
-const TForteInt16 FORTE_TRIGGER_SERVICE_CLIENT::scm_anEOWithIndexes[] = { 0, 3, -1 };
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_CLIENT::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdCNF };
-
-const SFBInterfaceSpec FORTE_TRIGGER_SERVICE_CLIENT::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 3, scm_anDataInputNames, scm_anDataInputTypeIds, 4, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };
-
-void FORTE_TRIGGER_SERVICE_CLIENT::executeEvent(int pa_nEIID){
-  switch (pa_nEIID){
-    case scm_nEventINITID:
-      //initiate
-      if(!m_Initiated && QI()){
-        setEventChainExecutor(m_poInvokingExecEnv);
-        m_RosNamespace = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(NAMESPACE());
-        m_RosMsgName = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(SRVNAME());
-        m_nh = new ros::NodeHandle(m_RosNamespace);
-        m_triggerClient = m_nh->serviceClient < std_srvs::Trigger > (m_RosMsgName);
-        STATUS() = "Client waits for server";
-
-        getExtEvHandler<CServiceCallManager>(*this).queueConnectWait(this);
-      }
-      //terminate
-      else if(m_Initiated && !QI()){
-        m_nh->shutdown();
-        STATUS() = "Client terminated";
-        QO() = false;
-        m_Initiated = false;
-        sendOutputEvent(scm_nEventINITOID);
-      }
-      //silently ignore other cases
-      else{
-        STATUS() = "Unknown init command sequence";
-        sendOutputEvent(scm_nEventINITOID);
-      }
-      break;
-    case scm_nEventREQID:
-      //call service
-      if(m_Initiated && QI()){
-        STATUS() = "Request sent";
-        //add to queue
-        getExtEvHandler<CServiceCallManager>(*this).queueServiceCall(this);
-      }
-      //uninitialized or REQ-
-      else{
-        STATUS() = "Sending request not possible";
-        QO() = false;
-        sendOutputEvent(scm_nEventCNFID);
-      }
-      break;
-    case cg_nExternalEventID:
-      //waitForExistence returned
-      if(!m_Initiated){
-        m_Initiated = true;
-        STATUS() = "Client connected to server";
-        QO() = true;
-        sendOutputEvent(scm_nEventINITOID);
-      }
-      //call returned
-      else{
-        sendOutputEvent(scm_nEventCNFID);
-      }
-      break;
-  }
-}
-
-void FORTE_TRIGGER_SERVICE_CLIENT::callService(){
-  bool srv_success = m_triggerClient.call(m_srv);
-
-  SUCCESS() = m_srv.response.success;
-  MESSAGE() = getExtEvHandler<CROSManager>(*this).stdStringToCiecString(m_srv.response.message);
-
-  if(srv_success){
-    QO() = true;
-    STATUS() = "Response received";
-  }
-  else{
-    QO() = false;
-    STATUS() = "Receiving response failed";
-    SUCCESS() = false;
-    MESSAGE() = "failed";
-  }
-  getExtEvHandler<CServiceCallManager>(*this).startChain(this);
-}
-
-void FORTE_TRIGGER_SERVICE_CLIENT::waitForServer(){
-
-  if (!m_triggerClient.waitForExistence()){
-    DEVLOG_ERROR("[FORTE_TRIGGER_SERVICE_CLIENT] connection failed. Server not existing. \n");
-  }
-  else {
-    getExtEvHandler<CServiceCallManager>(*this).startChain(this);
-  }
-}
diff --git a/src/modules/ros/TRIGGER_SERVICE_CLIENT.h b/src/modules/ros/TRIGGER_SERVICE_CLIENT.h
deleted file mode 100644
index 565774c..0000000
--- a/src/modules/ros/TRIGGER_SERVICE_CLIENT.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#ifndef _TRIGGER_SERVICE_CLIENT_H_
-#define _TRIGGER_SERVICE_CLIENT_H_
-
-#include <esfb.h>
-#include <forte_bool.h>
-#include <forte_string.h>
-#include <ros/ros.h>
-#include <std_srvs/Trigger.h>
-
-class CServiceCallManager;
-
-// cppcheck-suppress noConstructor
-class FORTE_TRIGGER_SERVICE_CLIENT : public CEventSourceFB{
-  DECLARE_FIRMWARE_FB(FORTE_TRIGGER_SERVICE_CLIENT)
-
-  private:
-
-    bool m_Initiated;
-    ros::NodeHandle* m_nh;
-    std::string m_RosNamespace;
-    std::string m_RosMsgName;
-
-    static const CStringDictionary::TStringId scm_anDataInputNames[];
-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];
-    CIEC_BOOL &QI(){
-      return *static_cast<CIEC_BOOL*>(getDI(0));
-    }
-    ;
-
-    CIEC_STRING &NAMESPACE(){
-      return *static_cast<CIEC_STRING*>(getDI(1));
-    }
-    ;
-
-    CIEC_STRING &SRVNAME(){
-      return *static_cast<CIEC_STRING*>(getDI(2));
-    }
-    ;
-
-    static const CStringDictionary::TStringId scm_anDataOutputNames[];
-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];
-    CIEC_BOOL &QO(){
-      return *static_cast<CIEC_BOOL*>(getDO(0));
-    }
-    ;
-
-    CIEC_STRING &STATUS(){
-      return *static_cast<CIEC_STRING*>(getDO(1));
-    }
-    ;
-
-    CIEC_BOOL &SUCCESS(){
-      return *static_cast<CIEC_BOOL*>(getDO(2));
-    }
-    ;
-
-    CIEC_STRING &MESSAGE(){
-      return *static_cast<CIEC_STRING*>(getDO(3));
-    }
-    ;
-
-    static const TEventID scm_nEventINITID = 0;
-    static const TEventID scm_nEventREQID = 1;
-    static const TForteInt16 scm_anEIWithIndexes[];
-    static const TDataIOID scm_anEIWith[];
-    static const CStringDictionary::TStringId scm_anEventInputNames[];
-
-    static const TEventID scm_nEventINITOID = 0;
-    static const TEventID scm_nEventCNFID = 1;
-    static const TForteInt16 scm_anEOWithIndexes[];
-    static const TDataIOID scm_anEOWith[];
-    static const CStringDictionary::TStringId scm_anEventOutputNames[];
-
-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;
-
-    FORTE_FB_DATA_ARRAY(2, 3, 4, 0)
-    ;
-
-    void executeEvent(int pa_nEIID);
-
-  public:
-    ros::ServiceClient m_triggerClient;
-    std_srvs::Trigger m_srv;
-
-    void callService();
-    void waitForServer();
-
-    // cppcheck-suppress noConstructor
-    EVENT_SOURCE_FUNCTION_BLOCK_CTOR(FORTE_TRIGGER_SERVICE_CLIENT), m_Initiated(false) , m_RosNamespace(""), m_RosMsgName(""){
-    };
-
-    virtual ~FORTE_TRIGGER_SERVICE_CLIENT(){};
-
-  };
-
-#endif //close the ifdef sequence from the beginning of the file
diff --git a/src/modules/ros/TRIGGER_SERVICE_SERVER.cpp b/src/modules/ros/TRIGGER_SERVICE_SERVER.cpp
deleted file mode 100644
index 4b558ae..0000000
--- a/src/modules/ros/TRIGGER_SERVICE_SERVER.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 - 2017 fortiss GmbH
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- *    Ben Schneider
- *      - initial implementation and documentation
- *******************************************************************************/
-
-#include "ROSManager.h"
-#include <ros/ros.h>
-#include <extevhandlerhelper.h>
-
-#include "TRIGGER_SERVICE_SERVER.h"
-#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP
-#include "TRIGGER_SERVICE_SERVER_gen.cpp"
-#endif
-
-DEFINE_FIRMWARE_FB(FORTE_TRIGGER_SERVICE_SERVER, g_nStringIdTRIGGER_SERVICE_SERVER)
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anDataInputNames[] = { g_nStringIdQI, g_nStringIdNAMESPACE, g_nStringIdSRVNAME, g_nStringIdSUCCESS, g_nStringIdMESSAGE };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anDataInputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING, g_nStringIdSTRING, g_nStringIdBOOL, g_nStringIdSTRING };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anDataOutputNames[] = { g_nStringIdQO, g_nStringIdSTATUS };
-
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anDataOutputTypeIds[] = { g_nStringIdBOOL, g_nStringIdSTRING };
-
-const TForteInt16 FORTE_TRIGGER_SERVICE_SERVER::scm_anEIWithIndexes[] = { 0, 4 };
-const TDataIOID FORTE_TRIGGER_SERVICE_SERVER::scm_anEIWith[] = { 0, 1, 2, 255, 0, 3, 4, 255 };
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anEventInputNames[] = { g_nStringIdINIT, g_nStringIdRSP };
-
-const TDataIOID FORTE_TRIGGER_SERVICE_SERVER::scm_anEOWith[] = { 0, 1, 255, 0, 1, 255 };
-const TForteInt16 FORTE_TRIGGER_SERVICE_SERVER::scm_anEOWithIndexes[] = { 0, 3, -1 };
-const CStringDictionary::TStringId FORTE_TRIGGER_SERVICE_SERVER::scm_anEventOutputNames[] = { g_nStringIdINITO, g_nStringIdIND };
-
-const SFBInterfaceSpec FORTE_TRIGGER_SERVICE_SERVER::scm_stFBInterfaceSpec = { 2, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes, 2, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 5, scm_anDataInputNames, scm_anDataInputTypeIds, 2, scm_anDataOutputNames, scm_anDataOutputTypeIds, 0, 0 };
-
-void FORTE_TRIGGER_SERVICE_SERVER::executeEvent(int pa_nEIID){
-  switch (pa_nEIID){
-    case scm_nEventINITID:
-      //initiate
-      if(!m_Initiated && QI()){
-
-        m_RosNamespace = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(NAMESPACE());
-        m_RosMsgName = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(SRVNAME());
-        m_nh = new ros::NodeHandle(m_RosNamespace);
-        m_triggerServer = m_nh->advertiseService < FORTE_TRIGGER_SERVICE_SERVER > (m_RosMsgName, &FORTE_TRIGGER_SERVICE_SERVER::triggerCallback, const_cast<FORTE_TRIGGER_SERVICE_SERVER*>(this));
-        m_Initiated = true;
-        STATUS() = "Server initiated";
-        QO() = true;
-      }
-      //terminate
-      else if(m_Initiated && !QI()){
-        m_nh->shutdown();
-        STATUS() = "Server terminated";
-        QO() = false;
-      }
-      else{
-        STATUS() = "initiation or termination failed";
-        QO() = false;
-      }
-      sendOutputEvent(scm_nEventINITOID);
-      break;
-
-    case scm_nEventRSPID:
-      STATUS() = "Processing service request finished";
-      m_ResponseAvailable = true;
-      break;
-
-    case cg_nExternalEventID:
-      QO() = true;
-      sendOutputEvent(scm_nEventINDID);
-      break;
-  }
-}
-
-//TODO use or delete first parameter
-bool FORTE_TRIGGER_SERVICE_SERVER::triggerCallback(std_srvs::Trigger::Request &, std_srvs::Trigger::Response &pa_resp){
-  setEventChainExecutor(m_poInvokingExecEnv);
-  getExtEvHandler<CROSManager>(*this).startChain(this);
-
-  // is a response available
-  ros::Rate r(2); //1Hz
-  while(!m_ResponseAvailable){
-    r.sleep();
-  }
-
-  //write response
-  pa_resp.success = SUCCESS();
-  pa_resp.message = getExtEvHandler<CROSManager>(*this).ciecStringToStdString(MESSAGE());
-
-  m_ResponseAvailable = false;
-
-  return true;
-}
diff --git a/src/modules/ros/TRIGGER_SERVICE_SERVER.h b/src/modules/ros/TRIGGER_SERVICE_SERVER.h
deleted file mode 100644
index 8ec3ed3..0000000
--- a/src/modules/ros/TRIGGER_SERVICE_SERVER.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2016 - 2017 fortiss GmbH

- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0

- *

- * Contributors:

- *    Ben Schneider

- *      - initial implementation and documentation

- *******************************************************************************/

-

-#ifndef _TRIGGER_SERVICE_SERVER_H_

-#define _TRIGGER_SERVICE_SERVER_H_

-

-#include <esfb.h>

-#include <forte_bool.h>

-#include <forte_string.h>

-

-#include <std_srvs/Trigger.h>

-#include <string>

-

-// cppcheck-suppress noConstructor

-class FORTE_TRIGGER_SERVICE_SERVER : public CEventSourceFB{

-  DECLARE_FIRMWARE_FB(FORTE_TRIGGER_SERVICE_SERVER)

-

-  private:

-

-    bool m_Initiated;

-    ros::NodeHandle* m_nh;

-    ros::ServiceServer m_triggerServer;

-    std_srvs::Trigger m_srv;

-    std::string m_RosNamespace;

-    std::string m_RosMsgName;

-    bool m_ResponseAvailable;

-

-    static const CStringDictionary::TStringId scm_anDataInputNames[];

-    static const CStringDictionary::TStringId scm_anDataInputTypeIds[];

-    CIEC_BOOL &QI(){

-      return *static_cast<CIEC_BOOL*>(getDI(0));

-    }

-    ;

-

-    CIEC_STRING &NAMESPACE(){

-      return *static_cast<CIEC_STRING*>(getDI(1));

-    }

-    ;

-

-    CIEC_STRING &SRVNAME(){

-      return *static_cast<CIEC_STRING*>(getDI(2));

-    }

-    ;

-

-    CIEC_BOOL &SUCCESS(){

-      return *static_cast<CIEC_BOOL*>(getDI(3));

-    }

-    ;

-

-    CIEC_STRING &MESSAGE(){

-      return *static_cast<CIEC_STRING*>(getDI(4));

-    }

-    ;

-

-    static const CStringDictionary::TStringId scm_anDataOutputNames[];

-    static const CStringDictionary::TStringId scm_anDataOutputTypeIds[];

-    CIEC_BOOL &QO(){

-      return *static_cast<CIEC_BOOL*>(getDO(0));

-    }

-    ;

-

-    CIEC_STRING &STATUS(){

-      return *static_cast<CIEC_STRING*>(getDO(1));

-    }

-    ;

-

-    static const TEventID scm_nEventINITID = 0;

-    static const TEventID scm_nEventRSPID = 1;

-    static const TForteInt16 scm_anEIWithIndexes[];

-    static const TDataIOID scm_anEIWith[];

-    static const CStringDictionary::TStringId scm_anEventInputNames[];

-

-    static const TEventID scm_nEventINITOID = 0;

-    static const TEventID scm_nEventINDID = 1;

-    static const TForteInt16 scm_anEOWithIndexes[];

-    static const TDataIOID scm_anEOWith[];

-    static const CStringDictionary::TStringId scm_anEventOutputNames[];

-

-    static const SFBInterfaceSpec scm_stFBInterfaceSpec;

-

-    FORTE_FB_DATA_ARRAY(2, 5, 2, 0)

-    ;

-

-    void executeEvent(int pa_nEIID);

-

-    bool triggerCallback(std_srvs::Trigger::Request &pa_req, std_srvs::Trigger::Response &pa_resp);

-

-  public:

-    // cppcheck-suppress noConstructor

-    EVENT_SOURCE_FUNCTION_BLOCK_CTOR(FORTE_TRIGGER_SERVICE_SERVER), m_Initiated(false), m_RosNamespace(""), m_RosMsgName(""), m_ResponseAvailable(false){

-    };

-

-    virtual ~FORTE_TRIGGER_SERVICE_SERVER(){};

-  };

-

-#endif //close the ifdef sequence from the beginning of the file

diff --git a/src/modules/utils/E_STOPWATCH.h b/src/modules/utils/E_STOPWATCH.h
index 6289811..ac06bd9 100644
--- a/src/modules/utils/E_STOPWATCH.h
+++ b/src/modules/utils/E_STOPWATCH.h
@@ -78,7 +78,7 @@
        CBasicFB(pa_poSrcRes, &scm_stFBInterfaceSpec, pa_nInstanceNameId, &scm_stInternalVars, m_anFBConnData, m_anFBVarsData) {
   };
 
-  virtual ~FORTE_E_STOPWATCH() = default;
+  virtual ~FORTE_E_STOPWATCH() {};
 };
 
 #endif // _E_STOPWATCH_H_
diff --git a/src/modules/utils/GET_AT_INDEX.cpp b/src/modules/utils/GET_AT_INDEX.cpp
index df97c3a..76588d7 100644
--- a/src/modules/utils/GET_AT_INDEX.cpp
+++ b/src/modules/utils/GET_AT_INDEX.cpp
@@ -48,11 +48,11 @@
     if(CIEC_ANY::e_ARRAY == IN_ARRAY().getDataTypeID()){
       CIEC_ARRAY &rInArray = static_cast<CIEC_ARRAY&>(IN_ARRAY());
       //check if data types match
-      if(rInArray.getElementDataTypeID() == OUT().getDataTypeID()){
+      if(rInArray.getElementDataTypeID() == st_OUT().getDataTypeID()){
         //now check array length of input array
         if(INDEX() < rInArray.size()){
           //update the output value
-          OUT().setValue(*rInArray[INDEX()]);
+          st_OUT().setValue(*rInArray[INDEX()]);
           QO() = true;
         }
         else{
diff --git a/src/modules/utils/GET_AT_INDEX.h b/src/modules/utils/GET_AT_INDEX.h
index ba6cecc..c4401ee 100644
--- a/src/modules/utils/GET_AT_INDEX.h
+++ b/src/modules/utils/GET_AT_INDEX.h
@@ -35,7 +35,7 @@
     return *static_cast<CIEC_BOOL*>(getDO(0));
   };
 

-  CIEC_ANY &OUT() {

+  CIEC_ANY &st_OUT() {

     return *static_cast<CIEC_ANY*>(getDO(1));
   };
 

diff --git a/src/modules/utils/OUT_ANY_CONSOLE.cpp b/src/modules/utils/OUT_ANY_CONSOLE.cpp
index b7e86e0..4ce297a 100644
--- a/src/modules/utils/OUT_ANY_CONSOLE.cpp
+++ b/src/modules/utils/OUT_ANY_CONSOLE.cpp
@@ -60,18 +60,18 @@
       char strbuf1[scm_maxStringBufSize];
       LABEL().toString(strbuf1, sizeof(strbuf1));
 
-      if(IN().getDataTypeID() == CIEC_ANY::e_STRING || IN().getDataTypeID() == CIEC_ANY::e_WSTRING){
+      if(st_IN().getDataTypeID() == CIEC_ANY::e_STRING || st_IN().getDataTypeID() == CIEC_ANY::e_WSTRING){
         //obtain length of string value
-        nStringLength = (static_cast<CIEC_ANY_STRING*>(&IN()))->length();
+        nStringLength = (static_cast<CIEC_ANY_STRING*>(&st_IN()))->length();
         //assign value
-        sOutput.assign((static_cast<CIEC_ANY_STRING*>(&IN()))->getValue(), nStringLength);
+        sOutput.assign((static_cast<CIEC_ANY_STRING*>(&st_IN()))->getValue(), nStringLength);
       }
       else{
         //values other than strings
         //for arrays
-        if(IN().getDataTypeID() == CIEC_ANY::e_ARRAY){
+        if(st_IN().getDataTypeID() == CIEC_ANY::e_ARRAY){
           //get number of array elements
-          TForteUInt16 nArrayElements = (static_cast<CIEC_ARRAY*>(&IN()))->size();
+          TForteUInt16 nArrayElements = (static_cast<CIEC_ARRAY*>(&st_IN()))->size();
           //number of required bytes (including brackets '[' ']' and ',' separators
           nRequiredBytes = static_cast<TForteUInt16>(nArrayElements * scm_maxStringBufSize +  nArrayElements + 1);
         }
@@ -82,7 +82,7 @@
 
         sOutput.reserve(nRequiredBytes);
         //write StringValue
-        nUsedBytes = static_cast<TForteUInt16>(IN().toString(sOutput.getValue(), nRequiredBytes));
+        nUsedBytes = static_cast<TForteUInt16>(st_IN().toString(sOutput.getValue(), nRequiredBytes));
         //maintain the state of the output data value string
         sOutput.assign(sOutput.getValue(), nUsedBytes);
       }
diff --git a/src/modules/utils/OUT_ANY_CONSOLE.h b/src/modules/utils/OUT_ANY_CONSOLE.h
index 0a4a687..a24193c 100644
--- a/src/modules/utils/OUT_ANY_CONSOLE.h
+++ b/src/modules/utils/OUT_ANY_CONSOLE.h
@@ -31,7 +31,7 @@
   }

   ;

 

-  CIEC_ANY &IN() {

+  CIEC_ANY &st_IN() {

     return *static_cast<CIEC_ANY*>(getDI(2));

   }

   ;

diff --git a/src/stdfblib/io/IB.h b/src/stdfblib/io/IB.h
index fddcf2b..1ccc6c4 100644
--- a/src/stdfblib/io/IB.h
+++ b/src/stdfblib/io/IB.h
@@ -15,16 +15,6 @@
 
 #include <processinterface.h>
 
-#ifdef IN
-// cppcheck-suppress ConfigurationNotChecked
-#undef IN
-#endif
-
-#ifdef OUT
-// cppcheck-suppress ConfigurationNotChecked
-#undef OUT
-#endif
-
 class FORTE_IB: public CProcessInterface{
   DECLARE_FIRMWARE_FB(FORTE_IB)
 
@@ -49,7 +39,7 @@
     return *static_cast<CIEC_STRING*>(getDO(1));
   };
 
-  CIEC_BYTE &IN() {
+  CIEC_BYTE &st_IN() {
     return *static_cast<CIEC_BYTE*>(getDO(2));
   };
 
diff --git a/src/stdfblib/io/ID.h b/src/stdfblib/io/ID.h
index 2be549b..69bea01 100644
--- a/src/stdfblib/io/ID.h
+++ b/src/stdfblib/io/ID.h
@@ -16,14 +16,6 @@
 

 #include <processinterface.h>

 

-#ifdef IN

-#undef IN

-#endif

-

-#ifdef OUT

-#undef OUT

-#endif

-

 /*! /brief generic class for IW function blocks providing access to one word physical input

  *

  * In order that this FB can be used implementations need to provide a class CProcessInterface

@@ -69,7 +61,7 @@
     return *static_cast<CIEC_STRING*>(getDO(1));

   };

 

-  CIEC_DWORD &IN() {

+  CIEC_DWORD &st_IN() {

     return *static_cast<CIEC_DWORD*>(getDO(2));

   };

 

diff --git a/src/stdfblib/io/IL.h b/src/stdfblib/io/IL.h
index 28bd44a..1be4bc7 100644
--- a/src/stdfblib/io/IL.h
+++ b/src/stdfblib/io/IL.h
@@ -15,14 +15,6 @@
 
 #include <processinterface.h>
 
-#ifdef IN
-#undef IN
-#endif
-
-#ifdef OUT
-#undef OUT
-#endif
-
 class FORTE_IL: public CProcessInterface{
   DECLARE_FIRMWARE_FB(FORTE_IL)
 
@@ -47,7 +39,7 @@
     return *static_cast<CIEC_STRING*>(getDO(1));
   };
 
-  CIEC_LWORD &IN() {
+  CIEC_LWORD &st_IN() {
     return *static_cast<CIEC_LWORD*>(getDO(2));
   };
 
diff --git a/src/stdfblib/io/IW.h b/src/stdfblib/io/IW.h
index 97392fe..847cbed 100644
--- a/src/stdfblib/io/IW.h
+++ b/src/stdfblib/io/IW.h
@@ -15,13 +15,6 @@
 

 #include <processinterface.h>

 

-#ifdef IN

-#undef IN

-#endif

-

-#ifdef OUT

-#undef OUT

-#endif

 

 /*! /brief generic class for IW function blocks providing access to one word physical input

  *

@@ -68,7 +61,7 @@
     return *static_cast<CIEC_STRING*>(getDO(1));

   };

 

-  CIEC_WORD &IN() {

+  CIEC_WORD &st_IN() {

     return *static_cast<CIEC_WORD*>(getDO(2));

   };

 

diff --git a/src/stdfblib/io/IX.h b/src/stdfblib/io/IX.h
index e61b1ab..8866d4f 100644
--- a/src/stdfblib/io/IX.h
+++ b/src/stdfblib/io/IX.h
@@ -14,13 +14,6 @@
 

 #include <processinterface.h>

 

-#ifdef IN

-#undef IN

-#endif

-

-#ifdef OUT

-#undef OUT

-#endif

 

 /*! /brief generic class for IX function blocks providing access to one boolean physical input

  *

@@ -67,7 +60,7 @@
     return *static_cast<CIEC_STRING*>(getDO(1));

   };

 

-  CIEC_BOOL &IN() {

+  CIEC_BOOL &st_IN() {

     return *static_cast<CIEC_BOOL*>(getDO(2));

   };

 

diff --git a/src/stdfblib/io/QB.h b/src/stdfblib/io/QB.h
index a065444..bc723fd 100644
--- a/src/stdfblib/io/QB.h
+++ b/src/stdfblib/io/QB.h
@@ -15,13 +15,6 @@
 
 #include <processinterface.h>
 
-#ifdef IN
-#undef IN
-#endif
-
-#ifdef OUT
-#undef OUT
-#endif
 
 class FORTE_QB: public CProcessInterface{
   DECLARE_FIRMWARE_FB(FORTE_QB)
@@ -37,7 +30,7 @@
     return *static_cast<CIEC_STRING*>(getDI(1));
   };
 
-  CIEC_BYTE &OUT() {
+  CIEC_BYTE &st_OUT() {
     return *static_cast<CIEC_BYTE*>(getDI(2));
   };
 
diff --git a/src/stdfblib/io/QD.h b/src/stdfblib/io/QD.h
index 101779c..b0766b5 100644
--- a/src/stdfblib/io/QD.h
+++ b/src/stdfblib/io/QD.h
@@ -16,13 +16,6 @@
 

 #include <processinterface.h>

 

-#ifdef IN

-#undef IN

-#endif

-

-#ifdef OUT

-#undef OUT

-#endif

 

 /*! /brief generic class for QW function blocks providing access to one word physical output

  *

@@ -59,7 +52,7 @@
     return *static_cast<CIEC_STRING*>(getDI(1));

   };

 

-  CIEC_DWORD &OUT() {

+  CIEC_DWORD &st_OUT() {

     return *static_cast<CIEC_DWORD*>(getDI(2));

   };

 

diff --git a/src/stdfblib/io/QL.h b/src/stdfblib/io/QL.h
index b800823..9e11de1 100644
--- a/src/stdfblib/io/QL.h
+++ b/src/stdfblib/io/QL.h
@@ -15,13 +15,6 @@
 
 #include <processinterface.h>
 
-#ifdef IN
-#undef IN
-#endif
-
-#ifdef OUT
-#undef OUT
-#endif
 
 class FORTE_QL: public CProcessInterface{
   DECLARE_FIRMWARE_FB(FORTE_QL)
@@ -37,7 +30,7 @@
     return *static_cast<CIEC_STRING*>(getDI(1));
   };
 
-  CIEC_LWORD &OUT() {
+  CIEC_LWORD &st_OUT() {
     return *static_cast<CIEC_LWORD*>(getDI(2));
   };
 
diff --git a/src/stdfblib/io/QW.h b/src/stdfblib/io/QW.h
index 602b83f..4fc55f0 100644
--- a/src/stdfblib/io/QW.h
+++ b/src/stdfblib/io/QW.h
@@ -15,13 +15,6 @@
 

 #include <processinterface.h>

 

-#ifdef IN

-#undef IN

-#endif

-

-#ifdef OUT

-#undef OUT

-#endif

 

 /*! /brief generic class for QW function blocks providing access to one word physical output

  *

@@ -58,7 +51,7 @@
     return *static_cast<CIEC_STRING*>(getDI(1));

   };

 

-  CIEC_WORD &OUT() {

+  CIEC_WORD &st_OUT() {

     return *static_cast<CIEC_WORD*>(getDI(2));

   };

 

diff --git a/src/stdfblib/io/QX.h b/src/stdfblib/io/QX.h
index 1191005..9b548b7 100644
--- a/src/stdfblib/io/QX.h
+++ b/src/stdfblib/io/QX.h
@@ -14,13 +14,6 @@
 
 #include <processinterface.h>
 
-#ifdef IN
-#undef IN
-#endif
-
-#ifdef OUT
-#undef OUT
-#endif
 
 /*! /brief generic class for QX function blocks providing access to one boolean physical output
  *
@@ -57,7 +50,7 @@
     return *static_cast<CIEC_STRING*>(getDI(1));
   };
 
-  CIEC_BOOL &OUT() {
+  CIEC_BOOL &st_OUT() {
     return *static_cast<CIEC_BOOL*>(getDI(2));
   };
 
diff --git a/src/stdfblib/ita/DEV_MGR.cpp b/src/stdfblib/ita/DEV_MGR.cpp
index 22e9543..929fc81 100644
--- a/src/stdfblib/ita/DEV_MGR.cpp
+++ b/src/stdfblib/ita/DEV_MGR.cpp
@@ -61,6 +61,10 @@
     if((true == QI()) && (false == QO())){
       //this is the first time init is called try to load a boot file
       ForteBootFileLoader loader(*this);
+      if(loader.needsExit()){
+        getResource().getDevice().changeFBExecutionState(cg_nMGM_CMD_Kill);
+        return;
+      }
       if(loader.isOpen() && LOAD_RESULT_OK == loader.loadBootFile()){
           DEVLOG_INFO("Bootfile correctly loaded\n");
       }
diff --git a/src/stdfblib/ita/ForteBootFileLoader.cpp b/src/stdfblib/ita/ForteBootFileLoader.cpp
index 13d1dc5..a37114a 100644
--- a/src/stdfblib/ita/ForteBootFileLoader.cpp
+++ b/src/stdfblib/ita/ForteBootFileLoader.cpp
@@ -21,7 +21,7 @@
 

 char* gCommandLineBootFile = 0;

 

-ForteBootFileLoader::ForteBootFileLoader(IBootFileCallback &paCallback) : mBootfile(0), mCallback(paCallback){

+ForteBootFileLoader::ForteBootFileLoader(IBootFileCallback &paCallback) : mBootfile(0), mCallback(paCallback), mNeedsExit(false){

   openBootFile();

 }

 

@@ -62,7 +62,7 @@
     else{

       if(0 != getenv("FORTE_BOOT_FILE_FAIL_MISSING")){

         DEVLOG_ERROR("Boot file %s could not be opened and FORTE_BOOT_FILE_FAIL_MISSING is set. Failing...\n", bootFileName.getValue());

-        exit(2);

+        mNeedsExit = true;

       }

       else{

         DEVLOG_INFO("Boot file %s could not be opened. Skipping...\n", bootFileName.getValue());

diff --git a/src/stdfblib/ita/ForteBootFileLoader.h b/src/stdfblib/ita/ForteBootFileLoader.h
index 24d2d3c..8b1be33 100644
--- a/src/stdfblib/ita/ForteBootFileLoader.h
+++ b/src/stdfblib/ita/ForteBootFileLoader.h
@@ -44,9 +44,14 @@
       return (0 != mBootfile);

     }

 

+    bool needsExit() const {

+      return mNeedsExit;

+    }

+

   private:

     FILE *mBootfile;

     IBootFileCallback &mCallback; //for now with one callback is enough for all cases

+    bool mNeedsExit;

 

     bool openBootFile();

     bool readLine(CIEC_STRING &line);