OcppModel.V20.Behaviours.ChargeSystem behaviour (ocpp_model v0.2.3) View Source

Behaviour of a ChargeSystem, 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 with the payload

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 with the payload

Link to this section Callbacks

Specs

authorize(
  req :: %OcppModel.V20.Messages.AuthorizeRequest{
    certificate: term(),
    idToken: term(),
    iso15118CertificateHashData: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.AuthorizeResponse{
     certificateStatus: term(),
     idTokenInfo: term()
   }}
  | {:error, :authorize, String.t()}

Specs

boot_notification(
  req :: %OcppModel.V20.Messages.BootNotificationRequest{
    chargingStation: term(),
    reason: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.BootNotificationResponse{
     currentTime: term(),
     interval: term(),
     status: term(),
     statusInfo: term()
   }}
  | {:error, :boot_notification, String.t()}
Link to this callback

cleared_charging_limit(req)

View Source

Specs

cleared_charging_limit(
  req :: %OcppModel.V20.Messages.ClearedChargingLimitRequest{
    chargingLimitSource: term(),
    evseId: term()
  }
) ::
  {:ok, %OcppModel.V20.Messages.ClearedChargingLimitResponse{}}
  | {:error, :cleared_charging_limit, 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()}
Link to this callback

firmware_status_notification(req)

View Source

Specs

firmware_status_notification(
  req :: %OcppModel.V20.Messages.FirmwareStatusNotificationRequest{
    requestId: term(),
    status: term()
  }
) ::
  {:ok, %OcppModel.V20.Messages.FirmwareStatusNotificationResponse{}}
  | {:error, :firmware_status_notification, String.t()}
Link to this callback

get_15118_ev_certificate(req)

View Source

Specs

get_15118_ev_certificate(
  req :: %OcppModel.V20.Messages.Get15118EVCertificateRequest{
    action: term(),
    exiRequest: term(),
    iso15118SchemaVersion: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.Get15118EVCertificateResponse{
     exiResponse: term(),
     status: term(),
     statusInfo: term()
   }}
  | {:error, :get_15118_ev_certificate, String.t()}
Link to this callback

get_certificate_status(req)

View Source

Specs

get_certificate_status(
  req :: %OcppModel.V20.Messages.GetCertificateStatusRequest{
    ocspRequestData: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.GetCertificateStatusResponse{
     ocspResult: term(),
     status: term(),
     statusInfo: term()
   }}
  | {:error, :get_certificate_status, String.t()}

Specs

heartbeat(req :: %OcppModel.V20.Messages.HeartbeatRequest{}) ::
  {:ok, %OcppModel.V20.Messages.HeartbeatResponse{currentTime: term()}}
  | {:error, :heartbeat, String.t()}

Specs

meter_values(
  req :: %OcppModel.V20.Messages.MeterValuesRequest{
    evseId: term(),
    meterValue: term()
  }
) ::
  {:ok, %OcppModel.V20.Messages.MeterValuesResponse{}}
  | {:error, :meter_values, String.t()}
Link to this callback

status_notification(req)

View Source

Specs

status_notification(
  req :: %OcppModel.V20.Messages.StatusNotificationRequest{
    connectorId: term(),
    connectorStatus: term(),
    evseId: term(),
    timestamp: term()
  }
) ::
  {:ok, %OcppModel.V20.Messages.StatusNotificationResponse{}}
  | {:error, :status_notification, String.t()}

Specs

transaction_event(
  req :: %OcppModel.V20.Messages.TransactionEventRequest{
    cableMaxCurrent: term(),
    eventType: term(),
    evse: term(),
    idToken: term(),
    meterValue: term(),
    numberOfPhasesUsed: term(),
    offline: term(),
    reservationId: term(),
    seqNo: term(),
    timestamp: term(),
    transactionInfo: term(),
    triggerReason: term()
  }
) ::
  {:ok,
   %OcppModel.V20.Messages.TransactionEventResponse{
     chargingPriority: term(),
     idTokenInfo: term(),
     totalCost: term(),
     updatedPersonalMessage: term()
   }}
  | {:error, :transaction_event, String.t()}