first draft of disabling data port at the receiver side. Todo: master file and stream for gui to use

This commit is contained in:
2026-05-07 17:15:50 +02:00
parent 111d10cfa7
commit 4ef8a625ab
39 changed files with 557 additions and 448 deletions
+7 -7
View File
@@ -21,29 +21,29 @@ class ClientSocket : public DataSocket {
private:
void readReply(int &ret, void *retval, size_t retval_size);
struct sockaddr_in serverAddr {};
struct sockaddr_in serverAddr{};
std::string socketType;
};
class ReceiverSocket : public ClientSocket {
public:
ReceiverSocket(const std::string &hostname, uint16_t port_number)
: ClientSocket("Receiver", hostname, port_number){};
ReceiverSocket(struct sockaddr_in addr) : ClientSocket("Receiver", addr){};
: ClientSocket("Receiver", hostname, port_number) {};
ReceiverSocket(struct sockaddr_in addr) : ClientSocket("Receiver", addr) {};
};
class DetectorSocket : public ClientSocket {
public:
DetectorSocket(const std::string &hostname, uint16_t port_number)
: ClientSocket("Detector", hostname, port_number){};
DetectorSocket(struct sockaddr_in addr) : ClientSocket("Detector", addr){};
: ClientSocket("Detector", hostname, port_number) {};
DetectorSocket(struct sockaddr_in addr) : ClientSocket("Detector", addr) {};
};
class GuiSocket : public ClientSocket {
public:
GuiSocket(const std::string &hostname, uint16_t port_number)
: ClientSocket("Gui", hostname, port_number){};
GuiSocket(struct sockaddr_in addr) : ClientSocket("Gui", addr){};
: ClientSocket("Gui", hostname, port_number) {};
GuiSocket(struct sockaddr_in addr) : ClientSocket("Gui", addr) {};
};
}; // namespace sls
+1 -1
View File
@@ -33,5 +33,5 @@ class Timer {
std::string name_;
};
}; // namespace sls
}; // namespace sls
#endif // TIMER_H
+1 -1
View File
@@ -42,7 +42,7 @@ class Logger {
public:
Logger() = default;
explicit Logger(TLogLevel level) : level(level){};
explicit Logger(TLogLevel level) : level(level) {};
~Logger() {
// output in the destructor to allow for << syntax
os << RESET << '\n';
@@ -137,7 +137,7 @@ class slsDetectorDefs {
int x{0};
int y{0};
xy() = default;
xy(int x, int y) : x(x), y(y){};
xy(int x, int y) : x(x), y(y) {};
constexpr bool operator==(const xy &other) const {
return ((x == other.x) && (y == other.y));
}
@@ -223,7 +223,7 @@ class slsDetectorDefs {
struct Hz {
int value{0};
explicit Hz(int v) : value(v){};
explicit Hz(int v) : value(v) {};
constexpr bool operator==(const Hz &other) const {
return (value == other.value);
}
@@ -252,9 +252,9 @@ class slsDetectorDefs {
int ymin{-1};
int ymax{-1};
ROI() = default;
ROI(int xmin, int xmax) : xmin(xmin), xmax(xmax){};
ROI(int xmin, int xmax) : xmin(xmin), xmax(xmax) {};
ROI(int xmin, int xmax, int ymin, int ymax)
: xmin(xmin), xmax(xmax), ymin(ymin), ymax(ymax){};
: xmin(xmin), xmax(xmax), ymin(ymin), ymax(ymax) {};
constexpr int width() const { return (xmax - xmin + 1); }
constexpr int height() const { return (ymax - ymin + 1); }
constexpr std::array<int, 4> getIntArray() const {
@@ -409,7 +409,7 @@ enum detFuncs {
F_GET_RECEIVER_STREAMING_HWM,
F_SET_RECEIVER_STREAMING_HWM,
F_RECEIVER_SET_ALL_THRESHOLD,
F_RECEIVER_SET_DATASTREAM,
F_RECEIVER_SET_UDP_DATASTREAM,
F_GET_RECEIVER_ARPING,
F_SET_RECEIVER_ARPING,
F_RECEIVER_GET_RECEIVER_ROI,
@@ -423,6 +423,7 @@ enum detFuncs {
F_SET_RECEIVER_DBIT_REORDER,
F_RECEIVER_GET_ROI_METADATA,
F_SET_RECEIVER_READOUT_SPEED,
F_RECEIVER_GET_UDP_DATASTREAM,
NUM_REC_FUNCTIONS
};
@@ -828,7 +829,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_RECEIVER_STREAMING_HWM: return "F_GET_RECEIVER_STREAMING_HWM";
case F_SET_RECEIVER_STREAMING_HWM: return "F_SET_RECEIVER_STREAMING_HWM";
case F_RECEIVER_SET_ALL_THRESHOLD: return "F_RECEIVER_SET_ALL_THRESHOLD";
case F_RECEIVER_SET_DATASTREAM: return "F_RECEIVER_SET_DATASTREAM";
case F_RECEIVER_SET_UDP_DATASTREAM: return "F_RECEIVER_SET_UDP_DATASTREAM";
case F_GET_RECEIVER_ARPING: return "F_GET_RECEIVER_ARPING";
case F_SET_RECEIVER_ARPING: return "F_SET_RECEIVER_ARPING";
case F_RECEIVER_GET_RECEIVER_ROI: return "F_RECEIVER_GET_RECEIVER_ROI";
@@ -842,6 +843,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_SET_RECEIVER_DBIT_REORDER: return "F_SET_RECEIVER_DBIT_REORDER";
case F_RECEIVER_GET_ROI_METADATA: return "F_RECEIVER_GET_ROI_METADATA";
case F_SET_RECEIVER_READOUT_SPEED: return "F_SET_RECEIVER_READOUT_SPEED";
case F_RECEIVER_GET_UDP_DATASTREAM: return "F_RECEIVER_GET_UDP_DATASTREAM";
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
default: return "Unknown Function";