libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval > Class Template Reference

Section 5.2.2 "Heartbeats" of [1]. Generate heartbeats from the containing simulator. More...

#include <server_heartbeats.hpp>

Public Types

enum  : unsigned { max_missed_heartbeats =MissedHbs }
 
using hb_t = MsgT
 The specific heartbeat message type. More...
 

Public Member Functions

template<class ClientCxn , class MakeHB >
 server_hb_t (ClientCxn &cxn, MakeHB &&make_hb)
 
 ~server_hb_t () noexcept(false)
 
void stop () noexcept(true)
 
std::string to_string () const noexcept(false)
 
template<class ClientCxn >
void process (ClientCxn &cxn) noexcept
 

Static Public Attributes

static constexpr std::chrono::seconds heartbeat_interval {HbInterval}
 

Friends

std::ostream & operator<< (std::ostream &os, server_hb_t const &s) noexcept(false)
 

Detailed Description

template<class MsgT, unsigned MissedHbs, unsigned HbInterval>
class isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >

Section 5.2.2 "Heartbeats" of [1]. Generate heartbeats from the containing simulator.

The simulator generates heartbeats to which the client responds.

Definition at line 91 of file server_heartbeats.hpp.

Member Typedef Documentation

◆ hb_t

template<class MsgT, unsigned MissedHbs, unsigned HbInterval>
using isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::hb_t = MsgT

The specific heartbeat message type.

Definition at line 111 of file server_heartbeats.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<class MsgT, unsigned MissedHbs, unsigned HbInterval>
anonymous enum : unsigned
Enumerator
max_missed_heartbeats 

Definition at line 113 of file server_heartbeats.hpp.

Constructor & Destructor Documentation

◆ server_hb_t()

template<class MsgT , unsigned MissedHbs, unsigned HbInterval>
template<class ClientCxn , class MakeHB >
isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::server_hb_t ( ClientCxn &  cxn,
MakeHB &&  make_hb 
)
inline

Definition at line 76 of file server_heartbeats_impl.hpp.

◆ ~server_hb_t()

template<class MsgT , unsigned MissedHbs, unsigned HbInterval>
isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::~server_hb_t ( )
inlinenoexcept

Definition at line 94 of file server_heartbeats_impl.hpp.

Member Function Documentation

◆ process()

template<class MsgT , unsigned MissedHbs, unsigned HbInterval>
template<class ClientCxn >
void isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::process ( ClientCxn &  cxn)
inlinenoexcept

Definition at line 116 of file server_heartbeats_impl.hpp.

◆ stop()

template<class MsgT , unsigned MissedHbs, unsigned HbInterval>
void isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::stop ( )
inlinenoexcept

Definition at line 88 of file server_heartbeats_impl.hpp.

◆ to_string()

template<class MsgT , unsigned MissedHbs, unsigned HbInterval>
std::string isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::to_string ( ) const
inlinenoexcept

Definition at line 103 of file server_heartbeats_impl.hpp.

Friends And Related Function Documentation

◆ operator<<

template<class MsgT, unsigned MissedHbs, unsigned HbInterval>
std::ostream& operator<< ( std::ostream &  os,
server_hb_t< MsgT, MissedHbs, HbInterval > const &  s 
)
friend

Definition at line 126 of file server_heartbeats.hpp.

Member Data Documentation

◆ heartbeat_interval

template<class MsgT, unsigned MissedHbs, unsigned HbInterval>
constexpr std::chrono::seconds isimud::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::heartbeat_interval {HbInterval}
inlinestaticconstexpr

Definition at line 116 of file server_heartbeats.hpp.


The documentation for this class was generated from the following files: