Class Server¶
Defined in File thermal_server.h
Class Documentation¶
-
class Server¶
creates a TCP/IP server for the thermal daemon
Public Functions
-
inline Server()¶
class constructor
-
inline ~Server()¶
class deconstructor cleans up on exit
-
long telemetry(std::string args, std::string &retstring)¶
utility to stop/start/check status of telemetry
-
void exit_cleanly(void)¶
exit
-
long configure_thermald()¶
read and apply daemon config from configuration file
-
long configure_devices()¶
read and apply device config from configuration file
-
long configure_telemetry()¶
read and apply telemetry config from configuration file
-
long parse_lks_unit(std::string &input, int &lksnum, std::string &name, std::string &host, int &port)¶
-
long parse_lks_chan(std::string &input, int &lksnum, std::string &chan, bool &heater, std::string &label)¶
-
long parse_camp_chan(std::string &input)¶
Public Members
-
int nbport¶
non-blocking port
-
int blkport¶
blocking port
-
int asyncport¶
asynchronous message port
-
std::string asyncgroup¶
asynchronous multicast group
-
int nonblocking_socket¶
-
int blocking_socket¶
-
std::atomic<int> cmd_num¶
-
int telem_period¶
-
InterruptableSleepTimer telem_sleeptimer¶
allows interrupting telemetry
-
std::atomic<bool> telem_running¶
is the main telemetry thread running?
-
unsigned int telem_backoff_sec = 1¶
reconnect backoff (s); doubles to a cap on telemetry DB failure, reset on success
-
std::mutex conn_mutex¶
mutex to protect against simultaneous access to Accept()
Public Static Functions
-
static void new_log_day(std::string logpath)¶
creates a new logbook each day
-
static void block_main(Thermal::Server &tcs, Network::TcpSocket sock)¶
main function for blocking connection thread
-
static void thread_main(Thermal::Server &tcs, Network::TcpSocket sock)¶
main function for all non-blocked threads
-
inline Server()¶