mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-09 06:40:29 +02:00
WIP
This commit is contained in:
@@ -38,11 +38,18 @@ class MatterhornServer {
|
||||
|
||||
ReturnCode get_num_udp_interfaces(ServerInterface &socket);
|
||||
|
||||
ReturnCode get_update_mode(ServerInterface &socket);
|
||||
|
||||
ReturnCode get_source_udp_mac(ServerInterface &socket);
|
||||
|
||||
private:
|
||||
static std::string getMatterhornServerVersion();
|
||||
|
||||
size_t num_udp_interfaces() const;
|
||||
|
||||
/// @brief TODO what is this?
|
||||
bool updateMode{true};
|
||||
|
||||
private:
|
||||
/// @brief @brief TCP/IP interface for communication with the client
|
||||
std::unique_ptr<TCPInterface> tcpInterface;
|
||||
@@ -62,8 +69,14 @@ class MatterhornServer {
|
||||
}},
|
||||
{detFuncs::F_INITIAL_CHECKS,
|
||||
[this](ServerInterface &si) { return this->initial_checks(si); }},
|
||||
{detFuncs::F_GET_NUM_INTERFACES, [this](ServerInterface &si) {
|
||||
{detFuncs::F_GET_NUM_INTERFACES,
|
||||
[this](ServerInterface &si) {
|
||||
return this->get_num_udp_interfaces(si);
|
||||
}},
|
||||
{detFuncs::F_GET_UPDATE_MODE,
|
||||
[this](ServerInterface &si) { return this->get_update_mode(si); }},
|
||||
{detFuncs::F_GET_SOURCE_UDP_MAC, [this](ServerInterface &si) {
|
||||
return this->get_source_udp_mac(si);
|
||||
}}};
|
||||
};
|
||||
|
||||
|
||||
@@ -66,4 +66,14 @@ ReturnCode MatterhornServer::get_num_udp_interfaces(ServerInterface &socket) {
|
||||
return static_cast<ReturnCode>(socket.sendResult(numUDPInterfaces));
|
||||
}
|
||||
|
||||
ReturnCode MatterhornServer::get_update_mode(ServerInterface &socket) {
|
||||
return static_cast<ReturnCode>(
|
||||
socket.sendResult(static_cast<int>(updateMode)));
|
||||
}
|
||||
|
||||
ReturnCode MatterhornServer::get_source_udp_mac(ServerInterface &socket) {
|
||||
uint64_t srcMac = udpDetails[0].srcmac;
|
||||
return static_cast<ReturnCode>(socket.sendResult(srcMac));
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
Reference in New Issue
Block a user