function CheckSML($stream, $parentID) { for ($i = 1; $i < count(EHz(0, 1)); $i++) { $var = stristr($stream, EHz($i, 1)); if ($var != false) { CheckVariable(EHz($i, 0), EHz($i, 2), EHz($i, 3), $parentID); IPS_LogMessage('EHz', $i); } else { IPS_LogMessage('EHz <-> Port:', $stream); } } return true; }
public function ReceiveData($JSONString) { $data = json_decode($JSONString); //IPS_LogMessage('EHz <- Port:', bin2hex(utf8_decode($data->Buffer))); $stream = bin2hex(utf8_decode($data->Buffer)); for ($i = 1; $i < EHz(0, 1); $i++) { $var = stristr($stream, EHz($i, 1)); IPS_LogMessage('EHz', $i); if ($var != false) { CheckVariable(EHz($i, 0), EHz($i, 2), EHz($i, 3), $this->InstanceID); IPS_LogMessage('EHz', $i); } else { IPS_LogMessage('EHz <-> Port:', $stream); } } return true; }