/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to setups/kitcube2/config.php

  • Committer: Suren A. Chilingaryan
  • Date: 2012-07-14 17:44:09 UTC
  • Revision ID: csa@dside.dyndns.org-20120714174409-cuzsy4vupyjx9lia
Update of 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_KITCUBE = array(
23
 
        "kitcube" => 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_KITCUBE, $READER_DB);
40
 
else $READER_DB = $READER_DB_KITCUBE;
41
 
 
42
 
 
43
 
$OPTIONS["kitcube"] = 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
 
                "custom" => "/^PARS.PARS1.(V|O)/",
58
 
//              "data" => "/(AVG|SUM|RATE|RES|INST|MOM|MIN|MAX|STD|PPI|RHI|VER|VOL|PROF)$/"
59
 
            ),
60
 
            "sql_filters" => array(
61
 
                "/^PARS.PARS1.(V|O)/" => array("UNCOMPRESS")
62
 
            ),
63
 
            "timesort" => 1,                                    // 0 - NATURAL, 1 - ASC, -1 - DESC, string whith request
64
 
            "time_module" => "UNIXTicks",
65
 
            "time_options" => array("ticks_per_second" => 1000000),
66
 
//          "date_limit" => "2000-01-01 00:00:00",              //GMT
67
 
//          "date_limit" => array("2005-08-06 00:00:00","2005-08-08 00:00:00"),         //GMT
68
 
//          "date_limit" => "2008-03-29 21:00:00",              //GMT
69
 
            "time_format" => "U",
70
 
            "min_resolution" => 10,
71
 
            "ignore_subseconds" => true,
72
 
            "optimize_empty_cache" => true,
73
 
            "use_cache_timewindow" => true,
74
 
//          "use_cache_reader" => true,
75
 
            "custom_data_filters" => array(
76
 
                array(
77
 
                    "class" =>  "ITEMFilter",
78
 
                    "filter" => "BLOBDecoderItemFilter",
79
 
                    "item_mask" => "/^[^\d]/",
80
 
                    "format" => 'd*'
81
 
#                    "decoder" => function($value) { return unpack('d*', $value);  }
82
 
                )
83
 
            ),
84
 
            "use_md5_postfix" => true,
85
 
            "null_value" => "",
86
 
            "axes_table" => array(
87
 
                "table" => "Axislist",
88
 
                "id" => "id",
89
 
                "properties" => array(
90
 
                    "axis_name" => "comment",
91
 
                    "axis_units" => "unit"
92
 
                )
93
 
            ),
94
 
            "item_table" => array(
95
 
                "table" => "Sensorlist",
96
 
                "id" => "name",
97
 
                //"gid" => "group",
98
 
                "properties" => array(
99
 
                    "name" => "comment",
100
 
                    "axis" => "axis"
101
 
                )
102
 
            )
103
 
);
104
 
 
105
 
$OPTIONS["kitcube__kitcube_active__Data_030_PARS_dat"] = array(
106
 
            "data_extractors" => array(
107
 
                array(
108
 
                    "filter" => "SUMExtractor",
109
 
                    "output_mask" => "/sum/",
110
 
                    "item_mask" => array(
111
 
                        "key" => "column",
112
 
                        "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
113
 
                    )
114
 
                )
115
 
            ),
116
 
            "data_filters" => array(
117
 
                array (
118
 
                    "class" => "ITEMFilter",
119
 
                    "filter" => "RANGEItemFilter",
120
 
                    "item_mask" => array(
121
 
                        array(
122
 
                            "key" => "item_dependency_column",
123
 
                            "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
124
 
                        ),
125
 
                        array(
126
 
                            "key" => "item_extractor",
127
 
                            "items" => "/^SUMExtractor$/",
128
 
                        )
129
 
                    ),
130
 
                    "min" => 100
131
 
                
132
 
                ),
133
 
                array (
134
 
                    "class" => "ITEMFilter",
135
 
                    "filter" => "NULLItemFilter",
136
 
                    "item_mask" => array(
137
 
                        array(
138
 
                            "key" => "item_dependency_column",
139
 
                            "items" => "/^PARS.PARS1.O.ND2.001.SUM$/",
140
 
                        ),
141
 
                        array(
142
 
                            "key" => "item_extractor",
143
 
                            "items" => "/^SUMExtractor$/",
144
 
                        )
145
 
                    )
146
 
                
147
 
                )
148
 
            )
149
 
);