rad 8.2.0
Loading...
Searching...
No Matches
rad::TrsHealth Class Reference

Adapter for ptpmond or ntpmond TRS Health status to the state machine. More...

#include <trsHealth.hpp>

Classes

class  Impl
 Private implementation class to hide dependency to trsmon. More...
 

Public Member Functions

 TrsHealth (boost::asio::io_context &ioc, SMAdapter &sm)
 Register callbacks and start connecting to the default TRS monitoring socket.
 
 TrsHealth (boost::asio::io_context &ioc, SMAdapter &sm, const std::string_view path)
 Register callbacks and start connecting to a custom TRS monitoring socket.
 
 TrsHealth (boost::asio::io_context &ioc, SMAdapter &sm, const TrsProtocol protocol)
 Register callbacks and start connecting to the default TRS monitoring socket.
 
 TrsHealth (boost::asio::io_context &ioc, SMAdapter &sm, const std::string_view path, const TrsProtocol protocol)
 Register callbacks and start connecting to a custom TRS monitoring socket.
 
 ~TrsHealth ()
 
std::string GetStatus () const
 Retrieve a string indicative of the most recent status.
 
void Enable ()
 Enable TRS health status notification.
 
void Disable ()
 Disable TRS health status notification.
 

Detailed Description

Adapter for ptpmond or ntpmond TRS Health status to the state machine.

Constructor & Destructor Documentation

◆ TrsHealth() [1/4]

rad::TrsHealth::TrsHealth ( boost::asio::io_context & ioc,
SMAdapter & sm )
explicit

Register callbacks and start connecting to the default TRS monitoring socket.

Use the default TRS monitoring socket path.

Parameters
iocBoost.Asio context for callback registration
smthe state machine to post events to
Exceptions
std::runtime_errorif good or @bad are missing

◆ TrsHealth() [2/4]

rad::TrsHealth::TrsHealth ( boost::asio::io_context & ioc,
SMAdapter & sm,
const std::string_view path )
explicit

Register callbacks and start connecting to a custom TRS monitoring socket.

Use a user-specified socket path.

Parameters
iocBoost.Asio context for callback registration
smthe state machine to post events to
paththe UNIX socket address of the ptpmond or ntpmond server
Exceptions
std::runtime_errorif good or @bad are missing

◆ TrsHealth() [3/4]

rad::TrsHealth::TrsHealth ( boost::asio::io_context & ioc,
SMAdapter & sm,
const TrsProtocol protocol )
explicit

Register callbacks and start connecting to the default TRS monitoring socket.

Use the default TRS monitoring socket path and the user-specified synchronization protocol.

Parameters
iocBoost.Asio context for callback registration
smthe state machine to post events to
protocolthe type of synchronization needed by the application
Exceptions
std::runtime_errorif good or @bad are missing

◆ TrsHealth() [4/4]

rad::TrsHealth::TrsHealth ( boost::asio::io_context & ioc,
SMAdapter & sm,
const std::string_view path,
const TrsProtocol protocol )
explicit

Register callbacks and start connecting to a custom TRS monitoring socket.

Use user-specified socket path and TRS synchronization protocol.

Parameters
iocBoost.Asio context for callback registration
smthe state machine to post events to
paththe UNIX socket address of the ptpmond or ntpmond server
protocolthe type of synchronization needed by the application
Exceptions
std::runtime_errorif good or @bad are missing

◆ ~TrsHealth()

rad::TrsHealth::~TrsHealth ( )
default

Member Function Documentation

◆ Disable()

void rad::TrsHealth::Disable ( )

Disable TRS health status notification.

◆ Enable()

void rad::TrsHealth::Enable ( )

Enable TRS health status notification.

◆ GetStatus()

std::string rad::TrsHealth::GetStatus ( ) const

Retrieve a string indicative of the most recent status.


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