统计数据增加3项数据

最后心跳时间
最后心跳回复时间
最后收到主站报文时间
hdrplus
Matthew 11 months ago
parent 2c73dede46
commit 124d70212f

@ -342,6 +342,12 @@ public class AppMaster {
int uploaded; int uploaded;
int devReboots; int devReboots;
int appReboots; int appReboots;
int devRebootsInLastWeek;
int appRebootsInLastWeek;
long lastHb --- v2 20240714 added
long lastHbResp
long lastRecv
}; };
*/ */
@ -378,6 +384,18 @@ public class AppMaster {
stats.add(new Pair<String, String>("i1RebootTimesWk", Integer.toString(items[11]))); stats.add(new Pair<String, String>("i1RebootTimesWk", Integer.toString(items[11])));
} }
if (items.length >= 12 && items.length <= 18) {
// v2
long ts = (((long)items[12]) & 0xFFFFFFFFl) | ((((long)items[13]) << 32) & 0xFFFFFFFF00000000l);
stats.add(new Pair<String, String>("lastHbTime", Long.toString(ts)));
ts = (((long)items[14]) & 0xFFFFFFFFl) | ((((long)items[15]) << 32) & 0xFFFFFFFF00000000l);
stats.add(new Pair<String, String>("lastHbRespTime", Long.toString(ts)));
ts = (((long)items[16]) & 0xFFFFFFFFl) | ((((long)items[17]) << 32) & 0xFFFFFFFF00000000l);
stats.add(new Pair<String, String>("lastRecvTime", Long.toString(ts)));
}
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }

Loading…
Cancel
Save