-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.php
More file actions
50 lines (39 loc) · 1.05 KB
/
module.php
File metadata and controls
50 lines (39 loc) · 1.05 KB
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
43
44
45
46
47
48
49
50
<?
require_once(__DIR__ . DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."IntertechnoBase.php");
class IntertechnoShutter extends IntertechnoBase
{
public function Create()
{
parent::Create();
$this->RegisterPropertyString("MasterDIP", "A");
$this->RegisterPropertyString("SlaveDIP", "1");
$this->RegisterScript("MOVEDOWN", "Move Down", '<? ITSH_MoveDown(IPS_GetParent($_IPS["SELF"])); ?>');
$this->RegisterScript("MOVEUP", "Move Up", '<? ITSH_MoveUp(IPS_GetParent($_IPS["SELF"])); ?>');
}
protected function GetAdress()
{
return $this->ReadPropertyString("MasterDIP") . $this->ReadPropertyString("SlaveDIP");
}
public function MoveDown()
{
$this->SendCommand("12,4,4,12,12,4");
}
public function MoveUp()
{
$this->SendCommand("12,4,4,12,4,12");
}
public function Move($value)
{
if ($value)
MoveDown();
else
MoveUp();
}
protected function SendCommand($command)
{
parent::SendMsg($this->ReadPropertyString("MasterDIP"),
$this->ReadPropertyString("SlaveDIP"),
$command);
}
}
?>