src.dualinventive.com/mtinfo/dist/webroot/main/include/db_logtables.php

1438 lines
58 KiB
PHP

<?php
/** \file include/db_logtables.php
* \brief DI webinterface log tables
* \author Rob Schalken, Core|Vision
* \version $Revision: 1.1.2.2 $
* \date $Date: 2014/10/15 16:24:06 $
*
* Log table definitions
*/
global $_LOGTABLES;
$_LOGTABLES = array(
'log_zkl' => array(
0 => array(
'category' => 'start-up',
0 => array('table' => 'log_startup')
),
1 => array(
'category' => 'meting aan',
0 => array('table' => 'log_metingstart')
),
2 => array(
'category' => 'meting uit',
0 => array('table' => 'log_metingstart')
),
3 => array(
'category' => 'det. ok',
0 => array('table' => 'log_kortsluiting')
),
4 => array(
'category' => 'det. alarm',
0 => array('table' => 'log_kortsluiting')
),
5 => array(
'category' => 'meting',
0x10 => array(
'type' => 'details (black-box)',
'table' => 'log_meting'
),
0x90 => array(
'type' => 'details (datacompressie)',
'table' => 'log_meting',
'columns' => array(
2 => array(
'eval' => "\$avg_rms = \$val; echo \$val;",
'text' => ""
),
4 => array(
'eval' => "\$avg_b_a = \$val; echo \$val;",
'text' => ""
)
)
),
0x00 => array(
'type' => 'aangehouden (batterij leeg)',
'table' => 'log_kortsluiting'
),
0x01 => array(
'type' => 'afgebroken',
'table' => 'log_kortsluiting'
),
0x02 => array(
'type' => 'nieuwe meting na afwijkende meting',
'table' => 'log_kortsluiting'
),
0x03 => array(
'type' => 'meetfout: tweede sweep binnen 60s',
'table' => 'log_kortsluiting'
),
0x20 => array(
'type' => 'relais geopend',
'table' => 'log_relais'
),
0x21 => array(
'type' => 'relais gesloten',
'table' => 'log_relais'
),
0x11 => array(
'type' => 'freq. sweep',
'table' => 'log_calibratiestart'
),
0x22 => array(
'type' => 'autocal. start',
'table' => 'log_calibratiestart'
),
0x23 => array(
'type' => 'autocal. einde',
'table' => 'log_calibratiestart'
),
0x18 => array(
'type' => 'b/a-grens en pwm freq.',
'table' => 'log_calibratie'
),
0x24 => array(
'type' => 'b/a-grens',
'table' => 'log_calibratie'
),
0x28 => array(
'type' => 'natws',
'table' => 'log_meting_natws'
),
0x80 => array(
'type' => 'samples: V<sub>ref</sub>, ruwe data',
'table' => 'log_samples',
'columns' => array(
2 => array(
'eval' => "\$plot = array(); \$plot[0] = \$row['id'];",
'text' => ""
)
)
),
0x81 => array(
'type' => 'samples: V<sub>measure</sub>, ruwe data',
'table' => 'log_samples',
'columns' => array(
2 => array(
'eval' => "\$plot[1] = \$row['id'];",
'text' => ""
)
)
),
0x82 => array(
'type' => 'samples: V<sub>ref</sub>, gefilterd',
'table' => 'log_samples',
'columns' => array(
2 => array(
'eval' => "\$plot[2] = \$row['id'];",
'text' => ""
)
)
),
0x83 => array(
'type' => 'samples: V<sub>measure</sub>, gefilterd',
'table' => 'log_samples',
'columns' => array(
2 => array(
'eval' =>
"\$plot[3] = \$row['id'];" .
"\$inline_data = implode(',', \$plot);",
'text' =>
"Grafiek samples: " .
"<a href=\"plot-samples.php?db=%2\$s&zkl=%1\$u&plot=%4\$s&show=0,1\" target=\"_PLOT_SAMPLES_RAW\">ruwe data</a>" .
", " .
"<a href=\"plot-samples.php?db=%2\$s&zkl=%1\$u&plot=%4\$s&show=2,3\" target=\"_PLOT_SAMPLES_FIR\">gefilterde data</a>" .
", " .
"<a href=\"plot-samples.php?db=%2\$s&zkl=%1\$u&plot=%4\$s\" target=\"_PLOT_SAMPLES_ALL\">beide</a>"
)
)
),
0x12 => array(
'type' => '&sum;&nbsp;V<sub>ref</sub>, &sum;&nbsp;V<sub>measure</sub>',
'table' => 'log_meting_detail',
'columns' => array(
'count' => 4, // minding the 'id' field
1 => array(
'eval' => "\$a = \$val; echo \$val;",
'text' => ""
),
2 => array(
'eval' => "\$b = \$val; echo \$val;",
'text' => ""
),
3 => array(
'title' => "echo 'b/a';",
'eval' =>
"\$b_a = \$b / \$a;" .
"if( abs(\$b_a - \$avg_b_a) > 0.020 ) {" .
" \$markb = \"<b>--&gt; \" . \"wijkt af van het gemiddelde\" . \": \"; \$marke = \" &lt;--</b>\";" .
"} else {" .
" \$markb = \"\"; \$marke = \"\";" .
"}" .
"echo \$markb . sprintf(\"%.3f\", \$b_a) . \$marke;",
'text' => ""
)
)
),
0x13 => array(
'type' => '&sum;&nbsp;V<sub>ref</sub>, &sum;V&nbsp;<sub>measure</sub> buiten grenzen',
'table' => 'log_meting_detail'
),
0x15 => array(
'type' => 'DC(V<sub>ref</sub>), DC(V<sub>measure</sub>)',
'table' => 'log_meting_detail'
),
0x16 => array(
'type' => 'RMS(V<sub>ref</sub>), RMS(V<sub>measure</sub>)',
'table' => 'log_meting_detail',
'columns' => array(
'count' => 4, // minding the 'id' field
1 => array(
'eval' => "\$rms = \$val; echo \$val;",
'text' => ""
),
3 => array(
'title' => "echo 'opmerkingen';",
'eval' =>
"if( abs(\$rms - \$avg_rms) > 100 ) {" .
" \$markb = \"<b>--&gt; \" . \"wijkt af van het gemiddelde\"; \$marke = \" &lt;--</b>\";" .
" echo \$markb . \$marke;" .
"}",
text => ""
)
)
),
),
6 => array(
'category' => 'batterij',
0x10 => array(
'type' => 'niveau',
'table' => 'log_batterij',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x18 => array(
'type' => 'leeftijd',
'table' => 'log_batterij',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x00 => array(
'type' => 'status: alarm',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x01 => array(
'type' => 'status: leeg',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x02 => array(
'type' => 'status: ok/geplaatst',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x03 => array(
'type' => 'status: verwijderd',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x11 => array(
'type' => 'selectie',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
0x12 => array(
'type' => 'foutieve selectie',
'table' => 'log_batterijstatus',
'columns' => array(
2 => array(
'eval' => 'echo sprintf("%u:%02u:%02u", $val / 3600, ($val / 60) % 60, $val % 60);',
'text' => ""
)
)
),
//'select' => 'batterij'
),
7 => array(
'category' => 'knop',
0x00 => array(
'type' => array(
"0004" => 'meting aan (sleutel OPERATIONEEL&larr;Aan)',
"*" => 'meting aan/uit (knop)'
),
'table' => 'log_knop'
),
0x01 => array(
'type' => array(
"0004" => 'meting aan (sleutel Operationeel&rarr;AAN)',
"*" => 'meting aan/uit (knop)'
),
'table' => 'log_knop'
),
0x02 => array(
'type' => 'meting uit (sleutel Uit&rarr;OPERATIONEEL)',
'table' => 'log_knop'
),
0x03 => array(
'type' => 'meting uit (sleutel UIT&larr;Operationeel)',
'table' => 'log_knop'
),
0x08 => array(
'type' => 'meting uit (auto)',
'table' => 'log_knop'
),
0x09 => array(
'type' => 'meting aan (auto)',
'table' => 'log_knop'
),
0x80 => array(
'type' => 'meting uit (web i/f)',
'table' => 'log_knop'
),
0x81 => array(
'type' => 'meting aan (web i/f)',
'table' => 'log_knop'
),
0x10 => array(
'type' => 'LEDs laag (knop)',
'table' => 'log_knop'
),
0x11 => array(
'type' => 'LEDs hoog (knop)',
'table' => 'log_knop'
),
0x18 => array(
'type' => 'LEDs laag (auto)',
'table' => 'log_knop'
),
0x19 => array(
'type' => 'LEDs hoog (auto)',
'table' => 'log_knop'
),
0x90 => array(
'type' => 'LEDs laag (web i/f)',
'table' => 'log_knop'
),
0x91 => array(
'type' => 'LEDs hoog (web i/f)',
'table' => 'log_knop'
),
0x20 => array(
'type' => 'lantaarn uit (knop)',
'table' => 'log_knop'
),
0x21 => array(
'type' => 'lantaarn aan (knop)',
'table' => 'log_knop'
),
0x28 => array(
'type' => 'lantaarn uit (auto)',
'table' => 'log_knop'
),
0x29 => array(
'type' => 'lantaarn aan (auto)',
'table' => 'log_knop'
),
0xA0 => array(
'type' => 'lantaarn uit (web i/f)',
'table' => 'log_knop'
),
0xA1 => array(
'type' => 'lantaarn aan (web i/f)',
'table' => 'log_knop'
),
0x30 => array(
'type' => 'autocalibratie aan/uit (knop)',
'table' => 'log_knop'
),
0x31 => array(
'type' => 'autocalibratie aan/uit (knop)',
'table' => 'log_knop'
),
0x38 => array(
'type' => 'autocalibratie aan/uit (auto)',
'table' => 'log_knop'
),
0x39 => array(
'type' => 'autocalibratie aan/uit (auto)',
'table' => 'log_knop'
),
0xB0 => array(
'type' => 'autocalibratie aan/uit (web i/f)',
'table' => 'log_knop'
),
0xB1 => array(
'type' => 'autocalibratie aan/uit (web i/f)',
'table' => 'log_knop'
),
0x40 => array(
'type' => 'sturing ext. contact uit (knop)',
'table' => 'log_knop'
),
0x41 => array(
'type' => 'sturing ext. contact aan (knop)',
'table' => 'log_knop'
),
0x48 => array(
'type' => 'sturing ext. contact uit (auto)',
'table' => 'log_knop'
),
0x49 => array(
'type' => 'sturing ext. contact aan (auto)',
'table' => 'log_knop'
),
0xC0 => array(
'type' => 'sturing ext. contact uit (web i/f)',
'table' => 'log_knop'
),
0xC1 => array(
'type' => 'sturing ext. contact aan (web i/f)',
'table' => 'log_knop'
),
0x50 => array(
'type' => 'gps 5V uit (knop)',
'table' => 'log_knop'
),
0x51 => array(
'type' => 'gps 5V aan (knop)',
'table' => 'log_knop'
),
0x58 => array(
'type' => 'gps 5V uit (auto)',
'table' => 'log_knop'
),
0x59 => array(
'type' => 'gps 5V aan (auto)',
'table' => 'log_knop'
),
0xD0 => array(
'type' => 'gps 5V uit (web i/f)',
'table' => 'log_knop'
),
0xD1 => array(
'type' => 'gps 5V aan (web i/f)',
'table' => 'log_knop'
),
0x60 => array(
'type' => 'sturing relais uit (knop)',
'table' => 'log_knop'
),
0x61 => array(
'type' => 'sturing relais aan (knop)',
'table' => 'log_knop'
),
0x68 => array(
'type' => 'sturing relais uit (auto)',
'table' => 'log_knop'
),
0x69 => array(
'type' => 'sturing relais aan (auto)',
'table' => 'log_knop'
),
0xE0 => array(
'type' => 'sturing relais uit (web i/f)',
'table' => 'log_knop'
),
0xE1 => array(
'type' => 'sturing relais aan (web i/f)',
'table' => 'log_knop'
),
0x70 => array(
'type' => 'Switch 3000 uit (sleutel)',
'table' => 'log_knop'
),
0x71 => array(
'type' => 'Switch 3000 aan (sleutel)',
'table' => 'log_knop'
),
0x78 => array(
'type' => 'Switch 3000 uit (auto)',
'table' => 'log_knop'
),
0x79 => array(
'type' => 'Switch 3000 aan (auto)',
'table' => 'log_knop'
),
0xF0 => array(
'type' => 'Switch 3000 uit (web i/f)',
'table' => 'log_knop'
),
0xF1 => array(
'type' => 'Switch 3000 aan (web i/f)',
'table' => 'log_knop'
),
0xF2 => array(
'type' => 'Switch 3000 niet actief',
'table' => 'log_knop'
),
0xF3 => array(
'type' => 'Switch 3000 actief',
'table' => 'log_knop'
)
),
8 => array(
'category' => 'gsm/gprs/tcp',
0x00 => array(
'type' => 'opgestart',
'table' => 'log_peripheral'
),
0x01 => array(
'type' => 'modem gevonden',
'table' => 'log_peripheral'
),
0x02 => array(
'type' => 'gsm cmd fout',
'table' => 'log_peripheral'
),
0x03 => array(
'type' => 'gsm cmd ok',
'table' => 'log_peripheral'
),
0x04 => array(
'type' => 'gsm cmd time-out',
'table' => 'log_peripheral'
),
0x08 => array(
'type' => 'power on failed',
'table' => 'log_peripheral'
),
0x09 => array(
'type' => 'power off failed',
'title' => 'modem did not power off within the specified time-out',
'table' => 'log_peripheral'
),
0x0C => array(
'type' => 'reset',
'table' => 'log_peripheral'
),
0x0E => array(
'type' => 'power on',
'table' => 'log_peripheral'
),
0x0F => array(
'type' => 'power off',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'gsm details',
'table' => 'log_peripheral',
'columns' => array(
3 => array(
'eval' =>
"if( substr(\$val, 0, 1) == '+' ) {" .
" \$gsm_details[substr(\$val, 1, strcspn(\$val, ':', 1))] = htmlentities(\$val);" .
"}"
)
)
),
0x18 => array(
'type' => 'gsm signal quality',
'table' => 'log_peripheral',
'columns' => array(
'count' => 5,
2 => array(
'eval' => "\$rssi_ber = \$val; \$gsm_details['CSQ'] = '+CSQ: ' . \$val; echo \$val;",
'text' => "",
'extra' => array(
'eval' => "if( \$val != 0x00 && \$val != 0x07 ) " .
"{ \$extra_info .= 'signal: ' . (-113 + (((\$val >> 3) & 0x1F) * 2)) . \" dBm\"; }" .
"else " .
"{ \$extra_info .= 'unknown signal level and quality'; \$inhibit_value = TRUE; }", // don't process the array
array( 'mask' => 0x7, 'val' => 0, 'text' => 'bit error rate &lt; 0.2%%' ),
array( 'mask' => 0x7, 'val' => 1, 'text' => '0.2%% &lt; bit error rate &lt; 0.4%%' ),
array( 'mask' => 0x7, 'val' => 2, 'text' => '0.4%% &lt; bit error rate &lt; 0.8%%' ),
array( 'mask' => 0x7, 'val' => 3, 'text' => '0.8%% &lt; bit error rate &lt; 1.6%%' ),
array( 'mask' => 0x7, 'val' => 4, 'text' => '1.6%% &lt; bit error rate &lt; 3.2%%' ),
array( 'mask' => 0x7, 'val' => 5, 'text' => '3.2%% &lt; bit error rate &lt; 6.4%%' ),
array( 'mask' => 0x7, 'val' => 6, 'text' => '6.4%% &lt; bit error rate &lt; 12.8%%' ),
array( 'mask' => 0x7, 'val' => 7, 'text' => 'bit error rate &gt; 12.8%%' )
)
),
3 => array(
'title' => "echo 'received signal strength';",
'eval' => "if( \$rssi_ber != 0x00 && \$rssi_ber != 0x07 ) echo -113 + (((\$rssi_ber >> 3) & 0x1F) * 2) . \" dBm\";",
'text' => ""
),
4 => array(
'title' => "echo 'receive signal quality';",
'eval' => "if( \$rssi_ber != 0x00 && \$rssi_ber != 0x07 ) echo (\$rssi_ber & 0x7);",
'text' => ""
)
)
),
0x19 => array(
'type' => 'gsm registration',
'table' => 'log_peripheral',
'columns' => array(
2 => array(
'eval' =>
"if( \$val >= 0x31 && \$val <= 0x37 || \$val == 0x24 ) {" .
" echo '<font style=\"color: red; text-weight: bold; text-decoration: blink;\">';" .
" echo \$val;" .
" echo '</font>';" .
"}" .
"else if( \$val == 0x30 ) {" .
" if( \$gsm_power_on++ > 0 ) {".
" echo '<font style=\"color: red; text-weight: bold; text-decoration: blink;\">';" .
" echo \$val;" .
" echo '</font>';" .
" }".
" else echo \$val;" .
"}" .
"else {" .
" echo \$val;" .
" \$gsm_power_on = 0;" .
"}",
'text' => ""
)
)
),
0x1A => array(
'type' => 'gsm operator',
'table' => 'log_peripheral'
),
0x1B => array(
'type' => 'gsm location area code and cell ID',
'table' => 'log_peripheral'
),
0x20 => array(
'type' => 'error backtrace',
'table' => 'log_peripheral',
'columns' => array(
3 => array(
'text' => "",
'eval' =>
"if( !isset(\$backtrace) ) {" .
" \$backtrace = array('len' => intval(\$val, 16), 'data' => '');" .
" echo \$backtrace['len'];" .
"}" .
"else {".
" \$backtrace['data'] .= \$val;" .
" if( strlen(\$backtrace['data']) == \$backtrace['len'] * 2 ) {" .
" echo '<a href=\"showlog-hex2bin.php?filename=' . sprintf(\"%u-%04X%04X-%d.trc\", \$_GET['zkl'], \$rpgmcount, \$startup, \$row['id']) . '&data=' . \$backtrace['data'] . '\">Download backtrace for M2M Studio</a>';" .
" unset(\$backtrace);" .
" }" .
"}"
)
)
),
0x80 => array(
'type' => 'gprs details',
'table' => 'log_peripheral',
'extra' => array(
'eval' => "echo \$gsm_details['COPS'] . '<br>\n' . \$gsm_details['CREG'] . '<br>\n' . \$gsm_details['CGREG'] . '<br>\n' . \$gsm_details['CSQ'];"
)
),
0x81 => array(
'type' => 'gprs foutmelding',
'table' => 'log_peripheral',
'extra' => array(
'eval' => "echo \$gsm_details['COPS'] . '<br>\n' . \$gsm_details['CREG'] . '<br>\n' . \$gsm_details['CGREG'] . '<br>\n' . \$gsm_details['CSQ'];"
)
),
0x90 => array(
'type' => 'tcp error',
'table' => 'log_peripheral',
'extra' => array(
'eval' => "echo \$gsm_details['COPS'] . '<br>\n' . \$gsm_details['CREG'] . '<br>\n' . \$gsm_details['CGREG'] . '<br>\n' . \$gsm_details['CSQ'];"
)
),
0x91 => array(
'type' => 'tcp details',
'table' => 'log_peripheral',
'extra' => array(
'eval' => "echo \$gsm_details['COPS'] . '<br>\n' . \$gsm_details['CREG'] . '<br>\n' . \$gsm_details['CGREG'] . '<br>\n' . \$gsm_details['CSQ'];"
)
),
0xA0 => array(
'type' => 'tcp commando',
'table' => 'log_peripheral'
),
0xA1 => array(
'type' => 'tcp reply',
'table' => 'log_peripheral'
),
0xA2 => array(
'type' => 'tcp commando (to server)',
'table' => 'log_peripheral'
),
0xA3 => array(
'type' => 'tcp reply (from server)',
'table' => 'log_peripheral'
)
),
9 => array(
'category' => 'sms',
0x00 => array(
'type' => 'opgestart',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'verzoek tot zenden',
'table' => 'log_peripheral'
),
0x11 => array(
'type' => 'interne fout / niet verzonden',
'table' => 'log_peripheral'
),
0x20 => array(
'type' => 'in wachtrij',
'table' => 'log_sms'
),
0x21 => array(
'type' => 'verzonden',
'table' => 'log_sms'
),
0x22 => array(
'type' => 'foutmelding',
'table' => 'log_sms'
),
0x30 => array(
'type' => 'ontvangen',
'table' => 'log_sms'
)
),
10 => array(
'category' => 'peripherals',
0x00 => array(
'type' => 'opgestart',
'table' => 'log_peripheral'
),
0x01 => array(
'type' => 'I<sup>2</sup>C-bus or &micro;ALFAT reset',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'geen I<sup>2</sup>C-bus',
'table' => 'log_peripheral'
),
0x20 => array(
'type' => '&micro;ALFAT foutmelding',
'table' => 'log_peripheral'
),
0x21 => array(
'type' => 'logfile foutmelding',
'table' => 'log_peripheral'
),
0x22 => array(
'type' => 'index foutmelding',
'table' => 'log_peripheral'
),
0x23 => array(
'type' => 'logfile niet compleet',
'table' => 'log_peripheral'
),
0x24 => array(
'type' => 'log replay foutmelding',
'table' => 'log_peripheral'
),
0x30 => array(
'type' => 's/w I<sup>2</sup>C-bus fout',
'table' => 'log_peripheral'
),
0x40 => array(
'type' => 's/w 1-Wire fout',
'table' => 'log_peripheral'
),
0x50 => array(
'type' => 'CAN-bus fout',
'table' => 'log_peripheral'
),
0x60 => array(
'type' => 'switch3000 foutmelding',
'table' => 'log_peripheral'
),
0x61 => array(
'type' => 'switch3000 status',
'table' => 'log_peripheral'
),
0x62 => array(
'type' => 'switch3000 status',
'table' => 'log_switch3000',
'columns' => array(
1 => array(
'eval' => 'echo sprintf("%04Xh", $val);',
'text' => "",
'extra' => array(
array( 'mask' => 0x000F, 'val' => 0x0000, 'text' => "switch3000 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0001, 'text' => "switch3000 'uit', sectie 1 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0002, 'text' => "switch3000 'uit', sectie 2 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0003, 'text' => "switch3000 'uit', secties 1,2 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0004, 'text' => "switch3000 'uit', sectie 3 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0005, 'text' => "switch3000 'uit', secties 1,3 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0006, 'text' => "switch3000 'aan', secties 1,4 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0007, 'text' => "switch3000 'aan', sectie 4 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0008, 'text' => "switch3000 'uit', sectie 4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0009, 'text' => "switch3000 'aan', secties 2,3 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000A, 'text' => "switch3000 'uit', secties 2,4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x000B, 'text' => "switch3000 'aan', sectie 3 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000C, 'text' => "switch3000 'uit', secties 3,4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x000D, 'text' => "switch3000 'aan', sectie 2 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000E, 'text' => "switch3000 'aan', sectie 1 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000F, 'text' => "switch3000 'aan'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "switch3000 time-out" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "switch3000 fout" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0F00, 'val' => 0x0000, 'text' => "batterijen secties 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0100, 'text' => "batterijen sectie 1 'ok', secties 2,3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0200, 'text' => "batterijen sectie 2 'ok', secties 1,3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0300, 'text' => "batterijen secties 1,2 'ok', secties 3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0400, 'text' => "batterijen sectie 3 'ok', sectie 1,2,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0500, 'text' => "batterijen secties 1,3 'ok', secties 2,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0600, 'text' => "batterijen secties 2,3 'ok', secties 1,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0700, 'text' => "batterijen secties 1,2,3 'ok', sectie 4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0800, 'text' => "batterijen secties 4 'ok', secties 1,2,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0900, 'text' => "batterijen secties 1,4 'ok', secties 2,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0A00, 'text' => "batterijen secties 2,4 'ok', secties 1,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0B00, 'text' => "batterijen secties 1,2,4 'ok', sectie 3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0C00, 'text' => "batterijen secties 3,4 'ok', sectie 1,2 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0D00, 'text' => "batterijen secties 1,3,4 'ok', sectie 2 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0E00, 'text' => "batterijen secties 2,3,4 'ok', sectie 1 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0F00, 'text' => "batterijen secties 'ok'" ),
array( 'mask' => 0x8000, 'val' => 0x0000, 'text' => "batterij noodschakelaar 'alarm'" ),
array( 'mask' => 0x8000, 'val' => 0x8000, 'text' => "batterij noodschakelaar 'ok'" ),
)
)
)
),
0x64 => array(
'type' => 'teruggave',
'table' => 'log_switch3000_vrijgave'
),
0x66 => array(
'type' => 'teruggave',
'table' => 'log_switch3000_vrijgave'
),
0x68 => array(
'type' => 'switch3000 uit',
'table' => 'log_knop'
),
0x69 => array(
'type' => 'switch3000 aan',
'table' => 'log_knop'
),
0x70 => array(
'type' => 'pm3000 foutmelding',
'table' => 'log_peripheral'
),
0x78 => array(
'type' => 'pm3000: switch3000 power off',
'table' => 'log_knop'
),
0x79 => array(
'type' => 'pm3000: switch3000 power on',
'table' => 'log_knop'
),
0x7A => array(
'type' => 'pm3000: gpio5 power off',
'table' => 'log_knop'
),
0x7B => array(
'type' => 'pm3000: gpio5 power on',
'table' => 'log_knop'
),
0x7C => array(
'type' => 'pm3000: charger off',
'table' => 'log_knop'
),
0x7D => array(
'type' => 'pm3000: charger on',
'table' => 'log_knop'
),
0x7E => array(
'type' => 'pm3000: booster off',
'table' => 'log_knop'
),
0x7F => array(
'type' => 'pm3000: booster on',
'table' => 'log_knop'
)
),
11 => array(
'category' => 'gps',
0 => array(
'type' => 'uit',
),
1 => array(
'type' => 'aan (alleen 5V-circuit)',
),
2 => array(
'type' => 'aan (co&ouml;rdinaten zoeken)',
),
3 => array(
'type' => 't.b.d.',
),
0x08 => array(
'type' => 'foutmelding',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'gprs details (oude stijl)',
'table' => 'log_peripheral'
),
0x11 => array(
'type' => 'gprs foutmelding (oude stijl)',
'table' => 'log_peripheral'
),
0x20 => array(
'type' => 'tcp details (oude stijl)',
'table' => 'log_peripheral'
),
0x30 => array(
'type' => 'tcp commando (oude stijl)',
'table' => 'log_peripheral'
),
0x80 => array(
'type' => 'geofence design',
'table' => 'log_geofence'
),
0x81 => array(
'type' => 'geofence object',
'table' => 'log_geofence_object'
),
0x82 => array(
'type' => 'geofence point',
'table' => 'log_geofence_point'
),
0x87 => array(
'type' => 'delete geofence design',
'table' => 'log_geofence'
),
0x88 => array(
'type' => 'entering geofence',
'table' => 'log_geofence'
),
0x89 => array(
'type' => 'exiting geofence',
'table' => 'log_geofence'
)
),
12 => array(
'category' => 'aft',
0x00 => array(
'type' => 'start',
'table' => 'log_aft'
),
0x01 => array(
'type' => 'succes',
'table' => 'log_aft'
),
0x02 => array(
'type' => 'gefaald',
'table' => 'log_aft'
),
0xF0 => array(
'type' => 'resultaat',
'table' => 'log_aft',
'columns' => array(
1 => array(
'extra' => array(
array( 'mask' => 0xFF, 'val' => 0x00, 'text' => "AFT version (MSB: major, LSB: minor)" ),
array( 'mask' => 0xFF, 'val' => 0x01, 'text' => "read test" ),
array( 'mask' => 0xFF, 'val' => 0x02, 'text' => "write test" ),
array( 'mask' => 0xFF, 'val' => 0x08, 'text' => "automatic product serial number update" ),
array( 'mask' => 0xFF, 'val' => 0x09, 'text' => "configuration file error" ),
array( 'mask' => 0xFF, 'val' => 0x0A, 'text' => "report file error" ),
array( 'mask' => 0xFF, 'val' => 0x10, 'text' => "switch default value failure" ),
array( 'mask' => 0xFF, 'val' => 0x11, 'text' => "LED to switch connectivity failure" ),
array( 'mask' => 0xFF, 'val' => 0x14, 'text' => "32,768 kHz oscillator failed" ),
array( 'mask' => 0xFF, 'val' => 0x15, 'text' => "flash memory programming failure" ),
array( 'mask' => 0xFF, 'val' => 0x18, 'text' => "CN14 read-out (CN5=0) out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x19, 'text' => "CN14 read-out (CN5=1) out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x1A, 'text' => "LM75 read-out out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x1B, 'text' => "NTC test disabled in config" ),
array( 'mask' => 0xFF, 'val' => 0x20, 'text' => "GSM timed out" ),
array( 'mask' => 0xFF, 'val' => 0x21, 'text' => "GPS timed out" ),
array( 'mask' => 0xFF, 'val' => 0x30, 'text' => "auto-calibration failed" ),
array( 'mask' => 0xFF, 'val' => 0x31, 'text' => "rms too low (b/a is logged)" ),
array( 'mask' => 0xFF, 'val' => 0x34, 'text' => "auto-calibrated b/a out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x35, 'text' => "sample b/a out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x36, 'text' => "no short-cut: bad b/a (should be about 1.0)" ),
array( 'mask' => 0xFF, 'val' => 0x38, 'text' => "sample rms out of bounds (short circuit)" ),
array( 'mask' => 0xFF, 'val' => 0x39, 'text' => "sample rms out too low (no short circuit)" ),
array( 'mask' => 0xFF, 'val' => 0x3C, 'text' => "PWM period out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x3D, 'text' => "PWM amplitude out of bounds" ),
array( 'mask' => 0xFF, 'val' => 0x40, 'text' => "battery test failed (12V expected)" ),
array( 'mask' => 0xFF, 'val' => 0x41, 'text' => "battery test failed (0V expected)" ),
array( 'mask' => 0xFF, 'val' => 0x42, 'text' => "battery test disabled in config" ),
array( 'mask' => 0xFF, 'val' => 255, 'text' => "Debug" )
)
)
)
)
),
13 => array(
category => 'system',
0x06 => array(
'type' => 'mcu flash erased',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'nieuw serienummer',
),
0x11 => array(
'type' => 'nieuwe ID-code',
),
0x18 => array(
'type' => 'sturing relais uit',
'table' => 'log_relais'
),
0x19 => array(
'type' => 'sturing relais aan',
'table' => 'log_relais'
),
0x20 => array(
'type' => 'tijd ingesteld',
'table' => 'log_time',
'columns' => array(
2 => array(
'eval' => "date('Y-m-d H:i:s', \$val);"
)
)
),
0x30 => array(
'type' => 'gps co&ouml;rdinaten',
'table' => 'log_gps',
'columns' => array(
'count' => 9,
1 => array(
'eval' => "\$latitude = \$val; echo \$val;",
'text' => ""
),
2 => array(
'eval' => "\$longitude = \$val; echo \$val;",
'text' => ""
),
8 => array(
'title' => "echo 'Google Maps';",
'eval' =>
"echo sprintf(\"<a href=\\\"http://maps.google.com?q=%.7f,%.7f\\\" target=\\\"_GOOGLE_MAPS\\\">Google Maps</a>\", \$latitude, \$longitude);",
'text' => ""
)
)
),
0x31 => array(
'type' => 'gps co&ouml;rdinaten',
'table' => 'log_gps',
'columns' => array(
'count' => 9,
1 => array(
'eval' => "\$latitude = \$val; echo \$val;",
'text' => ""
),
2 => array(
'eval' => "\$longitude = \$val; echo \$val;",
'text' => ""
),
8 => array(
'title' => "echo 'Google Maps';",
'eval' =>
"echo sprintf(\"<a href=\\\"http://maps.google.com?q=%.7f,%.7f\\\" target=\\\"_GOOGLE_MAPS\\\">Google Maps</a>\", \$latitude, \$longitude);",
'text' => ""
)
)
),
0x3F => array(
'type' => 'gps timing'
),
0x40 => array(
'type' => 'temperatuur (on-board)',
'table' => 'log_temp'
),
0x41 => array(
'type' => 'temperatuur (extern via NTC)',
'table' => 'log_temp'
),
0x42 => array(
'type' => 'temperatuur (Switch3000)',
'table' => 'log_temp'
),
0x48 => array(
'type' => 'temperatuur (on-board)',
'table' => 'log_temp'
),
0x49 => array(
'type' => 'temperatuur (extern via NTC)',
'table' => 'log_temp'
),
0x4A => array(
'type' => 'temperatuur (Switch3000)',
'table' => 'log_temp'
),
//0x4F => array(
// 'type' => 'ntc config'
//),
0x50 => array(
'type' => 'enter power save',
'table' => 'log_peripheral'
),
0x51 => array(
'type' => 'exit power save',
'table' => 'log_peripheral'
),
0x80 => array(
'type' => 'trilling: geen',
'table' => 'log_trilling'
),
0x81 => array(
'type' => 'trilling: overig',
'table' => 'log_trilling'
),
0x82 => array(
'type' => 'trilling: trein',
'table' => 'log_trilling'
),
0x83 => array(
'type' => 'trilling: vervoer per auto',
'table' => 'log_trilling'
),
0x84 => array(
'type' => 'trilling: vervoer te voet',
'table' => 'log_trilling'
),
0x90 => array(
'type' => 'tiltsensor',
'table' => 'log_tilt'
),
0x98 => array(
'type' => 'railsensor: no metal'
),
0x99 => array(
'type' => 'railsensor: metal'
)
),
14 => array(
'category' => 'mcu',
0x00 => array(
'type' => 'oscillator fail',
'table' => 'log_peripheral'
),
0x01 => array(
'type' => 'address error',
'table' => 'log_peripheral'
),
0x02 => array(
'type' => 'stack error',
'table' => 'log_peripheral'
),
0x03 => array(
'type' => 'math error',
'table' => 'log_peripheral'
),
0x04 => array(
'type' => 'DMA controller error',
'table' => 'log_peripheral'
),
0x10 => array(
'type' => 'raised IPL',
'table' => 'log_peripheral'
),
0xF0 => array(
'type' => '(generieke data)',
'table' => 'log_peripheral'
),
),
15 => array(
'category' => 'tijdstempel'
)
),
'log_gebruiker' => array(
'log_gebruiker_faq' => array('table' => "log_gebruiker_faq"),
'log_gebruiker_gebruiker' => array('table' => "log_gebruiker_gebruiker"),
'log_gebruiker_klant ' => array('table' => "log_gebruiker_klant"),
'log_gebruiker_project' => array('table' => "log_gebruiker_project"),
'log_gebruiker_zkl' => array('table' => "log_gebruiker_zkl")
),
'log_tcp' => array(
'info' => array(
't' => array( 'fmt' => "%t" )
)
),
'log_versienummer' => array(
'info' => array(
't' => array( 'fmt' => "%t" )
)
),
'log_realtime' => array(
'info' => array(
'zkl' => array(
'eval' => '$extra_info .= $info["idcode"] . ", serienr " . $info["serienr"] . ", IMEI " . $info["imei"];'
),
't' => array(
'fmt' => "%t",
'eval' => '$extra_info .= "tijdzone: " . date("e", $val);'
),
't_gps' => array(
'fmt' => "%t",
'eval' => '$extra_info .= "tijdzone: " . date("e", $val);'
),
'changes' => array(
'fmt' => "%04X",
array( 'mask' => 0xFFFF, 'val' => 0x0000, 'text' => "(heartbeat)" ),
array( 'mask' => 0xFFFF, 'val' => 0xFFFF, 'text' => "(aanmelden)" ),
array( 'mask' => 0x0001, 'val' => 0x0001, 'text' => "mcu status" ),
array( 'mask' => 0x0002, 'val' => 0x0002, 'text' => "wcpu status" ),
array( 'mask' => 0x0004, 'val' => 0x0004, 'text' => "pm3000 status" ),
array( 'mask' => 0x0008, 'val' => 0x0008, 'text' => "switch3000 status" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "rms" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "b/a" ),
array( 'mask' => 0x0040, 'val' => 0x0040, 'text' => "natws" ),
array( 'mask' => 0x0080, 'val' => 0x0080, 'text' => "auto-calibratie" ),
array( 'mask' => 0x0800, 'val' => 0x0800, 'text' => "batterij selectie" ),
array( 'mask' => 0x0100, 'val' => 0x0100, 'text' => "batterij #1 niveau" ),
array( 'mask' => 0x0200, 'val' => 0x0200, 'text' => "batterij #2 niveau" ),
array( 'mask' => 0x1000, 'val' => 0x1000, 'text' => "temp on-board" ),
array( 'mask' => 0x2000, 'val' => 0x2000, 'text' => "temp extern" ),
array( 'mask' => 0x4000, 'val' => 0x4000, 'text' => "gps" ),
array( 'mask' => 0x8000, 'val' => 0x8000, 'text' => "gsm" ),
),
'mcu_state' => array(
'fmt' => "%04X",
array( 'mask' => 0x0001, 'val' => 0x0001, 'text' => "meting 'aan'" ),
array( 'mask' => 0x0001, 'val' => 0x0000, 'text' => "meting 'uit'" ),
array( 'mask' => 0x0002, 'val' => 0x0002, 'text' => "detectie 'ok'" ),
array( 'mask' => 0x0004, 'val' => 0x0004, 'text' => "meetfout geconstateerd" ),
array( 'mask' => 0x0008, 'val' => 0x0008, 'text' => "relais open" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "i2c fout" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "logfile fout" ),
array( 'mask' => 0x0040, 'val' => 0x0040, 'text' => "gsm/wcpu fout" ),
array( 'mask' => 0x0080, 'val' => 0x0080, 'text' => "sms fout" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0F00, 'val' => 0x0000, 'text' => "batterij 1 'ok'" ),
array( 'mask' => 0x0F00, 'val' => 0x0100, 'text' => "batterij 1 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0300, 'text' => "batterij 1 'leeg'" ),
array( 'mask' => 0x0F00, 'val' => 0x0700, 'text' => "batterij 1 'verwijderd'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0xF000, 'val' => 0x0000, 'text' => "batterij 2 'ok'" ),
array( 'mask' => 0xF000, 'val' => 0x1000, 'text' => "batterij 2 'alarm'" ),
array( 'mask' => 0xF000, 'val' => 0x3000, 'text' => "batterij 2 'leeg'" ),
array( 'mask' => 0xF000, 'val' => 0x7000, 'text' => "batterij 2 'verwijderd'" ),
),
'mcu_local_state' => array(
'fmt' => "%04X",
array( 'mask' => 0x0100, 'val' => 0x0100, 'text' => "auto-calibratie bezig" ),
array( 'mask' => 0x0200, 'val' => 0x0200, 'text' => "auto-calibratie gefaald" ),
array( 'mask' => 0x1000, 'val' => 0x1000, 'text' => "meting gedaan" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0001, 'val' => 0x0001, 'text' => "frequentie-sweep" ),
array( 'mask' => 0x0002, 'val' => 0x0002, 'text' => "amplitude-sweep" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0008, 'val' => 0x0008, 'text' => "gps aan voor track&amp;trace" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "gps co&ouml;rdinaten ontvangen" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "gps tijd ontvangen" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0040, 'val' => 0x0040, 'text' => "leds 'hoog'" ),
array( 'mask' => 0x0080, 'val' => 0x0080, 'text' => "lantaarn 'aan'" ),
array( 'mask' => 0x0400, 'val' => 0x0400, 'text' => "extern contact 'aan'" ),
array( 'mask' => 0x0800, 'val' => 0x0800, 'text' => "relais-aansturing 'aan'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x2000, 'val' => 0x2000, 'text' => "gsm: geregistreerd" ),
array( 'mask' => 0x4000, 'val' => 0x4000, 'text' => "tcp: ingelogd" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0004, 'val' => 0x0004, 'text' => "in service" ),
array( 'mask' => 0x8000, 'val' => 0x0000, 'text' => "initialisatie bezig" )
),
'mcu_persistent' => array(
'fmt' => "%04X",
array( 'mask' => 0x00000001, 'val' => 0x00000001, 'text' => "gecalibreerd" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000002, 'val' => 0x00000002, 'text' => "oplader 'uit'" ),
array( 'mask' => 0x00000040, 'val' => 0x00000040, 'text' => "gsm-status altijd tonen" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000004, 'val' => 0x00000004, 'text' => "switch3000 gedetecteerd" ),
array( 'mask' => 0x00000008, 'val' => 0x00000008, 'text' => "pm3000 gedetecteerd" ),
array( 'mask' => 0x00100000, 'val' => 0x00100000, 'text' => "td3000 gedetecteerd" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000010, 'val' => 0x00000010, 'text' => "meting 'aan'" ),
array( 'mask' => 0x00000020, 'val' => 0x00000020, 'text' => "meting 'aan' vanuit mtinfo" ),
array( 'mask' => 0x00000080, 'val' => 0x00000080, 'text' => "vrijgegeven voor schakelen" ),
array( 'mask' => 0x00000080, 'val' => 0x00000000, 'text' => "niet vrijgegeven" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000000, 'text' => "batterij 1: 12V NiMH" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000100, 'text' => "batterij 1: 6V NiMH" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000200, 'text' => "batterij 1: 3V NiMH" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000300, 'text' => "batterij 1: 24V NiMH" ),
array( 'mask' => 0x00000C00, 'val' => 0x00000400, 'text' => "batterij 1: vaste voeding" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000800, 'text' => "batterij 1: 6.4V LiFePO4" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000900, 'text' => "batterij 1: 9.6V LiFePO4" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000A00, 'text' => "batterij 1: 12.8V LiFePO4" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000B00, 'text' => "batterij 1: 3.2V LiFePO4" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000C00, 'text' => "batterij 1: 12V Alkaline" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000D00, 'text' => "batterij 1: 6V Alkaline" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000E00, 'text' => "batterij 1: 3V Alkaline" ),
array( 'mask' => 0x00000F00, 'val' => 0x00000F00, 'text' => "batterij 1: 24V Alkaline" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0000F000, 'val' => 0x00000000, 'text' => "batterij 2: 12V NiMH" ),
array( 'mask' => 0x0000F000, 'val' => 0x00001000, 'text' => "batterij 2: 6V NiMH" ),
array( 'mask' => 0x0000F000, 'val' => 0x00002000, 'text' => "batterij 2: 3V NiMH" ),
array( 'mask' => 0x0000F000, 'val' => 0x00003000, 'text' => "batterij 2: 24V NiMH" ),
array( 'mask' => 0x0000C000, 'val' => 0x00004000, 'text' => "batterij 2: vaste voeding" ),
array( 'mask' => 0x0000F000, 'val' => 0x00008000, 'text' => "batterij 2: 6.4V LiFePO4" ),
array( 'mask' => 0x0000F000, 'val' => 0x00009000, 'text' => "batterij 2: 9.6V LiFePO4" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000A000, 'text' => "batterij 2: 12.8V LiFePO4" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000B000, 'text' => "batterij 2: 3.2V LiFePO4" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000C000, 'text' => "batterij 2: 12V Alkaline" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000D000, 'text' => "batterij 2: 6V Alkaline" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000E000, 'text' => "batterij 2: 3V Alkaline" ),
array( 'mask' => 0x0000F000, 'val' => 0x0000F000, 'text' => "batterij 2: 24V Alkaline" ),
),
'rc_state' => array(
'fmt' => "%04X",
array( 'mask' => 0x0001, 'val' => 0x0001, 'text' => "meting 'aan' (rc)" ),
array( 'mask' => 0x0002, 'val' => 0x0002, 'text' => "detectie 'ok' (rc)" ),
array( 'mask' => 0x0004, 'val' => 0x0004, 'text' => "sleutel 'aan'" ),
array( 'mask' => 0x0008, 'val' => 0x0008, 'text' => "sleutel 'uit'" ),
array( 'mask' => 0x000C, 'val' => 0x0000, 'text' => "sleutel 'operationeel'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "i2c fout (s/w bus)" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "1-wire fout (s/w bus)" ),
array( 'mask' => 0x0040, 'val' => 0x0040, 'text' => "pm3000 fout" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0080, 'val' => 0x0080, 'text' => "switch3000: spanning 'aan'" ),
array( 'mask' => 0x0100, 'val' => 0x0100, 'text' => "pm3000: switch 1 (switch3000) 'aan'" ),
array( 'mask' => 0x0200, 'val' => 0x0200, 'text' => "pm3000: switch 2 'aan'" ),
array( 'mask' => 0x0400, 'val' => 0x0400, 'text' => "pm3000: lader 'aan'" ),
array( 'mask' => 0x0800, 'val' => 0x0800, 'text' => "pm3000: 9V analoge spanning 'aan'" ),
array( 'mask' => 0x1000, 'val' => 0x1000, 'text' => "gps: spanning 'aan'" ),
array( 'mask' => 0x2000, 'val' => 0x2000, 'text' => "pm3000: lader handmatig" ),
array( 'mask' => 0x4000, 'val' => 0x4000, 'text' => "switch3000: one-shot meting" ),
array( 'mask' => 0x8000, 'val' => 0x8000, 'text' => "switch3000: status geldig" ),
),
'sw3000_state' => array(
'fmt' => "%04X",
array( 'mask' => 0x000F, 'val' => 0x0000, 'text' => "switch3000 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0001, 'text' => "switch3000 'uit', sectie 1 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0002, 'text' => "switch3000 'uit', sectie 2 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0003, 'text' => "switch3000 'uit', secties 1,2 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0004, 'text' => "switch3000 'uit', sectie 3 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0005, 'text' => "switch3000 'uit', secties 1,3 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0006, 'text' => "switch3000 'aan', secties 1,4 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0007, 'text' => "switch3000 'aan', sectie 4 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x0008, 'text' => "switch3000 'uit', sectie 4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x0009, 'text' => "switch3000 'aan', secties 2,3 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000A, 'text' => "switch3000 'uit', secties 2,4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x000B, 'text' => "switch3000 'aan', sectie 3 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000C, 'text' => "switch3000 'uit', secties 3,4 'aan'" ),
array( 'mask' => 0x000F, 'val' => 0x000D, 'text' => "switch3000 'aan', sectie 2 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000E, 'text' => "switch3000 'aan', sectie 1 'uit'" ),
array( 'mask' => 0x000F, 'val' => 0x000F, 'text' => "switch3000 'aan'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0010, 'val' => 0x0010, 'text' => "switch3000 time-out" ),
array( 'mask' => 0x0020, 'val' => 0x0020, 'text' => "switch3000 fout" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x0F00, 'val' => 0x0000, 'text' => "batterijen secties 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0100, 'text' => "batterijen sectie 1 'ok', secties 2,3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0200, 'text' => "batterijen sectie 2 'ok', secties 1,3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0300, 'text' => "batterijen secties 1,2 'ok', secties 3,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0400, 'text' => "batterijen sectie 3 'ok', sectie 1,2,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0500, 'text' => "batterijen secties 1,3 'ok', secties 2,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0600, 'text' => "batterijen secties 2,3 'ok', secties 1,4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0700, 'text' => "batterijen secties 1,2,3 'ok', sectie 4 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0800, 'text' => "batterijen secties 4 'ok', secties 1,2,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0900, 'text' => "batterijen secties 1,4 'ok', secties 2,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0A00, 'text' => "batterijen secties 2,4 'ok', secties 1,3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0B00, 'text' => "batterijen secties 1,2,4 'ok', sectie 3 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0C00, 'text' => "batterijen secties 3,4 'ok', sectie 1,2 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0D00, 'text' => "batterijen secties 1,3,4 'ok', sectie 2 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0E00, 'text' => "batterijen secties 2,3,4 'ok', sectie 1 'alarm'" ),
array( 'mask' => 0x0F00, 'val' => 0x0F00, 'text' => "batterijen secties 'ok'" ),
array( 'mask' => 0x8000, 'val' => 0x0000, 'text' => "batterij noodschakelaar 'alarm'" ),
array( 'mask' => 0x8000, 'val' => 0x8000, 'text' => "batterij noodschakelaar 'ok'" ),
),
'wcpu_state' => array(
'fmt' => "%08X",
array( 'mask' => 0x00008000, 'val' => 0x00008000, 'text' => "gps fix" ),
array( 'mask' => 0x00040000, 'val' => 0x00040000, 'text' => "gps tijd" ),
array( 'mask' => 0x00080000, 'val' => 0x00080000, 'text' => "binnen geofence" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000001, 'val' => 0x00000001, 'text' => "programmeer-interface geblokkeerd (secure handshake mislukt of nog niet gedaan)" ),
array( 'mask' => 0x00000002, 'val' => 0x00000002, 'text' => "gprs/tcp fout" ),
array( 'mask' => 0x00000004, 'val' => 0x00000004, 'text' => "sms fout" ),
array( 'mask' => 0x00000008, 'val' => 0x00000008, 'text' => "sim fout" ),
array( 'mask' => 0x00000010, 'val' => 0x00000010, 'text' => "uart #1 (mcu) fout" ),
array( 'mask' => 0x00000020, 'val' => 0x00000020, 'text' => "uart #2 (gps) fout" ),
array( 'mask' => 0x00000040, 'val' => 0x00000040, 'text' => "i2c fout" ),
array( 'mask' => 0x00000080, 'val' => 0x00000080, 'text' => "mcu fout" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00000100, 'val' => 0x00000100, 'text' => "gsm 'ok'" ),
array( 'mask' => 0x00000200, 'val' => 0x00000200, 'text' => "sim 'ok'" ),
array( 'mask' => 0x00000400, 'val' => 0x00000400, 'text' => "gprs 'ok'" ),
array( 'mask' => 0x00000800, 'val' => 0x00000800, 'text' => "tcp 'ok'" ),
array( 'mask' => 0x00001000, 'val' => 0x00001000, 'text' => "gps 'ok'" ),
array( 'mask' => 0x00002000, 'val' => 0x00002000, 'text' => "sms 'ok'" ),
array( 'mask' => 0x00004000, 'val' => 0x00004000, 'text' => "ssl 'ok'" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00100000, 'val' => 0x00100000, 'text' => "temp on-board boven drempel" ),
array( 'mask' => 0x00200000, 'val' => 0x00200000, 'text' => "temp extern boven drempel" ),
array( 'mask' => 0x00400000, 'val' => 0x00400000, 'text' => "temp <gereserveerd> boven drempel" ),
array( 'mask' => 0x00800000, 'val' => 0x00800000, 'text' => "temp switch3000 boven drempel" ),
array( 'sep' => ";\r\n" ),
array( 'mask' => 0x00010000, 'val' => 0x00010000, 'text' => "log replay 'aan'" ),
array( 'mask' => 0x00020000, 'val' => 0x00020000, 'text' => "log replay 'stalled'" ),
array( 'mask' => 0x03000000, 'val' => 0x01000000, 'text' => "log replay 'starting/wait'" ),
array( 'mask' => 0x03000000, 'val' => 0x02000000, 'text' => "log replay 'busy/wait'" ),
array( 'mask' => 0x03000000, 'val' => 0x03000000, 'text' => "log replay 'abort'" ),
array( 'mask' => 0x04000000, 'val' => 0x04000000, 'text' => "log replay 'retry'" ),
array( 'mask' => 0x08000000, 'val' => 0x08000000, 'text' => "log replay fout" )
)
)
),
'log_secure' => array(
'log_secure_detail' => array('table' => "log_secure_detail"),
'log_secure_gebruiker' => array('table' => "log_secure_gebruiker"),
'log_secure_zkl' => array(
'table' => "log_secure_zkl",
'info' => array(
'id' => array(
'fmt' => "<a href=\"showlogsecure.php?db=" . $_GET['db'] . "&id=%u\" target=\"_LOGSECURE\" title=\"Bekijk 'log_secure'\">%u</a>"
),
'status' => array(
'fmt' => "%02X"
)
)
)
)
);
?>