|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <arpa/inet.h>#include <netinet/in.h>#include <signal.h>#include <sys/socket.h>#include <unistd.h>#include <atomic>#include <chrono>#include <cstring>#include <fstream>#include <iostream>#include <optional>#include <sstream>#include <string>#include <thread>#include <vector>#include "config/Config.hpp"#include "elodin/DatabaseConfig.hpp"#include "elodin/ElodinClient.hpp"#include "net/DaqInterface.hpp"Go to the source code of this file.
Namespaces | |
| namespace | anonymous_namespace{heartbeat_service_main.cpp} |
| Heartbeat Service — C++ SERVER_HEARTBEAT broadcaster. | |
Functions | |
| void | anonymous_namespace{heartbeat_service_main.cpp}::signalHandler (int) |
| static constexpr uint8_t | anonymous_namespace{heartbeat_service_main.cpp}::stateToEngine (uint8_t s) |
| void | anonymous_namespace{heartbeat_service_main.cpp}::elodinThread (std::string host, uint16_t port) |
| std::vector< uint8_t > | anonymous_namespace{heartbeat_service_main.cpp}::buildHeartbeatPacket (uint8_t engine_state) |
| int | main (int argc, char *argv[]) |
Variables | |
| std::atomic< bool > | anonymous_namespace{heartbeat_service_main.cpp}::g_running {true} |
| std::atomic< uint8_t > | anonymous_namespace{heartbeat_service_main.cpp}::g_engine_state {0} |
| constexpr int | anonymous_namespace{heartbeat_service_main.cpp}::kElodinRecvTimeoutMs = 3000 |
| constexpr uint8_t | anonymous_namespace{heartbeat_service_main.cpp}::SERVER_HEARTBEAT_TYPE = 2 |
| constexpr uint8_t | anonymous_namespace{heartbeat_service_main.cpp}::DIABLO_VERSION = 0 |
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 174 of file heartbeat_service_main.cpp.
References fsw::net::bindToDaqInterface(), anonymous_namespace{heartbeat_service_main.cpp}::buildHeartbeatPacket(), count(), anonymous_namespace{heartbeat_service_main.cpp}::elodinThread(), anonymous_namespace{heartbeat_service_main.cpp}::g_engine_state, g_running, fsw::config::load(), fsw::net::resolveDaqBindAddress(), and signalHandler().