Motorcortex Core  version: 2.7.6
wd_base.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2018 VECTIONEER.
4  */
5 
6 #ifndef MOTORCORTEX_CORE_WD_BASE_H
7 #define MOTORCORTEX_CORE_WD_BASE_H
8 
9 namespace mcx {
10 
11 namespace watchdog {
12 
13 struct WatchdogIn {
14  bool do_no_estop;
15  bool acknowledge;
16  unsigned int ack_nr_of_cycles;
17  unsigned int pulse_nr_of_cycles;
18 };
19 
20 struct WatchdogOut {
21  bool estop_active;
22  bool estop_not_active;
23  bool reset_estop;
24  bool pulse;
25  bool feedback_ch1;
26  bool feedback_ch2;
27 };
28 
29 class WatchdogBase {
30 public:
31 
32  WatchdogBase() = default;
33 
34  virtual ~WatchdogBase() = default;
35 
36  virtual bool open(const char* device) = 0;
37 
38  virtual void update(const WatchdogIn& in, WatchdogOut* out) = 0;
39 
40 };
41 
42 } // namespace
43 
44 } // namespace
45 
46 #endif //MOTORCORTEX_CORE_WD_BASE_H
mcx::watchdog::WatchdogBase
Definition: wd_base.h:29
mcx::watchdog::WatchdogIn
Definition: wd_base.h:13
mcx::watchdog::WatchdogOut
Definition: wd_base.h:20