From cb9fe2a361430ad92a9057f96f6eaa8283b91cd6 Mon Sep 17 00:00:00 2001 From: Anders Sandstrom Date: Wed, 10 Mar 2021 15:42:02 +0100 Subject: [PATCH] Add comments --- .../ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp b/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp index ad1a6f0..06dd534 100644 --- a/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp +++ b/ecmc_plugin_socketcan/ecmc_plugin_socketcanApp/src/ecmcSocketCANWriteBuffer.cpp @@ -31,6 +31,9 @@ void f_worker_write(void *obj) { } /** ecmc ecmcSocketCANWriteBuffer class + * Implements writing of can messages to a socket. + * Two buffers are used. While a thread writes to socket from one of teh buffers, + * data can still be added to the other buffer. Then teh buffers are switched. */ ecmcSocketCANWriteBuffer::ecmcSocketCANWriteBuffer(int socketId, int cfgDbgMode) { memset(&buffer1_.frames,0,sizeof(struct can_frame)*ECMC_CAN_MAX_WRITE_CMDS);