cisst-saw
Loading...
Searching...
No Matches
mtsWatchdogServer.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/*
5 Author(s): Marcin Balicki
6 Created 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#ifndef _mtsWatchdogServer_h
19#define _mtsWatchdogServer_h
20
24
27
29 // used to control the log level, "Run Error" by default
31protected:
33 double Timeout;
34
37
38 bool IsOK;
39
40 //if false then it was remotely updated
41 //set to true locally as an acknowledgment
43
44public:
46 Timeout(0),
47 IsOK(false),
48 WatchdogState(true)
49 {};
50
52
54
55 void SetTimeoutPeriod(const double & seconds) {
56 Timeout = seconds;
57 }
58
59 void Start(void);
60
61 //true if everything is ok;
62 bool CheckAndUpdate(void);
63 void Reset(void);
64};
65
67
68#endif // _mtsWatchdogServer_h
Base class for high level objects.
Definition cmnGenericObject.h:53
Definition mtsFunctionWrite.h:37
Definition mtsInterfaceProvided.h:98
Definition mtsStateTable.h:67
Definition mtsWatchdogServer.h:28
~mtsWatchdogServer()
Definition mtsWatchdogServer.h:51
osaStopwatch StopWatch
Definition mtsWatchdogServer.h:32
bool CheckAndUpdate(void)
void AddToProvidedInterface(mtsInterfaceProvided &provInt, mtsStateTable &stateTable)
void SetTimeoutPeriod(const double &seconds)
Definition mtsWatchdogServer.h:55
double Timeout
Definition mtsWatchdogServer.h:33
void Reset(void)
mtsFunctionWrite * WatchdogReadBool
Definition mtsWatchdogServer.h:35
mtsFunctionWrite * WatchdogWriteBool
Definition mtsWatchdogServer.h:36
void Start(void)
mtsWatchdogServer(void)
Definition mtsWatchdogServer.h:45
bool WatchdogState
Definition mtsWatchdogServer.h:42
bool IsOK
Definition mtsWatchdogServer.h:38
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
Forward declarations and #define for cisstMultiTask.