Neues Ladestationsmodul mit ocpp Modul erstellt.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
class Diagnostics
|
||||
{
|
||||
public static function message(string $severity, string $source, string $text, string $code = ''): array
|
||||
{
|
||||
return [
|
||||
'timestamp' => time(),
|
||||
'severity' => $severity,
|
||||
'source' => $source,
|
||||
'text' => $text,
|
||||
'code' => $code
|
||||
];
|
||||
}
|
||||
|
||||
public static function statusFromFlags(bool $online, bool $fault): string
|
||||
{
|
||||
if ($fault) {
|
||||
return 'Stoerung';
|
||||
}
|
||||
return $online ? 'Online' : 'Offline';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user