aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/wireless.php
blob: 6f3af3644625cb03d84a505282178abf0ee96ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

# Collectd Wireless Plugin

require_once 'conf/common.inc.php';
require_once 'type/GenericStacked.class.php';
require_once 'inc/collectd.inc.php';

$obj = new Type_GenericStacked($CONFIG);
$obj->width = $width;
$obj->heigth = $heigth;

switch($obj->args['type']) {
	case 'signal_noise':
		$obj->data_sources = array('value');
		$obj->colors = array('value' => '0000f0');
		$obj->ds_names = array('value' => 'Value');
		$obj->rrd_title = 'Signal Noise';
		$obj->rrd_vertical = '';
		$obj->rrd_format = '%6.1lf';
		break;
	case 'signal_power':
		$obj->data_sources = array('value');
		$obj->colors = array('value' => '0000f0');
		$obj->ds_names = array('value' => 'Value');
		$obj->rrd_title = 'Signal Power';
		$obj->rrd_vertical = '';
		$obj->rrd_format = '%6.1lf';
		break;
	case 'signal_quality':
		$obj->data_sources = array('value');
		$obj->colors = array('value' => '0000f0');
		$obj->ds_names = array('value' => 'Value');
		$obj->rrd_title = 'Signal Quality';
		$obj->rrd_vertical = '';
		$obj->rrd_format = '%6.1lf';
		break;
}
collectd_flush($obj->identifiers);
$obj->rrd_graph();

?>