X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.history%2Fsrc-isv%2Ftrend_collector.mediawiki;fp=bundles%2Forg.simantics.history%2Fsrc-isv%2Ftrend_collector.mediawiki;h=8137cbff5990bc3bb5213ec26059cc2073a88003;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git 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 index 000000000..8137cbff5 --- /dev/null +++ b/bundles/org.simantics.history/src-isv/trend_collector.mediawiki @@ -0,0 +1,94 @@ +=History and Collector in Charts and Trends= +There is a specified way how trend manages the items in the history. +The "id"-field of an history item has the following format: "subscriptionId-variableId-formatId". +Therefore the files are named in the same notation (appended with the different extensions ".data", ".txt", ".index"). + +The trend's history item format has the following record: + { + id : String, + variableId : String, // Simantics RVI + format : Datatype, + deadband : Double, // NaN = No deadband + interval : Double, + gain : Double, + bias : Double, + enabled : Boolean, + groupId : String, // Subscription Id + groupItemId : String, // Subscription Item Id + formatId : String // One of: "all", "100ms", "1s", "10s", "60s", or "minmax" + } + + +Each datasource variable is sampled into 5-6 separated files with different interval. +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. +{| border="1" cellpadding="3" cellspacing="0" align="center" +|- style="background-color: #f9f9f9;" +|'''SamplingFormat-Id''' +|'''Description''' +|- +|"all" +|All datasource samples are stored here. +|- +|"100ms" +|Samples are written with (atleast) 100ms interval. +|- +|"1s" +|Samples are written with (atleast) 1000ms interval. +|- +|"10s" +|Samples are written with (atleast) 10000ms interval. +|- +|"60s" +|Samples are written with (atleast) 60000ms interval. +|- +|"minmax" +|File contains only one sample and it has fields { time, value, endTime, min, max }. Not used for with binary variable. +|} + +The file format for analog variables is the following: +{| border="1" cellpadding="3" cellspacing="0" align="center" +|- style="background-color: #f9f9f9;" +|'''SamplingFormat-Id''' +|'''Sample RecordType''' +|- +|"all" +|{ time:Double, endTime:Double, value:Double, quality:Byte } +|- +|"100ms" +|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } +|- +|"1s" +|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } +|- +|"10s" +|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } +|- +|"60s" +|{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } +|- +|"minmax" +|{ time:Double, endTime:Double, value:Double, min:Double, max:Double } +|} + +The file format for binary variables is the following: +{| border="1" cellpadding="3" cellspacing="0" align="center" +|- style="background-color: #f9f9f9;" +|'''SamplingFormat-Id''' +|'''Sample RecordType''' +|- +|"all" +|{ time:Double, endTime:Double, value:Byte, quality:Byte } +|- +|"100ms" +|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } +|- +|"1s" +|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } +|- +|"10s" +|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } +|- +|"60s" +|{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } +|} +