⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faultdetector.hpp

📁 ACE自适配通信环境(ADAPTIVE Communication Environment)是可以自由使用、开放源码的面向对象(OO)框架(Framework)
💻 HPP
字号:
// file      : ACE_TMCast/FaultDetector.hpp// author    : Boris Kolpackov <boris@dre.vanderbilt.edu>// cvs-id    : FaultDetector.hpp,v 1.3 2006/01/20 11:45:01 boris Exp#include "Protocol.hpp"namespace ACE_TMCast{  class FaultDetector  {  public:    FaultDetector ()        : alone_ (true), silence_period_ (-1)    {    }  public:    class Failed {};    void    insync ()    {      if (alone_)        alone_ = false;	      silence_period_ = 0;    }    void    outsync ()    {      if (!alone_ && ++silence_period_ >= Protocol::FATAL_SILENCE_FRAME)      {        // cerr << "Silence period has been passed." << endl;        // cerr << "Decalring the node failed." << endl;        throw Failed ();      }    }  private:    bool alone_; // true if we haven't heard from any members yet.    short silence_period_;  };}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -