| helics 3.6.1

Public Member Functions | List of all members
helics::TimeoutMonitor Class Reference

`#include <TimeoutMonitor.h>`

## Public Member Functions
void | tick (CommonCore *core)
void | tick (CoreBroker *brk)
void | pingReply (const ActionMessage &cmd, CoreBroker *brk=nullptr)
void | setTimeout (std::chrono::milliseconds to)
void | reset ()
void | pingSub (CoreBroker *brk)
void | setParentId (GlobalBrokerId parent_id)
void | disableParentPing (bool value=true)

## Detailed Description

class to handle timeouts and other issues for cores and brokers

## Member Function Documentation

## ◆ disableParentPing()

void helics::TimeoutMonitor::disableParentPing | ( | bool | value = `true` | ) |
| inline

set the "pingability" of a parent connection

## ◆ pingReply()

void helics::TimeoutMonitor::pingReply | ( | const ActionMessage & | cmd,
|  | CoreBroker * | brk = `nullptr`
| ) |  |

get a ping reply

References helics::BrokerBase::addActionMessage(), helics::linkConnection::connection, helics::ActionMessage::dest_id, helics::ActionMessage::messageID, helics::ActionMessage::source_id, and helics::linkConnection::waitingForPingReply.

## ◆ pingSub()

void helics::TimeoutMonitor::pingSub | ( | CoreBroker * | brk | ) |

ping all a brokers sub connections

References helics::BrokerBase::addActionMessage(), helics::ActionMessage::dest_id, helics::BrokerBase::global_broker_id_local, helics::BrokerBase::global_id, helics::indicator_flag, helics::ActionMessage::messageID, helics::setActionFlag(), helics::ActionMessage::source_id, and helics::CoreBroker::transmit().

Referenced by tick().

## ◆ reset()

void helics::TimeoutMonitor::reset | ( |  | ) |

reset the monitor to initial conditions

References helics::linkConnection::waitingForPingReply.

## ◆ setParentId()

void helics::TimeoutMonitor::setParentId | ( | GlobalBrokerId | parent_id | ) |
| inline

set the parent id

## ◆ setTimeout()

void helics::TimeoutMonitor::setTimeout | ( | std::chrono::milliseconds | to | ) |
| inline

set the overall timeout for the connection monitor

## ◆ tick() [1/2]

void helics::TimeoutMonitor::tick | ( | CommonCore * | core | ) |

tick function for a core, executes one tick

References helics::BrokerBase::addActionMessage(), helics::ActionMessage::dest_id, helics::ERROR_LEVEL, helics::BrokerBase::ERRORED, helics::CommonCore::getIdentifier(), helics::BrokerBase::global_broker_id_local, helics::BrokerBase::higher_broker_id, helics::CommonCore::isConnected(), helics::ActionMessage::messageID, helics::parent_broker_id, helics::CommonCore::processCommand(), helics::BrokerBase::sendToLogger(), helics::ActionMessage::source_id, helics::BrokerBase::TERMINATED, helics::CommonCore::transmit(), and helics::linkConnection::waitingForPingReply.

## ◆ tick() [2/2]

void helics::TimeoutMonitor::tick | ( | CoreBroker * | brk | ) |

tick function for a broker, executes one tick

References helics::BrokerBase::addActionMessage(), helics::ActionMessage::dest_id, helics::ERROR_LEVEL, helics::BrokerBase::ERRORED, helics::CoreBroker::getIdentifier(), helics::BrokerBase::global_broker_id_local, helics::BrokerBase::higher_broker_id, helics::CoreBroker::isConnected(), helics::CoreBroker::isRoot(), helics::parent_broker_id, pingSub(), helics::BrokerBase::sendToLogger(), helics::ActionMessage::source_id, helics::BrokerBase::TERMINATED, helics::CoreBroker::transmit(), and helics::linkConnection::waitingForPingReply.

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

- TimeoutMonitor.h
- TimeoutMonitor.cpp