debug\ncode optimization
This commit is contained in:
@@ -21,7 +21,7 @@ class topic {
|
||||
|
||||
class device
|
||||
{
|
||||
public $method; //auto or manual
|
||||
public $method; //0 = auto or 1 = manual
|
||||
public $topic;
|
||||
public $device;
|
||||
public $ieeeAddress;
|
||||
@@ -31,16 +31,23 @@ class device
|
||||
public $description;
|
||||
public $functions;
|
||||
public $payload;
|
||||
public $availability = array();
|
||||
public $availability;
|
||||
|
||||
public function set($event)
|
||||
private function __construct()
|
||||
{
|
||||
publish($this->topic . "/" . $this->friendlyName, $this->payload, "set", $event);
|
||||
$this->availability = array("value" => null, "functions" => array());
|
||||
var_dump($this->availability);
|
||||
}
|
||||
|
||||
public function set($method=0) //, $event = null)
|
||||
{
|
||||
$this->method = $method;
|
||||
publish($this->topic . "/" . $this->friendlyName, $this->payload, "set"); //, $event);
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
publish($this->topic . "/" . $this->friendlyNames, $this->payload, "get", $event);
|
||||
publish($this->topic . "/" . $this->friendlyNames, $this->payload, "get"); //, $event);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user