Skip to content

Commit 329b231

Browse files
troglobitMartinMelikMerkumians
authored andcommitted
Configurable size of the Ethernet message buffer
This patch replaces the defunct OPENER_MESSAGE_DATA_REPLY_BUFFER with a new, OPENER_ prefixed, project option to configure the Ethernet message buffer max size. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 4b8177c commit 329b231

File tree

4 files changed

+4
-30
lines changed

4 files changed

+4
-30
lines changed

source/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ if (OPENER_IS_DLR_DEVICE)
5252
add_definitions(-DOPENER_IS_DLR_DEVICE)
5353
endif()
5454

55-
# The number of bytes used for the buffer that will be used for generating any reply data of messages.
55+
# This buffer size will be used for any received message.
56+
# The same buffer is used for the replied explicit message.
5657
# There are two uses in OpENer:
5758
# 1. Explicit messages will use this buffer to store the data generated by the request
5859
# 2. I/O Connections will use this buffer for the produced data
59-
set( OPENER_MESSAGE_DATA_REPLY_BUFFER "200" CACHE STRING "The number of bytes used for the reply message buffer")
60-
add_definitions(-DOPENER_MESSAGE_DATA_REPLY_BUFFER=${OPENER_MESSAGE_DATA_REPLY_BUFFER} )
60+
set( OPENER_ETHERNET_BUFFER_SIZE "512" CACHE STRING "Number of bytes used for the Ethernet message buffer")
61+
add_definitions(-DPC_OPENER_ETHERNET_BUFFER_SIZE=${OPENER_ETHERNET_BUFFER_SIZE} )
6162

6263
#######################################
6364
# Platform switches #

source/src/ports/MINGW/sample_application/opener_user_conf.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,4 @@ static const MilliSeconds kOpenerTimerTickInMilliSeconds = 10;
221221

222222
#endif /* ifndef OPENER_UNIT_TEST */
223223

224-
/** @brief The number of bytes used for the Ethernet message buffer on
225-
* the PC port. For different platforms it may makes sense to
226-
* have more than one buffer.
227-
*
228-
* This buffer size will be used for any received message.
229-
* The same buffer is used for the replied explicit message.
230-
*/
231-
#define PC_OPENER_ETHERNET_BUFFER_SIZE 512
232-
233224
#endif /*OPENER_USER_CONF_H_*/

source/src/ports/POSIX/sample_application/opener_user_conf.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,4 @@ static const MilliSeconds kOpenerTimerTickInMilliSeconds = 10;
248248

249249
#endif /* ifndef OPENER_UNIT_TEST */
250250

251-
/** @brief The number of bytes used for the Ethernet message buffer on
252-
* the PC port. For different platforms it may makes sense to
253-
* have more than one buffer.
254-
*
255-
* This buffer size will be used for any received message.
256-
* The same buffer is used for the replied explicit message.
257-
*/
258-
#define PC_OPENER_ETHERNET_BUFFER_SIZE 512
259-
260251
#endif /*OPENER_USER_CONF_H_*/

source/src/ports/WIN32/sample_application/opener_user_conf.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,4 @@ static const MilliSeconds kOpenerTimerTickInMilliSeconds = 10;
223223

224224
#endif /* ifndef OPENER_UNIT_TEST */
225225

226-
/** @brief The number of bytes used for the Ethernet message buffer on
227-
* the PC port. For different platforms it may makes sense to
228-
* have more than one buffer.
229-
*
230-
* This buffer size will be used for any received message.
231-
* The same buffer is used for the replied explicit message.
232-
*/
233-
#define PC_OPENER_ETHERNET_BUFFER_SIZE 512
234-
235226
#endif /*OPENER_USER_CONF_H_*/

0 commit comments

Comments
 (0)