From 0f8a1699474b46ba326c3f13be51defd40703754 Mon Sep 17 00:00:00 2001 From: Ian Tracy Date: Wed, 14 Aug 2024 11:41:32 -0400 Subject: [PATCH] Drop - testing --- .../sc/extensions/ExtensionsMain.java | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hms_networks/americas/sc/extensions/ExtensionsMain.java b/src/main/java/com/hms_networks/americas/sc/extensions/ExtensionsMain.java index 23ff9572..fc6eb969 100644 --- a/src/main/java/com/hms_networks/americas/sc/extensions/ExtensionsMain.java +++ b/src/main/java/com/hms_networks/americas/sc/extensions/ExtensionsMain.java @@ -10,6 +10,7 @@ import com.hms_networks.americas.sc.extensions.system.time.TimeZoneManager; import com.hms_networks.americas.sc.extensions.taginfo.TagInfoManager; import java.io.IOException; +import java.sql.Time; import java.util.ArrayList; import java.util.Date; @@ -22,12 +23,37 @@ */ public class ExtensionsMain { - public static void getTagInfo() { + public static void getTagInfoDate() { int i = 40; while (i > 0) { i--; try { - TimeZoneManager.checkUpdateTimeZone(); + TimeZoneManager.checkUpdateTimeZone(); + ArrayList dat = HistoricalDataQueueManager.getFifoNextSpanDataAllGroups(false); + for (int j = 0; j < dat.size(); j++) { + DataPoint dp = (DataPoint) dat.get(j); + if (dp.getTagId() == 7 || dp.getTagId() == 6) { + long time = Long.parseLong(dp.getTimeStamp()); + Date d = new Date(time*1000); + System.out.println(dp.getValueString() + " " + dp.getIso8601Timestamp() + " "+d ); + } + Thread.sleep(1000); + TimeZoneManager.checkUpdateTimeZone(); + } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + +public static void getTagInfo() { + int i = 40; + while (i > 0) { + i--; + try { + TimeZoneManager.checkUpdateTimeZone(); ArrayList dat = HistoricalDataQueueManager.getFifoNextSpanDataAllGroups(false); for (int j = 0; j < dat.size(); j++) { DataPoint dp = (DataPoint) dat.get(j); @@ -93,7 +119,7 @@ public static void main(String[] args) { SCTimeUtils.injectJvmLocalTime(); TagInfoManager.refreshTagList(); HistoricalDataQueueManager.setStringHistoryEnabled(true); - getTagInfo(); + getTagInfoDate(); } catch (Exception e) { // TODO Auto-generated catch block