Skip to content

Commit

Permalink
jfDataLogger/0.8 and jfDataLogger/0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pquiring committed Feb 22, 2017
1 parent 8da107e commit dc58c48
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion projects/jfdatalogger/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<property name="src" location="src"/>
<property name="build" location="classes"/>
<property name="classpath" location="javaforce.jar"/>
<property name="version" value="0.7"/>
<property name="version" value="0.8"/>

<import file="../../base.xml"/>

Expand Down
2 changes: 1 addition & 1 deletion projects/jfdatalogger/src/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class App extends javax.swing.JFrame {

public static String version = "0.7";
public static String version = "0.8";

public static int delays[] = new int[] {
25, 50, 100, 500, 1000, 3000, 5000, 10000, 30000, 60000, 300000
Expand Down
3 changes: 3 additions & 0 deletions projects/jfdatalogger/whatsnew.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Feb 22/2017 : v0.8 released
- fix : improved PLC connections

Feb 17/2017 : v0.7 released
- fix : added support for AB INT data type

Expand Down
2 changes: 1 addition & 1 deletion projects/jfdatalogger/wix32.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="{429E2AD1-232C-4C24-9C78-8D06E506505A}" Version="0.7" Language="1033" Name="jfDataLogger" Manufacturer="Peter Quiring">
<Product Id="*" UpgradeCode="{429E2AD1-232C-4C24-9C78-8D06E506505A}" Version="0.8" Language="1033" Name="jfDataLogger" Manufacturer="Peter Quiring">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine"/>
<Media Id="1" Cabinet="files.cab" EmbedCab="yes" />
<UIRef Id="WixUI_Minimal" />
Expand Down
2 changes: 1 addition & 1 deletion projects/jfdatalogger/wix64.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="{741FCC9E-8DEC-415E-A05E-1115FEA9FA31}" Version="0.7" Language="1033" Name="jfDataLogger" Manufacturer="Peter Quiring">
<Product Id="*" UpgradeCode="{741FCC9E-8DEC-415E-A05E-1115FEA9FA31}" Version="0.8" Language="1033" Name="jfDataLogger" Manufacturer="Peter Quiring">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
<Media Id="1" Cabinet="files.cab" EmbedCab="yes" />
<UIRef Id="WixUI_Minimal" />
Expand Down
2 changes: 1 addition & 1 deletion projects/jfdataloggerplus/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<property name="src" location="src"/>
<property name="build" location="classes"/>
<property name="classpath" location="javaforce.jar"/>
<property name="version" value="0.3"/>
<property name="version" value="0.4"/>

<import file="../../base.xml"/>

Expand Down
15 changes: 9 additions & 6 deletions projects/jfdataloggerplus/src/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void addTag(Tag tag) {
String id = sql.select1value(query);
tag.setData("id", JF.atoi(id));
sql.close();
restart();
restart(false);
}
}
public static boolean exists(String host, String tag) {
Expand All @@ -69,20 +69,22 @@ public static void removeTag(Tag tag) {
query = String.format("delete from history where id=%d", tag.getData("id"));
sql.execute(query);
sql.close();
restart();
restart(false);
}
}
public static void restart() {
public static void restart(boolean first) {
synchronized(tagsLock) {
Tag tags[] = getTags();
//stop all tags
if (!first) JFLog.log("Stopping " + tags.length + " tags");
for(int a=0;a<tags.length;a++) {
tags[a].stop();
}
//start all tags
JFLog.log("Starting " + tags.length + " tags");
for(int a=0;a<tags.length;a++) {
Tag parent = null;
for(int b=0;b<tags.length;b++) {
for(int b=0;b<a;b++) {
if (tags[a].host.equals(tags[b].host)) {
parent = tags[b];
break;
Expand All @@ -94,7 +96,7 @@ public static void restart() {
}
public static void updateTag(Tag tag) {
synchronized(tagsLock) {
restart();
restart(false);
}
}
public static void logMsg(String msg) {
Expand Down Expand Up @@ -171,6 +173,7 @@ public static void start() {
String query[][] = sql.select("select id,host,type,tag,size,color,minvalue,maxvalue,delay from tags");
sql.close();
if (query == null) return;
JFLog.log("Loaded " + query.length + " tags");
for(int a=0;a<query.length;a++) {
Tag tag = new Tag();
tags.add(tag);
Expand Down Expand Up @@ -202,7 +205,7 @@ public static void start() {
}
tag.delay = JF.atoi(query[a][8]);
}
restart();
restart(true);
}
public static void stop() {
synchronized (tagsLock) {
Expand Down
2 changes: 1 addition & 1 deletion projects/jfdataloggerplus/wix32.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" UpgradeCode="{429E2AD1-232C-4C24-9C78-8D06E506505B}" Version="0.3" Language="1033" Name="jfDataLoggerPlus" Manufacturer="Peter Quiring">
<Product Id="*" UpgradeCode="{429E2AD1-232C-4C24-9C78-8D06E506505B}" Version="0.4" Language="1033" Name="jfDataLoggerPlus" Manufacturer="Peter Quiring">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine"/>
<Media Id="1" Cabinet="files.cab" EmbedCab="yes" />
<UIRef Id="WixUI_Minimal" />
Expand Down
2 changes: 1 addition & 1 deletion projects/jfdataloggerplus/wix64.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" UpgradeCode="{741FCC9E-8DEC-415E-A05E-1115FEA9FA32}" Version="0.3" Language="1033" Name="jfDataLoggerPlus" Manufacturer="Peter Quiring">
<Product Id="*" UpgradeCode="{741FCC9E-8DEC-415E-A05E-1115FEA9FA32}" Version="0.4" Language="1033" Name="jfDataLoggerPlus" Manufacturer="Peter Quiring">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
<Media Id="1" Cabinet="files.cab" EmbedCab="yes" />
<UIRef Id="WixUI_Minimal" />
Expand Down

0 comments on commit dc58c48

Please sign in to comment.