OcppModel.V20.Behaviours.Charger behaviour (ocpp_model v0.1.2) View Source

Behaviour of a Charger, allowing the module assuming the behaviour to be able to respond to messages send to it

Link to this section Summary

Functions

Main entrypoint, based on the action parameter, this function will call one of the callback functions

Link to this section Functions

Link to this function

handle(impl, action, payload)

View Source

Specs

handle(atom(), String.t(), map()) :: {:ok, map()} | {:error, atom(), String.t()}

Main entrypoint, based on the action parameter, this function will call one of the callback functions

Link to this section Callbacks

Link to this callback

change_availability(req)

View Source

Specs

change_availability(
  req :: %OcppModel.V20.Messages.ChangeAvailabilityRequest{
    evse: term(),
    operationalStatus: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.ChangeAvailabilityResponse{
     status: term(),
     statusInfo: term()
   }}
  | {:error, :change_availability, String.t()}

Specs

data_transfer(
  req :: %OcppModel.V20.Messages.DataTransferRequest{
    data: term(),
    messageId: term(),
    vendorId: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.DataTransferResponse{
     data: term(),
     status: term(),
     statusInfo: term()
   }}
  | {:error, :data_transfer, String.t()}

Specs

unlock_connector(
  req :: %OcppModel.V20.Messages.UnlockConnectorRequest{evseId: term()}
) ::
  {:ok,
   %OcppModel.V20.Messages.UnlockConnectorResponse{
     status: term(),
     statusInfo: term()
   }}
  | {:error, :unlock_connector, String.t()}