Files
Symcon_Belevo_Energiemanage…/OCPP_Server/libs/WebSocketEndpoint.php
T

30 lines
901 B
PHP

<?php
class WebSocketEndpoint
{
public static function supportSummary(bool $registerHookAvailable, string $hookPath): array
{
if ($registerHookAvailable) {
return [
'status' => 'Hook vorbereitet',
'detail' => 'Symcon RegisterHook ist verfuegbar. WebSocket-Dauerbetrieb muss mit echter OCPP-Station verifiziert werden.',
'hookPath' => $hookPath
];
}
return [
'status' => 'Hook manuell/spaeter',
'detail' => 'RegisterHook ist in dieser Symcon-Umgebung nicht als Modul-Methode verfuegbar. WebHook Control muss manuell oder nach Upgrade verbunden werden.',
'hookPath' => $hookPath
];
}
public static function readRawBody(): string
{
$data = @file_get_contents('php://input');
return is_string($data) ? $data : '';
}
}
?>