88 lines
2.5 KiB
C++
88 lines
2.5 KiB
C++
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// GENERATED CODE - do not edit (Generated by ddkit/genModelMsg)
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Watchdog.hpp (rmodel-msg)
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <tmsif/type/Watchdog.hpp>
|
|
#include <tmsif/tmsif_export.hpp>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
|
|
namespace M_Watchdog {
|
|
|
|
|
|
//
|
|
// Service
|
|
//
|
|
|
|
/// Watchdog service interface.
|
|
/// Contains operations that a client can command the watchdog service to perform.
|
|
///
|
|
/// @startuml "Watchdog Client Liveliness Monitoring"
|
|
///
|
|
/// title Client Liveliness Monitoring
|
|
/// hide footbox
|
|
///
|
|
/// ==Startup==
|
|
/// Mount -> "Controlling instance": ReportWatchdogSettings(WatchableOperations)
|
|
/// "Controlling instance" -> Mount: ConfigWatch(WatchedClientId,\nAssociatedServiceName,\nWatchedOperations=NotifyRateAbsolute)
|
|
/// Mount -> "Controlling instance": ReportWatchStatus(Status)
|
|
/// note over "Controlling instance"
|
|
/// At startup, fail-sensitive devices may be configured to watch
|
|
/// specific commanding clients for connection losses.
|
|
/// end note
|
|
/// ...
|
|
///
|
|
/// ==Normal operation==
|
|
/// "Control handle" -> Mount: NotifyRateAbsolute
|
|
/// note over Mount
|
|
/// An example of data that should be rendered invalid
|
|
/// upon client connection loss.
|
|
/// end note
|
|
/// ...
|
|
///
|
|
/// ==Connection loss==
|
|
/// "Control handle" -> Mount: ReportDeviceStatus(Status, IsRemoved=true)
|
|
/// Mount -> Mount: failure handling
|
|
/// note over Mount
|
|
/// When the commanding client disconnects, the mount
|
|
/// is notified by means of the associated service's IsRemoved
|
|
/// and can take appropriate measures.
|
|
/// end note
|
|
///
|
|
/// @enduml
|
|
class TMSIF_EXPORT IService {
|
|
|
|
public:
|
|
virtual ~IService();
|
|
virtual void ConfigWatch(std::string const& KeyWatchedClientId, std::string const& KeyAssociatedServiceName, M_Common::StringListType const& WatchedOperations, bool IsRemoved);
|
|
};
|
|
|
|
|
|
//
|
|
// Client
|
|
//
|
|
|
|
/// Watchdog client interface.
|
|
/// Contains callback operations from the watchdog service to the client.
|
|
class TMSIF_EXPORT IClient {
|
|
|
|
public:
|
|
virtual ~IClient();
|
|
virtual void ReportWatchdogSettings(M_Watchdog::WatchdogSettingsType const& Settings);
|
|
virtual void ReportWatchStatus(std::string const& KeyWatchedClientId, std::string const& KeyAssociatedServiceName, M_Watchdog::WatchStatusType const& Status, bool IsRemoved);
|
|
};
|
|
|
|
|
|
} // namespace M_Watchdog
|
|
|
|
|