aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2011-11-14 02:34:26 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2011-11-14 02:34:26 +0000
commitbd74d664ca2438c73277623fcbdd956a6981160e (patch)
treed070f026f2e8e7a327d793a139ecec9f4223ab6b
parent882643c1377fb19a3f77dcb6ab250bc3a27dbb08 (diff)
downloadverteco-bd74d664ca2438c73277623fcbdd956a6981160e.tar.gz
Add crude intervalid.
-rw-r--r--interval.txt1
-rw-r--r--modbuslog.c13
2 files changed, 12 insertions, 2 deletions
diff --git a/interval.txt b/interval.txt
new file mode 100644
index 0000000..368f89c
--- /dev/null
+++ b/interval.txt
@@ -0,0 +1 @@
+28 \ No newline at end of file
diff --git a/modbuslog.c b/modbuslog.c
index c2b34b7..d664c2f 100644
--- a/modbuslog.c
+++ b/modbuslog.c
@@ -260,10 +260,19 @@ int main(int argc, char *argv[]) {
struct tm utc = *gmtime(&unixtime_min);
struct tm lc = *localtime(&unixtime_min);
+
+ int intervalvalue;
+ FILE *intervalfile = fopen("interval.txt", "w+");
+ fscanf(intervalfile, "%d", &intervalvalue);
+ intervalvalue++;
+ fprintf(intervalfile, "%d", intervalvalue);
+ fclose(intervalfile);
+
+
fprintf(
filehandle,
- "1|%04i%02i%02i|%02i%02i%02i|%04i%02i%02i|%02i%02i%02i|%i|%i|%i\n",
- utc.tm_year + 1900, utc.tm_mon + 1, utc.tm_mday,
+ "%i|%04i%02i%02i|%02i%02i%02i|%04i%02i%02i|%02i%02i%02i|%i|%i|%i\n",
+ intervalvalue,utc.tm_year + 1900, utc.tm_mon + 1, utc.tm_mday,
utc.tm_hour, utc.tm_min, utc.tm_sec, lc.tm_year + 1900,
lc.tm_mon + 1, lc.tm_mday, lc.tm_hour, lc.tm_min,
lc.tm_sec, slaveid, startaddress, registervalue);
nd-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# UK, Kilvey Hill
# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
T 529833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE