]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/clock.hxx
Melchior FRANZ:
[flightgear.git] / src / Instrumentation / clock.hxx
1 // clock.hxx.
2 // Written by Melchior FRANZ, started 2003.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5 //
6 // $Id$
7
8
9 #ifndef __INSTRUMENTS_CLOCK_HXX
10 #define __INSTRUMENTS_CLOCK_HXX 1
11
12 #ifndef __cplusplus
13 # error This library requires C++
14 #endif
15
16 #include <simgear/props/props.hxx>
17
18 #include <Main/fgfs.hxx>
19
20
21 /**
22  * Model a clock.
23  *
24  * Input properties:
25  *
26  * /instrumentation/clock/serviceable
27  * /instrumentation/clock/offset-sec
28  *
29  * Output properties:
30  *
31  * /instrumentation/clock/indicated-sec
32  * /instrumentation/clock/indicated-string
33  */
34 class Clock : public FGSubsystem
35 {
36
37 public:
38
39     Clock ();
40     virtual ~Clock ();
41
42     virtual void init ();
43     virtual void update (double dt);
44
45 private:
46
47     bool _is_serviceable;
48     long _gmt_time_sec;
49     long _offset_sec;
50     long _indicated_sec;
51     char _indicated_string[16];
52     long _standstill_offset;
53
54     SGPropertyNode_ptr _serviceable_node;
55     SGPropertyNode_ptr _offset_node;
56     SGPropertyNode_ptr _sec_node;
57     SGPropertyNode_ptr _string_node;
58
59 };
60
61 #endif // __INSTRUMENTS_CLOCK_HXX