]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.history/src-isv/trend_collector.mediawiki
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.history / src-isv / trend_collector.mediawiki
diff --git a/bundles/org.simantics.history/src-isv/trend_collector.mediawiki b/bundles/org.simantics.history/src-isv/trend_collector.mediawiki
new file mode 100644 (file)
index 0000000..8137cbf
--- /dev/null
@@ -0,0 +1,94 @@
+=History and Collector in Charts and Trends=\r
+There is a specified way how trend manages the items in the history. \r
+The "id"-field of an history item has the following format: "subscriptionId-variableId-formatId". \r
+Therefore the files are named in the same notation (appended with the different extensions ".data", ".txt", ".index").\r
+\r
+The trend's history item format has the following record:\r
+ {\r
+     id : String,\r
+     variableId : String,         // Simantics RVI\r
+     format : Datatype,\r
+     deadband : Double,           // NaN = No deadband\r
+     interval : Double,\r
+     gain : Double,\r
+     bias : Double,\r
+     enabled : Boolean,\r
+     groupId : String,            // Subscription Id\r
+     groupItemId : String,        // Subscription Item Id\r
+     formatId : String            // One of: "all", "100ms", "1s", "10s", "60s", or "minmax"\r
+ }\r
+\r
+\r
+Each datasource variable is sampled into 5-6 separated files with different interval. \r
+The sampling formats are named. Some formats may be omited if subscription configuration suggests so. For example, if "subscription interval = 250ms" then, the files "all" and "100ms" are omited.\r
+{| border="1" cellpadding="3" cellspacing="0" align="center"\r
+|- style="background-color: #f9f9f9;"\r
+|'''SamplingFormat-Id'''\r
+|'''Description'''\r
+|- \r
+|"all"\r
+|All datasource samples are stored here.\r
+|-\r
+|"100ms"\r
+|Samples are written with (atleast) 100ms interval.   \r
+|-\r
+|"1s"\r
+|Samples are written with (atleast) 1000ms interval.\r
+|-\r
+|"10s"\r
+|Samples are written with (atleast) 10000ms interval.\r
+|-\r
+|"60s"\r
+|Samples are written with (atleast) 60000ms interval.\r
+|-\r
+|"minmax"\r
+|File contains only one sample and it has fields { time, value, endTime, min, max }. Not used for with binary variable.\r
+|}\r
+\r
+The file format for analog variables is the following:\r
+{| border="1" cellpadding="3" cellspacing="0" align="center"\r
+|- style="background-color: #f9f9f9;"\r
+|'''SamplingFormat-Id'''\r
+|'''Sample RecordType'''\r
+|- \r
+|"all"\r
+|{ time:Double, endTime:Double, value:Double, quality:Byte }\r
+|-\r
+|"100ms"\r
+|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte }   \r
+|-\r
+|"1s"\r
+|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte }\r
+|-\r
+|"10s"\r
+|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte }\r
+|-\r
+|"60s"\r
+|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte }\r
+|-\r
+|"minmax"\r
+|{ time:Double, endTime:Double, value:Double, min:Double, max:Double }\r
+|}\r
+\r
+The file format for binary variables is the following:\r
+{| border="1" cellpadding="3" cellspacing="0" align="center"\r
+|- style="background-color: #f9f9f9;"\r
+|'''SamplingFormat-Id'''\r
+|'''Sample RecordType'''\r
+|-\r
+|"all"\r
+|{ time:Double, endTime:Double, value:Byte, quality:Byte }\r
+|-\r
+|"100ms"\r
+|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte }   \r
+|-\r
+|"1s"\r
+|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte }\r
+|-\r
+|"10s"\r
+|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte }\r
+|-\r
+|"60s"\r
+|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte }\r
+|}\r
+\r