]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/clock.hxx
#346 related: missing status message for property server
[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 #include <simgear/props/props.hxx>
13 #include <simgear/structure/subsystem_mgr.hxx>
14
15
16 /**
17  * Model a clock.
18  *
19  * Input properties:
20  *
21  * /instrumentation/clock/serviceable
22  * /instrumentation/clock/offset-sec
23  *
24  * Output properties:
25  *
26  * /instrumentation/clock/indicated-sec
27  * /instrumentation/clock/indicated-string
28  */
29 class Clock : public SGSubsystem {
30 public:
31     Clock(SGPropertyNode *node);
32     virtual ~Clock();
33
34     virtual void init();
35     virtual void update(double dt);
36
37 private:
38     string _name;
39     unsigned int _num;
40
41     bool _is_serviceable;
42     long _gmt_time_sec;
43     long _offset_sec;
44     long _indicated_sec;
45     long _indicated_min;
46     long _indicated_hour;
47     long _local_hour;
48     char _indicated_string[16];
49     char _indicated_short_string[16];
50     char _local_short_string[16];
51     long _standstill_offset;
52
53     SGPropertyNode_ptr _serviceable_node;
54     SGPropertyNode_ptr _offset_node;
55     SGPropertyNode_ptr _sec_node;
56     SGPropertyNode_ptr _hour_node;
57     SGPropertyNode_ptr _lhour_node;
58     SGPropertyNode_ptr _min_node;
59     SGPropertyNode_ptr _string_node;
60     SGPropertyNode_ptr _string_node1;
61     SGPropertyNode_ptr _string_node2;
62 };
63
64 #endif // __INSTRUMENTS_CLOCK_HXX