cisst-saw
Loading...
Searching...
No Matches
mtsWatchdogClient.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5Author(s): Marcin Balicki
6Created on: 2014
7
8(C) Copyright 2014 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#ifndef _mtsWatchdogClient_h
20#define _mtsWatchdogClient_h
21
27
29 // used to control the log level, "Run Error" by default
31protected:
33 double Timeout;
34 struct {
35 mtsFunctionRead ReadState;
36 mtsFunctionWrite WriteState;
37 mtsFunctionVoid ResetState;
39
40 bool IsOK;
41public:
43 Timeout(0),
44 IsOK(false)
45 {};
46
48
50
51 void SetTimeoutPeriod(const double & seconds) {
52 Timeout = seconds;
53 }
54
55 bool Start(void);
56
57 // true if everything is ok;
58 bool CheckAndUpdate(void);
59 bool Reset(void);
60};
61
63
64#endif // _mtsWatchdogClient_h
Base class for high level objects.
Definition cmnGenericObject.h:53
Definition mtsFunctionRead.h:37
Definition mtsFunctionVoid.h:36
Definition mtsFunctionWrite.h:37
Definition mtsInterfaceRequired.h:83
Definition mtsWatchdogClient.h:28
double Timeout
Definition mtsWatchdogClient.h:33
void AddToRequiredInterface(mtsInterfaceRequired &reqInt)
void SetTimeoutPeriod(const double &seconds)
Definition mtsWatchdogClient.h:51
osaStopwatch StopWatch
Definition mtsWatchdogClient.h:32
mtsWatchdogClient()
Definition mtsWatchdogClient.h:42
bool Start(void)
bool Reset(void)
~mtsWatchdogClient()
Definition mtsWatchdogClient.h:47
struct mtsWatchdogClient::@176004150315221034161372343321057023106204354012 Watchdog
bool IsOK
Definition mtsWatchdogClient.h:40
bool CheckAndUpdate(void)
Definition osaStopwatch.h:83
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_NO_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:325
Defines cmnGenericObject.
#define CMN_LOG_LOD_RUN_ERROR
Definition cmnLogLoD.h:93
Defines the command interfaces.
Defines a function object to use a void command (mtsCommandVoid).
Defines the command interfaces.