introduce shared_data->zmc_heartbeat_time and zma_heartbeat_time.

pull/2975/head
Isaac Connor 2020-06-22 10:40:00 -04:00
parent 4d020bab56
commit a15aace2fb
1 changed files with 17 additions and 8 deletions

View File

@ -138,15 +138,23 @@ protected:
time_t startup_time; /* When the zmc process started. zmwatch uses this to see how long the process has been running without getting any images */ time_t startup_time; /* When the zmc process started. zmwatch uses this to see how long the process has been running without getting any images */
uint64_t extrapad1; uint64_t extrapad1;
}; };
union { /* +72 */ union { /* +72 */
time_t zmc_heartbeat_time; /* Constantly updated by zmc. Used to determine if the process is alive or hung or dead */
uint64_t extrapad1;
};
union { /* +80 */
time_t zma_heartbeat_time; /* Constantly updated by zma. Used to determine if the process is alive or hung or dead */
uint64_t extrapad1;
};
union { /* +88 */
time_t last_write_time; time_t last_write_time;
uint64_t extrapad2; uint64_t extrapad2;
}; };
union { /* +80 */ union { /* +96 */
time_t last_read_time; time_t last_read_time;
uint64_t extrapad3; uint64_t extrapad3;
}; };
uint8_t control_state[256]; /* +88 */ uint8_t control_state[256]; /* +104 */
char alarm_cause[256]; char alarm_cause[256];
@ -210,21 +218,21 @@ protected:
uint64_t last_event; uint64_t last_event;
public: public:
MonitorLink( int p_id, const char *p_name ); MonitorLink(int p_id, const char *p_name);
~MonitorLink(); ~MonitorLink();
inline int Id() const { inline int Id() const {
return id; return id;
} }
inline const char *Name() const { inline const char *Name() const {
return( name ); return name;
} }
inline bool isConnected() const { inline bool isConnected() const {
return( connected ); return connected;
} }
inline time_t getLastConnectTime() const { inline time_t getLastConnectTime() const {
return( last_connect_time ); return last_connect_time;
} }
bool connect(); bool connect();
@ -415,8 +423,9 @@ public:
void AddPrivacyBitmask( Zone *p_zones[] ); void AddPrivacyBitmask( Zone *p_zones[] );
bool connect(); bool connect();
inline int ShmValid() const { inline int ShmValid() const {
return( shared_data->valid ); return shared_data->valid;
} }
inline int Id() const { inline int Id() const {