/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to setups/ipecube/config.php

  • Committer: Suren A. Chilingaryan
  • Date: 2014-01-25 16:38:03 UTC
  • Revision ID: csa@dside.dyndns.org-20140125163803-mhmpyk4dpzz7qabw
Detach setups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
$TITLE = "KITCube";
3
 
$MODULES = array("graph", "wiki");
4
 
 
5
 
 
6
 
$EXPORT_FORMATS = array (
7
 
        "csv" => array(
8
 
            'title' => "CSV",
9
 
        ),
10
 
        "xls" => array(
11
 
            'title' => "Excel",
12
 
            'handler' => "EXCEL",
13
 
        ),
14
 
        "tdms" => array(
15
 
            'title' => "TDMS",
16
 
            'handler' => "LABVIEW",
17
 
            'type' => "tdms"
18
 
        )
19
 
);
20
 
 
21
 
 
22
 
$READER_DB_IPECUBE = array(
23
 
        "ipecube" => array (
24
 
            "title" => _("KIT Cube"),
25
 
            "reader" => "IPEReader",
26
 
            "driver" => "mysql",
27
 
            "host" => "ipepdvsrv1",
28
 
            "port" => 3306,
29
 
            "user" => "adei",
30
 
            "password" => "adei",
31
 
            "database" => array("kitcube_active"),
32
 
            "charset" => "ISO8859-1",
33
 
            "timeout" => 200000,        // us
34
 
//          "ping" => true,             // host and port should be specified
35
 
//          "disconnected" => true
36
 
        )
37
 
);
38
 
 
39
 
if (is_array($READER_DB)) $READER_DB = array_merge($READER_DB_IPECUBE, $READER_DB);
40
 
else $READER_DB = $READER_DB_IPECUBE;
41
 
 
42
 
 
43
 
$OPTIONS["ipecube"] = array(
44
 
            "groups" => array(
45
 
                "/^(.*)$/" => '${1}',
46
 
            ),
47
 
            "tables" => array(
48
 
                "/^(Data_[\w\d_]+)$/" => array(
49
 
//              "/^(Data_020_Ceilometer_chm|Data_025_JWD_dd|Data_099_System_log|Data_190_NF_dat)$/" => array(
50
 
                    'gid' => '${1}',
51
 
                    'title' => '${1}'
52
 
                )
53
 
            ),
54
 
            "columns" => array(
55
 
                "time" => "usec",
56
 
//              "data" => "/^PARS.PARS1.(N|Z|L|P)/",
57
 
                "data" => "/(AVG|MAX|MIN|STD|RES|SUM|INST)$/",
58
 
//              "custom" => "/^PARS.PARS1.(V|O)/",
59
 
                "custom" => "/(PROF|DIST)$/",
60
 
//              "data" => "/(AVG|SUM|RATE|RES|INST|MOM|MIN|MAX|STD|PPI|RHI|VER|VOL|PROF)$/"
61
 
            ),
62
 
            "sql_filters" => array(
63
 
                "/^PARS.PARS1.(V|O)/" => array("UNCOMPRESS")
64
 
            ),
65
 
            "timesort" => 1,                                    // 0 - NATURAL, 1 - ASC, -1 - DESC, string whith request
66
 
            "time_module" => "UNIXTicks",
67
 
            "time_options" => array("ticks_per_second" => 1000000),
68
 
//          "date_limit" => "2000-01-01 00:00:00",              //GMT
69
 
//          "date_limit" => array("2005-08-06 00:00:00","2005-08-08 00:00:00"),         //GMT
70
 
//          "date_limit" => "2008-03-29 21:00:00",              //GMT
71
 
            "time_format" => "U",
72
 
            "min_resolution" => 10,
73
 
            "ignore_subseconds" => true,
74
 
            "optimize_empty_cache" => true,
75
 
            "use_cache_timewindow" => true,
76
 
//          "use_cache_reader" => true,
77
 
            "custom_data_filters" => array(
78
 
                array(
79
 
                    "class" =>  "ITEMFilter",
80
 
                    "filter" => "BLOBDecoderItemFilter",
81
 
                    "item_mask" => "/^[^\d]/",
82
 
                    "format" => 'd*'
83
 
#                    "decoder" => function($value) { return unpack('d*', $value);  }
84
 
                )
85
 
            ),
86
 
            "use_md5_postfix" => true,
87
 
            "null_value" => "",
88
 
            "axes_table" => array(
89
 
                "table" => "Axislist",
90
 
                "id" => "id",
91
 
                "properties" => array(
92
 
                    "axis_name" => "comment",
93
 
                    "axis_units" => "unit"
94
 
                )
95
 
            ),
96
 
            "item_table" => array(
97
 
                "table" => "Sensorlist",
98
 
                "id" => "name",
99
 
                //"gid" => "group",
100
 
                "properties" => array(
101
 
                    "name" => "comment",
102
 
                    "axis" => "axis"
103
 
                )
104
 
            )
105
 
);
106
 
 
107
 
$OPTIONS["ipecube__kitcube_active__Data_030_PARS_dat"] = array(
108
 
            "data_extractors" => array(
109
 
                array(
110
 
                    "filter" => "SUMExtractor",
111
 
                    "output_mask" => "/sum/",
112
 
                    "item_mask" => array(
113
 
                        "key" => "column",
114
 
                        "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
115
 
                    )
116
 
                )
117
 
            ),
118
 
            "data_filters" => array(
119
 
                array (
120
 
                    "class" => "ITEMFilter",
121
 
                    "filter" => "RANGEItemFilter",
122
 
                    "item_mask" => array(
123
 
                        array(
124
 
                            "key" => "item_dependency_column",
125
 
                            "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
126
 
                        ),
127
 
                        array(
128
 
                            "key" => "item_extractor",
129
 
                            "items" => "/^SUMExtractor$/",
130
 
                        )
131
 
                    ),
132
 
                    "min" => 100
133
 
                
134
 
                ),
135
 
                array (
136
 
                    "class" => "ITEMFilter",
137
 
                    "filter" => "NULLItemFilter",
138
 
                    "item_mask" => array(
139
 
                        array(
140
 
                            "key" => "item_dependency_column",
141
 
                            "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
142
 
                        ),
143
 
                        array(
144
 
                            "key" => "item_extractor",
145
 
                            "items" => "/^SUMExtractor$/",
146
 
                        )
147
 
                    )
148
 
                
149
 
                )
150
 
            )
151
 
);