-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
178 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
.idea/ | ||
.phpunit.* | ||
.php_cs.cache | ||
.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,54 @@ | ||
{ | ||
"elements": [{ | ||
"type": "Select", | ||
"name": "Calculation", | ||
"caption": "Calculation", | ||
"options": [ | ||
{ "label": "Everything", "value": 0 }, | ||
{ "label": "Sum", "value": 1 }, | ||
{ "label": "Minimum", "value": 2 }, | ||
{ "label": "Maximum", "value": 3 }, | ||
{ "label": "Average", "value": 4 }, | ||
{ "label": "Count", "value": 5 } | ||
] | ||
}, { | ||
"type": "List", | ||
"name": "Variables", | ||
"caption": "Variables", | ||
"add": true, | ||
"delete": true, | ||
"columns": [{ | ||
"label": "VariableID", | ||
"name": "ID", | ||
"width": "auto", | ||
"add": 0, | ||
"edit": { | ||
"type": "SelectVariable" | ||
} | ||
}], | ||
"values": [] | ||
}] | ||
"elements": [ | ||
{ | ||
"type": "Select", | ||
"name": "Calculation", | ||
"caption": "Calculation", | ||
"options": [ | ||
{ | ||
"label": "Everything", | ||
"value": 0 | ||
}, | ||
{ | ||
"label": "Sum", | ||
"value": 1 | ||
}, | ||
{ | ||
"label": "Minimum", | ||
"value": 2 | ||
}, | ||
{ | ||
"label": "Maximum", | ||
"value": 3 | ||
}, | ||
{ | ||
"label": "Average", | ||
"value": 4 | ||
}, | ||
{ | ||
"label": "Count", | ||
"value": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "List", | ||
"name": "Variables", | ||
"caption": "Variables", | ||
"add": true, | ||
"delete": true, | ||
"columns": [ | ||
{ | ||
"label": "VariableID", | ||
"name": "ID", | ||
"width": "auto", | ||
"add": 0, | ||
"edit": { | ||
"type": "SelectVariable" | ||
} | ||
} | ||
], | ||
"values": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
class TestConfigurator extends IPSModule | ||
class TestConfigurator extends IPSModule | ||
{ | ||
public function Create() | ||
{ | ||
public function Create() | ||
{ | ||
//Never delete this line! | ||
parent::Create(); | ||
} | ||
//Never delete this line! | ||
parent::Create(); | ||
} | ||
|
||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} | ||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
class TestDevice1 extends IPSModule | ||
class TestDevice1 extends IPSModule | ||
{ | ||
public function Create() | ||
{ | ||
public function Create() | ||
{ | ||
//Never delete this line! | ||
parent::Create(); | ||
//Never delete this line! | ||
parent::Create(); | ||
|
||
$this->RegisterPropertyInteger("DeviceID", 0); | ||
$this->RegisterPropertyInteger("SecondaryID", 0); | ||
} | ||
$this->RegisterPropertyInteger('DeviceID', 0); | ||
$this->RegisterPropertyInteger('SecondaryID', 0); | ||
} | ||
|
||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} | ||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
class TestDevice2 extends IPSModule | ||
class TestDevice2 extends IPSModule | ||
{ | ||
public function Create() | ||
{ | ||
public function Create() | ||
{ | ||
//Never delete this line! | ||
parent::Create(); | ||
//Never delete this line! | ||
parent::Create(); | ||
|
||
$this->RequireParent('{63D1D28F-6901-8BB7-8C8E-1046022EFEB4}'); | ||
|
||
$this->RegisterPropertyInteger("DeviceID", 0); | ||
$this->RegisterPropertyInteger("SecondaryID", 0); | ||
} | ||
$this->RequireParent('{63D1D28F-6901-8BB7-8C8E-1046022EFEB4}'); | ||
|
||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
$this->RegisterPropertyInteger('DeviceID', 0); | ||
$this->RegisterPropertyInteger('SecondaryID', 0); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} | ||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
class TestSplitter extends IPSModule | ||
{ | ||
public function Create() | ||
{ | ||
//Never delete this line! | ||
parent::Create(); | ||
|
||
$this->ConnectParent('{6179ED6A-FC31-413C-BB8E-1204150CF376}'); | ||
$this->RegisterPropertyString('Address', ''); | ||
} | ||
|
||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
|
||
public function ForwardData($JSONString) | ||
{ | ||
$data = json_decode($JSONString); | ||
IPS_LogMessage('Splitter FRWD', utf8_decode($data->Buffer)); | ||
|
||
$this->SendDataToParent(json_encode(['DataID' => '{79827379-F36E-4ADA-8A95-5F8D1DC92FA9}', 'Buffer' => $data->Buffer])); | ||
|
||
return 'String data for device instance!'; | ||
} | ||
|
||
public function ReceiveData($JSONString) | ||
{ | ||
$data = json_decode($JSONString); | ||
IPS_LogMessage('Splitter RECV', utf8_decode($data->Buffer)); | ||
|
||
$this->SendDataToChildren(json_encode(['DataID' => '{9209FA1D-DF9B-B139-432F-F4D4440D8531}', 'Buffer' => $data->Buffer])); | ||
} | ||
} | ||
class TestSplitter extends IPSModule | ||
{ | ||
public function Create() | ||
{ | ||
//Never delete this line! | ||
parent::Create(); | ||
|
||
$this->ConnectParent('{6179ED6A-FC31-413C-BB8E-1204150CF376}'); | ||
$this->RegisterPropertyString('Address', ''); | ||
} | ||
|
||
public function Destroy() | ||
{ | ||
//Never delete this line! | ||
parent::Destroy(); | ||
} | ||
|
||
public function ApplyChanges() | ||
{ | ||
//Never delete this line! | ||
parent::ApplyChanges(); | ||
} | ||
|
||
public function ForwardData($JSONString) | ||
{ | ||
$data = json_decode($JSONString); | ||
IPS_LogMessage('Splitter FRWD', utf8_decode($data->Buffer)); | ||
|
||
$this->SendDataToParent(json_encode(['DataID' => '{79827379-F36E-4ADA-8A95-5F8D1DC92FA9}', 'Buffer' => $data->Buffer])); | ||
|
||
return 'String data for device instance!'; | ||
} | ||
|
||
public function ReceiveData($JSONString) | ||
{ | ||
$data = json_decode($JSONString); | ||
IPS_LogMessage('Splitter RECV', utf8_decode($data->Buffer)); | ||
|
||
$this->SendDataToChildren(json_encode(['DataID' => '{9209FA1D-DF9B-B139-432F-F4D4440D8531}', 'Buffer' => $data->Buffer])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters