GetCommonFormStatus(); $formStatus[] = ['code' => self::$IS_SERVERERROR, 'icon' => 'error', 'caption' => 'Instance is inactive (server error)']; $formStatus[] = ['code' => self::$IS_HTTPERROR, 'icon' => 'error', 'caption' => 'Instance is inactive (http error)']; $formStatus[] = ['code' => self::$IS_INVALIDDATA, 'icon' => 'error', 'caption' => 'Instance is inactive (invalid data)']; return $formStatus; } public static $STATUS_INVALID = 0; public static $STATUS_VALID = 1; public static $STATUS_RETRYABLE = 2; private function CheckStatus() { switch ($this->GetStatus()) { case IS_ACTIVE: $class = self::$STATUS_VALID; break; case self::$IS_SERVERERROR: case self::$IS_HTTPERROR: case self::$IS_INVALIDDATA: $class = self::$STATUS_RETRYABLE; break; default: $class = self::$STATUS_INVALID; break; } return $class; } private function InstallVarProfiles(bool $reInstall = false) { if ($reInstall) { $this->SendDebug(__FUNCTION__, 'reInstall=' . $this->bool2str($reInstall), 0); } $this->CreateVarProfile('Devolo.TransferRate', VARIABLETYPE_INTEGER, ' Mbit/s', 0, 300, 0, 0, ''); $associations = []; $associations[] = ['Wert' => 0, 'Name' => 'nie', 'Farbe' => -1]; $associations[] = ['Wert' => 1, 'Name' => '%d min', 'Farbe' => -1]; $this->CreateVarProfile('Devolo.Timeout', VARIABLETYPE_INTEGER, '', 0, 0, 0, 0, 'Hourglass', $associations); } }