Changeset: 7d4e342fbc94 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d4e342fbc94
Modified Files:
        sql/backends/monet5/iot/50_iot.sql
        sql/backends/monet5/iot/Tests/ais/ais01.sql
        sql/backends/monet5/iot/petrinet.c
Branch: iot
Log Message:

Fixed heartbeats validation, cleaned some spaces


diffs (57 lines):

diff --git a/sql/backends/monet5/iot/50_iot.sql 
b/sql/backends/monet5/iot/50_iot.sql
--- a/sql/backends/monet5/iot/50_iot.sql
+++ b/sql/backends/monet5/iot/50_iot.sql
@@ -66,10 +66,10 @@ create procedure iot.export("schema" str
 -- input/output places
 create procedure iot.receptor("schema" string, "table" string, dir string)
        external name iot.receptor;
+
 create procedure iot.emitter("schema" string, "table" string, dir string)
        external name iot.emitter;
 
-
 create procedure iot.heartbeat("schema" string, "table" string, msec integer)
        external name iot.heartbeat;
 
@@ -84,7 +84,6 @@ create procedure iot.cycles("schema" str
        external name iot.cycles;
 
 -- Inspection tables
-
 create function iot.gettumble("schema" string, "table" string) returns integer
 external name iot.gettumble;
 
@@ -118,7 +117,6 @@ returns table( "table" string, error str
 external name iot.errors;
 
 -- tables for iotwebserver
-
 CREATE TABLE iot.webserverstreams (table_id INTEGER, base TINYINT, "interval" 
INTEGER NULL, unit CHAR(1) NULL);
 
 CREATE TABLE iot.webservercolumns (column_id INTEGER, special TINYINT NULL, 
validation1 STRING NULL, validation2 STRING NULL);
diff --git a/sql/backends/monet5/iot/Tests/ais/ais01.sql 
b/sql/backends/monet5/iot/Tests/ais/ais01.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais01.sql
+++ b/sql/backends/monet5/iot/Tests/ais/ais01.sql
@@ -11,7 +11,7 @@ INSERT INTO iot.webserverstreams
        SELECT tabl.id, 2 , 8, 's' FROM sys.tables tabl INNER JOIN sys.schemas 
sch ON tabl.schema_id = sch.id WHERE tabl.name = 'vessels' AND sch.name = 'ais';
 
 -- We don't set the tumbling, so no tuple will be reused in the following 
window
-CALL iot.heartbeat('ais', 'vessels', 8000); 
+CALL iot.heartbeat('ais', 'vessels', 8000);
 
 --Q1 Calculate speed of ships per hour (in knots) -- Stream only
 
diff --git a/sql/backends/monet5/iot/petrinet.c 
b/sql/backends/monet5/iot/petrinet.c
--- a/sql/backends/monet5/iot/petrinet.c
+++ b/sql/backends/monet5/iot/petrinet.c
@@ -107,8 +107,8 @@ PNheartbeat(str mod, str fcn, int ticks)
 {
        int i;
 
-       if (ticks <= 0)
-               throw(MAL,"iot.heartbeat","The heartbeat should be > 0\n");
+       if (ticks < 0)
+               throw(MAL,"iot.heartbeat","The heartbeat should be >= 0\n");
 
        for(i = 0; i < pnettop; i++) {
                if(strcmp(pnet[i].modname,mod) == 0 && 
strcmp(pnet[i].fcnname,fcn) == 0) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to