Added comments and usage of getStatus
This commit is contained in:
parent
813366df89
commit
1c4ba82ff1
13
test.php
13
test.php
@ -1,9 +1,22 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/class.EnerGenieSwitcher.php';
|
||||
|
||||
/**
|
||||
* Initialize with connection parameters (ip address and credentials)
|
||||
*/
|
||||
$egs = new EnerGenieSwitcher('1.2.3.4', 'my-password');
|
||||
|
||||
/**
|
||||
* Switch port statuses
|
||||
*/
|
||||
$egs->doSwitch(array(
|
||||
1 => EnerGenieSwitcher::ON,
|
||||
2 => EnerGenieSwitcher::OFF,
|
||||
3 => EnerGenieSwitcher::ON,
|
||||
4 => EnerGenieSwitcher::OFF
|
||||
));
|
||||
|
||||
/**
|
||||
* Verify the status of the ports
|
||||
*/
|
||||
var_dump($egs->getStatus());
|
||||
|
Loading…
Reference in New Issue
Block a user