Procházet zdrojové kódy

Merge pull request #265 from EIPStackGroup/Issue_264

Closes #264 Moves reply buffer length to CMake config
Martin Melik-Merkumians před 6 roky
rodič
revize
4165173ded

+ 3 - 0
source/CMakeLists.txt

@@ -45,6 +45,9 @@ if(OPENER_CONSUMED_DATA_HAS_RUN_IDLE_HEADER)
   add_definitions(-DOPENER_CONSUMED_DATA_HAS_RUN_IDLE_HEADER)
 endif()
 
+# The number of bytes used for the buffer that will be used for generating any reply data of messages. There are two uses in OpENer: 1. Explicit messages will use this buffer to store the data generated by the request 2. I/O Connections will use this buffer for the produced data"
+set( OPENER_MESSAGE_DATA_REPLY_BUFFER "100" CACHE STRING "The number of bytes used for the reply message buffer")
+add_definitions(-DOPENER_MESSAGE_DATA_REPLY_BUFFER=${OPENER_MESSAGE_DATA_REPLY_BUFFER} )
 
 #######################################
 # Platform switches                   #

+ 0 - 7
source/src/ports/MINGW/sample_application/opener_user_conf.h

@@ -71,13 +71,6 @@ typedef unsigned short in_port_t;
  */
 #define OPENER_CIP_NUM_LISTEN_ONLY_CONNS_PER_CON_PATH   3
 
-/** @brief The number of bytes used for the buffer that will be used for generating any
- *  reply data of messages. There are two uses in OpENer:
- *    1. Explicit messages will use this buffer to store the data generated by the request
- *    2. I/O Connections will use this buffer for the produced data
- */
-#define OPENER_MESSAGE_DATA_REPLY_BUFFER 100
-
 /** @brief Number of sessions that can be handled at the same time
  */
 #define OPENER_NUMBER_OF_SUPPORTED_SESSIONS 20

+ 0 - 7
source/src/ports/POSIX/sample_application/opener_user_conf.h

@@ -74,13 +74,6 @@
  */
 #define OPENER_CIP_NUM_LISTEN_ONLY_CONNS_PER_CON_PATH   3
 
-/** @brief The number of bytes used for the buffer that will be used for generating any
- *  reply data of messages. There are two uses in OpENer:
- *    1. Explicit messages will use this buffer to store the data generated by the request
- *    2. I/O Connections will use this buffer for the produced data
- */
-#define OPENER_MESSAGE_DATA_REPLY_BUFFER 100
-
 /** @brief Number of sessions that can be handled at the same time
  */
 #define OPENER_NUMBER_OF_SUPPORTED_SESSIONS 20

+ 0 - 7
source/src/ports/WIN32/sample_application/opener_user_conf.h

@@ -73,13 +73,6 @@ typedef unsigned short in_port_t;
  */
 #define OPENER_CIP_NUM_LISTEN_ONLY_CONNS_PER_CON_PATH   3
 
-/** @brief The number of bytes used for the buffer that will be used for generating any
- *  reply data of messages. There are two uses in OpENer:
- *    1. Explicit messages will use this buffer to store the data generated by the request
- *    2. I/O Connections will use this buffer for the produced data
- */
-#define OPENER_MESSAGE_DATA_REPLY_BUFFER 100
-
 /** @brief Number of sessions that can be handled at the same time
  */
 #define OPENER_NUMBER_OF_SUPPORTED_SESSIONS 20