Neues Ladestationsmodul mit ocpp Modul erstellt.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
class OCPP16Adapter
|
||||
{
|
||||
public function normalizeInbound(OCPPMessage $message): array
|
||||
{
|
||||
return [
|
||||
'version' => '1.6',
|
||||
'action' => $message->action,
|
||||
'uniqueId' => $message->uniqueId,
|
||||
'payload' => $message->payload
|
||||
];
|
||||
}
|
||||
|
||||
public function buildSetChargingProfile(array $profile): OCPPMessage
|
||||
{
|
||||
return OCPPMessage::call('SetChargingProfile', $profile, '1.6');
|
||||
}
|
||||
|
||||
public function buildClearChargingProfile(int $connectorId): OCPPMessage
|
||||
{
|
||||
return OCPPMessage::call('ClearChargingProfile', ['connectorId' => $connectorId], '1.6');
|
||||
}
|
||||
|
||||
public function buildReset(string $type = 'Soft'): OCPPMessage
|
||||
{
|
||||
return OCPPMessage::call('Reset', ['type' => $type], '1.6');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user