24 #ifndef GOBY_MIDDLEWARE_CORONER_CORONER_H
25 #define GOBY_MIDDLEWARE_CORONER_CORONER_H
41 template <
typename Derived>
class Thread
46 static_cast<Derived*
>(
this)->interthread().template subscribe<groups::health_request>(
47 [
this](
const protobuf::HealthRequest& request)
49 std::shared_ptr<protobuf::ThreadHealth> response(
new protobuf::ThreadHealth);
50 static_cast<Derived*
>(
this)->thread_health(*response);
51 static_cast<Derived*
>(
this)
53 .template publish<groups::health_response>(response);
63 static_cast<Derived*
>(
this)->interprocess().template subscribe<groups::health_request>(
64 [
this](
const protobuf::HealthRequest& request)
71 static_cast<Derived*
>(
this)->thread_health(*
health_response->mutable_main());
72 static_cast<Derived*
>(
this)
84 static_cast<Derived*
>(
this)->interthread().template subscribe<groups::health_request>(
85 [
this](
const protobuf::HealthRequest& request)
94 static_cast<Derived*
>(
this)->thread_health(*
health_response->mutable_main());
95 static_cast<Derived*
>(
this)
100 virtual void preseed_hook(std::shared_ptr<protobuf::ProcessHealth>& ph) {}
virtual void preseed_hook(std::shared_ptr< protobuf::ProcessHealth > &ph)
constexpr goby::middleware::Group health_response
The global namespace for the Goby project.