From 78bfc9d0a5c99f169b30808c26d2409fa94ab659 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 10 Oct 2018 11:43:35 +0200 Subject: [PATCH] insignificant, renamed recieverInterface to have a capital letter in class name --- slsDetectorSoftware/CMakeLists.txt | 6 ++-- slsDetectorSoftware/Makefile | 4 +-- .../ReceiverInterface.cpp} | 28 +++++++++---------- .../ReceiverInterface.h} | 21 +++++--------- .../slsDetector/slsDetector.cpp | 4 +-- slsDetectorSoftware/slsDetector/slsDetector.h | 4 +-- 6 files changed, 30 insertions(+), 37 deletions(-) rename slsDetectorSoftware/{slsReceiverInterface/receiverInterface.cpp => ReceiverInterface/ReceiverInterface.cpp} (85%) rename slsDetectorSoftware/{slsReceiverInterface/receiverInterface.h => ReceiverInterface/ReceiverInterface.h} (89%) diff --git a/slsDetectorSoftware/CMakeLists.txt b/slsDetectorSoftware/CMakeLists.txt index 67da57b2d..c13083b0e 100644 --- a/slsDetectorSoftware/CMakeLists.txt +++ b/slsDetectorSoftware/CMakeLists.txt @@ -4,7 +4,7 @@ set(SOURCES slsDetector/slsDetectorUsers.cpp slsDetector/slsDetectorCommand.cpp slsDetector/slsDetector.cpp - slsReceiverInterface/receiverInterface.cpp + ReceiverInterface/ReceiverInterface.cpp ../slsSupportLib/include/utilities.cpp ) @@ -16,7 +16,7 @@ include_directories( multiSlsDetector sharedMemory slsDetector -slsReceiverInterface +ReceiverInterface ../slsSupportLib/include ) @@ -52,7 +52,7 @@ set(PUBLICHEADERS slsDetector/slsDetectorUsers.h slsDetector/detectorData.h multiSlsDetector/multiSlsDetector.h - slsReceiverInterface/receiverInterface.h + ReceiverInterface/ReceiverInterface.h ) set_target_properties(slsDetectorShared PROPERTIES LIBRARY_OUTPUT_NAME SlsDetector diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index 3e21793aa..71eae4559 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -9,14 +9,14 @@ CFLAGS= -g -DC_ONLY -fPIC DFLAGS= -g -DDACS_INT -INCLUDES?= -I../slsSupportLib/include -IslsDetector -ImultiSlsDetector -IslsReceiverInterface -IsharedMemory I$(ASM) +INCLUDES?= -I../slsSupportLib/include -IslsDetector -ImultiSlsDetector -IReceiverInterface -IsharedMemory I$(ASM) #EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom LIBZMQDIR = ../slsSupportLib/include LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq -SRC_CLNT= slsDetector/slsDetectorCommand.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp sharedMemory/SharedMemory.cpp ../slsSupportLib/include/utilities.cpp +SRC_CLNT= slsDetector/slsDetectorCommand.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp ReceiverInterface/ReceiverInterface.cpp slsDetector/slsDetectorUsers.cpp sharedMemory/SharedMemory.cpp ../slsSupportLib/include/utilities.cpp DEPSINCLUDES = ../slsSupportLib/include/sls_receiver_defs.h ../slsSupportLib/include/sls_receiver_funcs.h ../slsSupportLib/include/ansi.h ../slsSupportLib/include/sls_detector_defs.h ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/error_defs.h slsDetector/slsDetectorBase.h slsDetector/detectorData.h sharedMemory/SharedMemory.h ../slsSupportLib/include/sls_receiver_exceptions.h ../slsSupportLib/include/versionAPI.h ../slsSupportLib/include/utilities.h ../slsSupportLib/include/container_utils.h diff --git a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.cpp b/slsDetectorSoftware/ReceiverInterface/ReceiverInterface.cpp similarity index 85% rename from slsDetectorSoftware/slsReceiverInterface/receiverInterface.cpp rename to slsDetectorSoftware/ReceiverInterface/ReceiverInterface.cpp index 6173d4185..c9aa7d631 100644 --- a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.cpp +++ b/slsDetectorSoftware/ReceiverInterface/ReceiverInterface.cpp @@ -1,4 +1,4 @@ -#include "receiverInterface.h" +#include "ReceiverInterface.h" #include @@ -11,15 +11,15 @@ -receiverInterface::receiverInterface(MySocketTCP *socket):dataSocket(socket){} +ReceiverInterface::ReceiverInterface(MySocketTCP *socket):dataSocket(socket){} -receiverInterface::~receiverInterface(){} +ReceiverInterface::~ReceiverInterface(){} -int receiverInterface::sendString(int fnum, char retval[], char arg[]){ +int ReceiverInterface::sendString(int fnum, char retval[], char arg[]){ int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; memset(mess, 0, MAX_STR_LENGTH); @@ -39,7 +39,7 @@ int receiverInterface::sendString(int fnum, char retval[], char arg[]){ -int receiverInterface::sendUDPDetails(int fnum, char retval[], char arg[3][MAX_STR_LENGTH]){ +int ReceiverInterface::sendUDPDetails(int fnum, char retval[], char arg[3][MAX_STR_LENGTH]){ char args[3][MAX_STR_LENGTH]; int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; @@ -59,7 +59,7 @@ int receiverInterface::sendUDPDetails(int fnum, char retval[], char arg[3][MAX_S } -int receiverInterface::sendInt(int fnum, int &retval, int arg){ +int ReceiverInterface::sendInt(int fnum, int &retval, int arg){ int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; memset(mess, 0, MAX_STR_LENGTH); @@ -79,7 +79,7 @@ int receiverInterface::sendInt(int fnum, int &retval, int arg){ -int receiverInterface::getInt(int fnum, int &retval){ +int ReceiverInterface::getInt(int fnum, int &retval){ int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; memset(mess, 0, MAX_STR_LENGTH); @@ -98,7 +98,7 @@ int receiverInterface::getInt(int fnum, int &retval){ -int receiverInterface::sendInt(int fnum, int64_t &retval, int64_t arg){ +int ReceiverInterface::sendInt(int fnum, int64_t &retval, int64_t arg){ int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; memset(mess, 0, MAX_STR_LENGTH); @@ -118,7 +118,7 @@ int receiverInterface::sendInt(int fnum, int64_t &retval, int64_t arg){ -int receiverInterface::sendIntArray(int fnum, int64_t &retval, int64_t arg[2], char mess[]){ +int ReceiverInterface::sendIntArray(int fnum, int64_t &retval, int64_t arg[2], char mess[]){ int64_t args[2]; int ret = slsDetectorDefs::FAIL; memset(mess, 0, MAX_STR_LENGTH); @@ -138,7 +138,7 @@ int receiverInterface::sendIntArray(int fnum, int64_t &retval, int64_t arg[2], c -int receiverInterface::sendIntArray(int fnum, int &retval, int arg[2]){ +int ReceiverInterface::sendIntArray(int fnum, int &retval, int arg[2]){ int args[2]; int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; @@ -159,7 +159,7 @@ int receiverInterface::sendIntArray(int fnum, int &retval, int arg[2]){ -int receiverInterface::getInt(int fnum, int64_t &retval){ +int ReceiverInterface::getInt(int fnum, int64_t &retval){ int ret = slsDetectorDefs::FAIL; dataSocket->SendDataOnly(&fnum,sizeof(fnum)); @@ -170,7 +170,7 @@ int receiverInterface::getInt(int fnum, int64_t &retval){ } -int receiverInterface::getLastClientIP(int fnum, char retval[]){ +int ReceiverInterface::getLastClientIP(int fnum, char retval[]){ int ret = slsDetectorDefs::FAIL; dataSocket->SendDataOnly(&fnum,sizeof(fnum)); @@ -182,7 +182,7 @@ int receiverInterface::getLastClientIP(int fnum, char retval[]){ -int receiverInterface::executeFunction(int fnum,char mess[]){ +int ReceiverInterface::executeFunction(int fnum,char mess[]){ int ret = slsDetectorDefs::FAIL; memset(mess, 0, MAX_STR_LENGTH); @@ -198,7 +198,7 @@ int receiverInterface::executeFunction(int fnum,char mess[]){ -int receiverInterface::sendROI(int fnum, int n, slsReceiverDefs::ROI roiLimits[]) { +int ReceiverInterface::sendROI(int fnum, int n, slsReceiverDefs::ROI roiLimits[]) { int ret = slsDetectorDefs::FAIL; char mess[MAX_STR_LENGTH]; memset(mess, 0, MAX_STR_LENGTH); diff --git a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h b/slsDetectorSoftware/ReceiverInterface/ReceiverInterface.h similarity index 89% rename from slsDetectorSoftware/slsReceiverInterface/receiverInterface.h rename to slsDetectorSoftware/ReceiverInterface/ReceiverInterface.h index f188c8da8..28a6c4854 100644 --- a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h +++ b/slsDetectorSoftware/ReceiverInterface/ReceiverInterface.h @@ -1,23 +1,16 @@ +#pragma once - -#ifndef SLS_RECEIVER_INTERFACE_H -#define SLS_RECEIVER_INTERFACE_H - #include "sls_detector_defs.h" #include "MySocketTCP.h" - /** - * - * @short the slsReceiverInterface class is the interface between the sls detector and the sls receiver - * @author Dhanya Maliakal - * @version 0.1alpha + * @short the ReceiverInterface class is the interface between the client and the receiver */ -class receiverInterface{ +class ReceiverInterface{ public: @@ -25,13 +18,13 @@ public: * (default) constructor * @param socket tcp socket between client and receiver */ - receiverInterface(MySocketTCP *socket); + ReceiverInterface(MySocketTCP *socket); /** * destructor */ - virtual ~receiverInterface(); + virtual ~ReceiverInterface(); /** * Set the datasocket @@ -140,7 +133,7 @@ public: */ int sendROI(int fnum, int n, slsReceiverDefs::ROI roiLimits[]); - //here one should implement the funcs listed in + private: @@ -151,4 +144,4 @@ private: }; -#endif + diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 11900da9a..de92c003b 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2,7 +2,7 @@ #include "multiSlsDetector.h" #include "sls_receiver_exceptions.h" #include "SharedMemory.h" -#include "receiverInterface.h" +#include "ReceiverInterface.h" #include "gitInfoLib.h" #include "versionAPI.h" #include "slsDetectorCommand.h" @@ -590,7 +590,7 @@ void slsDetector::initializeMembers() { delete thisReceiver; thisReceiver = 0; } - thisReceiver = new receiverInterface(dataSocket); + thisReceiver = new ReceiverInterface(dataSocket); } diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 759ff8d8b..6b68e90ea 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -14,7 +14,7 @@ class multiSlsDetector; class SharedMemory; -class receiverInterface; +class ReceiverInterface; #define SLS_SHMVERSION 0x181005 #define NCHIPSMAX 10 @@ -1884,7 +1884,7 @@ private: sharedSlsDetector *thisDetector; /** receiver interface */ - receiverInterface *thisReceiver; + ReceiverInterface *thisReceiver; /** socket for control commands */ MySocketTCP *controlSocket;