1
0
mirror of https://github.com/agdsn/ancient-weatherstation.git synced 2026-06-19 23:07:59 +00:00

Working at home

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@31 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi
2006-08-21 17:36:41 +00:00
parent 18643bb643
commit b8cc79937b
12 changed files with 409 additions and 23 deletions
+21 -4
View File
@@ -1,8 +1,10 @@
<?
include_once("php_inc/parser.inc.php"); /* Parser */
include_once("php_inc/sensor.inc.php"); /* Sensor-Klasse */
include_once("php_inc/temp.inc.php"); /* Temp-Klasse */
include_once("php_inc/rain.inc.php"); /* Rain-Klasse */
include_once("php_inc/parser.inc.php"); /* Parser */
include_once("php_inc/modules/sensor.inc.php"); /* Sensor-Klasse */
include_once("php_inc/modules/temp.inc.php"); /* Temp-Klasse */
include_once("php_inc/modules/rain.inc.php"); /* Rain-Klasse */
include_once("php_inc/modules/hum.inc.php"); /* Hum-Klasse */
include_once("php_inc/modules/press.inc.php"); /* Press-Klasse */
/* Representiert ein Modul */
class Module{
@@ -14,6 +16,7 @@ class Module{
var $sensInstance = NULL; /* Sensor-Instanz */
var $tempInstance = NULL; /* Temp-Instanz */
var $rainInstance = NULL; /* Rain-Instanz */
var $humInstance = NULL; /* Hum-Instanz */
/* Konstruktor */
function Module($modName, $sensId, &$parser, &$connection){
@@ -54,6 +57,20 @@ class Module{
return $this->rainInstance;
}
/* Instanz der Hum-Klasse holen */
function &_get_hum(){
if($this->humInstance == NULL)
$this->humInstance = new Hum($this->sensId, $this->connection);
return $this->humInstance;
}
/* Instanz der Press-Klasse holen */
function &_get_press(){
if($this->pressInstance == NULL)
$this->pressInstance = new Press($this->sensId, $this->connection);
return $this->pressInstance;
}
/* Callback-Funktion, wird ausgeführt wenn {content:fill:xyz} gefunden wird */
function fill($contentId){
$content_split = explode("_", $contentId); /* Modultyp bekommen */