ocpp/v1_6/dispatch

OCPP 1.6 action dispatch.

Request/Response union every payload for this version; the *_decoder/*_to_json functions map an OCPP action string to and from the matching typed payload. SENDs (response-less) ride in Request.

Types

pub type Request {
  AuthorizeRequest(authorize.Request)
  BootNotificationRequest(boot_notification.Request)
  CancelReservationRequest(cancel_reservation.Request)
  CertificateSignedRequest(certificate_signed.Request)
  ChangeAvailabilityRequest(change_availability.Request)
  ChangeConfigurationRequest(change_configuration.Request)
  ClearCacheRequest(clear_cache.Request)
  ClearChargingProfileRequest(clear_charging_profile.Request)
  DataTransferRequest(data_transfer.Request)
  DeleteCertificateRequest(delete_certificate.Request)
  DiagnosticsStatusNotificationRequest(
    diagnostics_status_notification.Request,
  )
  ExtendedTriggerMessageRequest(extended_trigger_message.Request)
  FirmwareStatusNotificationRequest(
    firmware_status_notification.Request,
  )
  GetCompositeScheduleRequest(get_composite_schedule.Request)
  GetConfigurationRequest(get_configuration.Request)
  GetDiagnosticsRequest(get_diagnostics.Request)
  GetInstalledCertificateIdsRequest(
    get_installed_certificate_ids.Request,
  )
  GetLocalListVersionRequest(get_local_list_version.Request)
  GetLogRequest(get_log.Request)
  HeartbeatRequest(heartbeat.Request)
  InstallCertificateRequest(install_certificate.Request)
  LogStatusNotificationRequest(log_status_notification.Request)
  MeterValuesRequest(meter_values.Request)
  RemoteStartTransactionRequest(remote_start_transaction.Request)
  RemoteStopTransactionRequest(remote_stop_transaction.Request)
  ReserveNowRequest(reserve_now.Request)
  ResetRequest(reset.Request)
  SecurityEventNotificationRequest(
    security_event_notification.Request,
  )
  SendLocalListRequest(send_local_list.Request)
  SetChargingProfileRequest(set_charging_profile.Request)
  SignCertificateRequest(sign_certificate.Request)
  SignedFirmwareStatusNotificationRequest(
    signed_firmware_status_notification.Request,
  )
  SignedUpdateFirmwareRequest(signed_update_firmware.Request)
  StartTransactionRequest(start_transaction.Request)
  StatusNotificationRequest(status_notification.Request)
  StopTransactionRequest(stop_transaction.Request)
  TriggerMessageRequest(trigger_message.Request)
  UnlockConnectorRequest(unlock_connector.Request)
  UpdateFirmwareRequest(update_firmware.Request)
}

Constructors

pub type Response {
  AuthorizeResponse(authorize.Response)
  BootNotificationResponse(boot_notification.Response)
  CancelReservationResponse(cancel_reservation.Response)
  CertificateSignedResponse(certificate_signed.Response)
  ChangeAvailabilityResponse(change_availability.Response)
  ChangeConfigurationResponse(change_configuration.Response)
  ClearCacheResponse(clear_cache.Response)
  ClearChargingProfileResponse(clear_charging_profile.Response)
  DataTransferResponse(data_transfer.Response)
  DeleteCertificateResponse(delete_certificate.Response)
  DiagnosticsStatusNotificationResponse(
    diagnostics_status_notification.Response,
  )
  ExtendedTriggerMessageResponse(
    extended_trigger_message.Response,
  )
  FirmwareStatusNotificationResponse(
    firmware_status_notification.Response,
  )
  GetCompositeScheduleResponse(get_composite_schedule.Response)
  GetConfigurationResponse(get_configuration.Response)
  GetDiagnosticsResponse(get_diagnostics.Response)
  GetInstalledCertificateIdsResponse(
    get_installed_certificate_ids.Response,
  )
  GetLocalListVersionResponse(get_local_list_version.Response)
  GetLogResponse(get_log.Response)
  HeartbeatResponse(heartbeat.Response)
  InstallCertificateResponse(install_certificate.Response)
  LogStatusNotificationResponse(log_status_notification.Response)
  MeterValuesResponse(meter_values.Response)
  RemoteStartTransactionResponse(
    remote_start_transaction.Response,
  )
  RemoteStopTransactionResponse(remote_stop_transaction.Response)
  ReserveNowResponse(reserve_now.Response)
  ResetResponse(reset.Response)
  SecurityEventNotificationResponse(
    security_event_notification.Response,
  )
  SendLocalListResponse(send_local_list.Response)
  SetChargingProfileResponse(set_charging_profile.Response)
  SignCertificateResponse(sign_certificate.Response)
  SignedFirmwareStatusNotificationResponse(
    signed_firmware_status_notification.Response,
  )
  SignedUpdateFirmwareResponse(signed_update_firmware.Response)
  StartTransactionResponse(start_transaction.Response)
  StatusNotificationResponse(status_notification.Response)
  StopTransactionResponse(stop_transaction.Response)
  TriggerMessageResponse(trigger_message.Response)
  UnlockConnectorResponse(unlock_connector.Response)
  UpdateFirmwareResponse(update_firmware.Response)
}

Constructors

Values

pub fn request_decoder(
  action: String,
) -> Result(decode.Decoder(Request), Nil)
pub fn request_to_json(message: Request) -> #(String, json.Json)
pub fn response_decoder(
  action: String,
) -> Result(decode.Decoder(Response), Nil)
pub fn response_to_json(
  message: Response,
) -> #(String, json.Json)
Search Document