类
查看源码service::Watchdog
上游未提供类型说明。
构造与析构
4Watchdog
service::Watchdog::Watchdog ()
新建一个受监控对象,并自动登记到全局表中。 如果全局表已满,构造仍然可以完成,但该实例不会被纳入统一递减。
services/watchdog/watchdog.hpp:33Watchdog
service::Watchdog::Watchdog (Watchdog &&)=delete
上游未提供说明。
services/watchdog/watchdog.hpp:51Watchdog
service::Watchdog::Watchdog (Watchdog &)=delete
上游未提供说明。
services/watchdog/watchdog.hpp:50~Watchdog
service::Watchdog::~Watchdog ()
上游未提供说明。
services/watchdog/watchdog.hpp:34成员函数
6EatAll
void service::Watchdog::EatAll ()
对所有登记对象统一执行一次 eat。 通常由系统定时任务调用。
services/watchdog/watchdog.hpp:58eat
void service::Watchdog::eat ()
消耗一个 tick。
services/watchdog/watchdog.hpp:46feed
void service::Watchdog::feed ()
使用默认喂食量补满。
services/watchdog/watchdog.hpp:38feed
void service::Watchdog::feed (uint32_t snacks)
以自定义喂食量补满。
services/watchdog/watchdog.hpp:42isFed
bool service::Watchdog::isFed () const
上游未提供说明。
services/watchdog/watchdog.hpp:48isFull
bool service::Watchdog::isFull ()
全局 watchdog 表是否已满。
services/watchdog/watchdog.hpp:62成员变量
2id_
uint32_t service::Watchdog::id_
上游未提供说明。
services/watchdog/watchdog.hpp:68snacks_
std::atomic_int32_t service::Watchdog::snacks_
上游未提供说明。
services/watchdog/watchdog.hpp:66