debuggage
This commit is contained in:
24
utils.php
24
utils.php
@ -16,6 +16,30 @@
|
||||
print ("MOHA-" . $logString . EOL);
|
||||
}
|
||||
}*/
|
||||
function testActionneurs(array $actionneurs)
|
||||
{
|
||||
global $indexDevices;
|
||||
$r = 0;
|
||||
foreach ($actionneurs as $device)
|
||||
{
|
||||
if (array_key_exists($device[0], $indexDevices))
|
||||
{
|
||||
if (array_key_exists($device[1], $indexDevices[$device[0]]->properties))
|
||||
{
|
||||
$s = ($indexDevices[$device[0]]->properties[$device[1]]["value"] == $device[2]);
|
||||
logger(DEBUG, _("testActionneurs : result is ") . bool2string($indexDevices[$device[0]]->friendlyName) . "=>" . bool2string($s), __FILE__ . ":" . __LINE__ );
|
||||
$r |= $s;
|
||||
}else
|
||||
{
|
||||
logger(ERROR, _("no property : ") . $device[1] . bool2string($r), __FILE__ . ":" . __LINE__ );
|
||||
}
|
||||
}else
|
||||
{
|
||||
logger(ERROR, _("no device : ") . $device[0] . bool2string($r), __FILE__ . ":" . __LINE__ );
|
||||
}
|
||||
}
|
||||
return !$r;
|
||||
}
|
||||
|
||||
function htmlGetFriendlyNames($ieeeAddress = '')
|
||||
{
|
||||
|
Reference in New Issue
Block a user