mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 08:09:21 +01:00
Moved sls_detector_exceptions to sls_receiver_exceptions & its consequences
This commit is contained in:
@@ -69,7 +69,7 @@ set(PUBLICHEADERS
|
||||
include/MySocketTCP.h
|
||||
include/genericSocket.h
|
||||
include/logger.h
|
||||
|
||||
include/sls_receiver_exceptions.h
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
|
||||
|
||||
|
||||
SRC_CLNT = MySocketTCP.cpp ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp UDPInterface.cpp UDPBaseImplementation.cpp UDPStandardImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp utilities.cpp
|
||||
DEPSINCLUDES = $(INCDIR)/ansi.h $(INCDIR)/sls_receiver_defs.h $(INCDIR)/sls_receiver_funcs.h $(INCDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(INCDIR)/genericSocket.h $(INCDIR)/logger.h $(INCDIR)/receiver_defs.h $(INCDIR)/UDPInterface.h $(INCDIR)/utilities.h $(INCDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h
|
||||
DEPSINCLUDES = $(INCDIR)/ansi.h $(INCDIR)/sls_receiver_defs.h $(INCDIR)/sls_receiver_funcs.h $(INCDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(INCDIR)/genericSocket.h $(INCDIR)/logger.h $(INCDIR)/receiver_defs.h $(INCDIR)/UDPInterface.h $(INCDIR)/utilities.h $(INCDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(INCDIR)/sls_receiver_exceptions.h
|
||||
|
||||
|
||||
ifeq ($(HDF5),yes)
|
||||
|
||||
@@ -43,7 +43,7 @@ class MySocketTCP: public genericSocket {
|
||||
public:
|
||||
MySocketTCP(const char* const host_ip_or_name, unsigned short int const port_number): genericSocket(host_ip_or_name, port_number,TCP), last_keep_connection_open_action_was_a_send(0){setPacketSize(TCP_PACKET_SIZE);}; // sender (client): where to? ip
|
||||
MySocketTCP(unsigned short int const port_number):genericSocket(port_number,TCP), last_keep_connection_open_action_was_a_send(0) {setPacketSize(TCP_PACKET_SIZE);}; // receiver (server) local no need for ip
|
||||
|
||||
virtual ~MySocketTCP(){};
|
||||
|
||||
//The following two functions will connectioned->send/receive->disconnect
|
||||
int SendData(void* buf,int length);//length in characters
|
||||
|
||||
39
slsReceiverSoftware/include/sls_receiver_exceptions.h
Normal file
39
slsReceiverSoftware/include/sls_receiver_exceptions.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
/************************************************
|
||||
* @file sls_receiver_exceptions.h
|
||||
* @short exceptions defined
|
||||
***********************************************/
|
||||
/**
|
||||
*@short exceptions defined
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
using namespace std;
|
||||
|
||||
|
||||
struct SharedMemoryException : public exception {
|
||||
public:
|
||||
SharedMemoryException() {}
|
||||
string GetMessage() const { return "Shared Memory Failed";};
|
||||
};
|
||||
|
||||
struct ThreadpoolException : public exception {
|
||||
public:
|
||||
ThreadpoolException() {}
|
||||
string GetMessage() const { return "Threadpool Failed";};
|
||||
};
|
||||
|
||||
struct SocketException : public std::exception {
|
||||
public:
|
||||
SocketException() {}
|
||||
std::string GetMessage() const { return "Socket Failed";};
|
||||
};
|
||||
|
||||
|
||||
struct SamePortSocketException : public SocketException {
|
||||
public:
|
||||
SamePortSocketException() {}
|
||||
std::string GetMessage() const { return "Socket Failed";};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user