ocpp/v2_1/dispatch

OCPP 2.1 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 {
  AfrrSignalRequest(afrr_signal.Request)
  AdjustPeriodicEventStreamRequest(
    adjust_periodic_event_stream.Request,
  )
  AuthorizeRequest(authorize.Request)
  BatterySwapRequest(battery_swap.Request)
  BootNotificationRequest(boot_notification.Request)
  CancelReservationRequest(cancel_reservation.Request)
  CertificateSignedRequest(certificate_signed.Request)
  ChangeAvailabilityRequest(change_availability.Request)
  ChangeTransactionTariffRequest(
    change_transaction_tariff.Request,
  )
  ClearCacheRequest(clear_cache.Request)
  ClearChargingProfileRequest(clear_charging_profile.Request)
  ClearDerControlRequest(clear_der_control.Request)
  ClearDisplayMessageRequest(clear_display_message.Request)
  ClearTariffsRequest(clear_tariffs.Request)
  ClearVariableMonitoringRequest(
    clear_variable_monitoring.Request,
  )
  ClearedChargingLimitRequest(cleared_charging_limit.Request)
  ClosePeriodicEventStreamRequest(
    close_periodic_event_stream.Request,
  )
  CostUpdatedRequest(cost_updated.Request)
  CustomerInformationRequest(customer_information.Request)
  DataTransferRequest(data_transfer.Request)
  DeleteCertificateRequest(delete_certificate.Request)
  FirmwareStatusNotificationRequest(
    firmware_status_notification.Request,
  )
  Get15118EvCertificateRequest(get15118_ev_certificate.Request)
  GetBaseReportRequest(get_base_report.Request)
  GetCertificateChainStatusRequest(
    get_certificate_chain_status.Request,
  )
  GetCertificateStatusRequest(get_certificate_status.Request)
  GetChargingProfilesRequest(get_charging_profiles.Request)
  GetCompositeScheduleRequest(get_composite_schedule.Request)
  GetDerControlRequest(get_der_control.Request)
  GetDisplayMessagesRequest(get_display_messages.Request)
  GetInstalledCertificateIdsRequest(
    get_installed_certificate_ids.Request,
  )
  GetLocalListVersionRequest(get_local_list_version.Request)
  GetLogRequest(get_log.Request)
  GetMonitoringReportRequest(get_monitoring_report.Request)
  GetPeriodicEventStreamRequest(
    get_periodic_event_stream.Request,
  )
  GetReportRequest(get_report.Request)
  GetTariffsRequest(get_tariffs.Request)
  GetTransactionStatusRequest(get_transaction_status.Request)
  GetVariablesRequest(get_variables.Request)
  HeartbeatRequest(heartbeat.Request)
  InstallCertificateRequest(install_certificate.Request)
  LogStatusNotificationRequest(log_status_notification.Request)
  MeterValuesRequest(meter_values.Request)
  NotifyAllowedEnergyTransferRequest(
    notify_allowed_energy_transfer.Request,
  )
  NotifyChargingLimitRequest(notify_charging_limit.Request)
  NotifyCustomerInformationRequest(
    notify_customer_information.Request,
  )
  NotifyDerAlarmRequest(notify_der_alarm.Request)
  NotifyDerStartStopRequest(notify_der_start_stop.Request)
  NotifyDisplayMessagesRequest(notify_display_messages.Request)
  NotifyEvChargingNeedsRequest(notify_ev_charging_needs.Request)
  NotifyEvChargingScheduleRequest(
    notify_ev_charging_schedule.Request,
  )
  NotifyEventRequest(notify_event.Request)
  NotifyMonitoringReportRequest(notify_monitoring_report.Request)
  NotifyPeriodicEventStream(notify_periodic_event_stream.Send)
  NotifyPriorityChargingRequest(notify_priority_charging.Request)
  NotifyReportRequest(notify_report.Request)
  NotifySettlementRequest(notify_settlement.Request)
  NotifyWebPaymentStartedRequest(
    notify_web_payment_started.Request,
  )
  OpenPeriodicEventStreamRequest(
    open_periodic_event_stream.Request,
  )
  PublishFirmwareRequest(publish_firmware.Request)
  PublishFirmwareStatusNotificationRequest(
    publish_firmware_status_notification.Request,
  )
  PullDynamicScheduleUpdateRequest(
    pull_dynamic_schedule_update.Request,
  )
  ReportChargingProfilesRequest(report_charging_profiles.Request)
  ReportDerControlRequest(report_der_control.Request)
  RequestBatterySwapRequest(request_battery_swap.Request)
  RequestStartTransactionRequest(
    request_start_transaction.Request,
  )
  RequestStopTransactionRequest(request_stop_transaction.Request)
  ReservationStatusUpdateRequest(
    reservation_status_update.Request,
  )
  ReserveNowRequest(reserve_now.Request)
  ResetRequest(reset.Request)
  SecurityEventNotificationRequest(
    security_event_notification.Request,
  )
  SendLocalListRequest(send_local_list.Request)
  SetChargingProfileRequest(set_charging_profile.Request)
  SetDerControlRequest(set_der_control.Request)
  SetDefaultTariffRequest(set_default_tariff.Request)
  SetDisplayMessageRequest(set_display_message.Request)
  SetMonitoringBaseRequest(set_monitoring_base.Request)
  SetMonitoringLevelRequest(set_monitoring_level.Request)
  SetNetworkProfileRequest(set_network_profile.Request)
  SetVariableMonitoringRequest(set_variable_monitoring.Request)
  SetVariablesRequest(set_variables.Request)
  SignCertificateRequest(sign_certificate.Request)
  StatusNotificationRequest(status_notification.Request)
  TransactionEventRequest(transaction_event.Request)
  TriggerMessageRequest(trigger_message.Request)
  UnlockConnectorRequest(unlock_connector.Request)
  UnpublishFirmwareRequest(unpublish_firmware.Request)
  UpdateDynamicScheduleRequest(update_dynamic_schedule.Request)
  UpdateFirmwareRequest(update_firmware.Request)
  UsePriorityChargingRequest(use_priority_charging.Request)
  VatNumberValidationRequest(vat_number_validation.Request)
}

Constructors

pub type Response {
  AfrrSignalResponse(afrr_signal.Response)
  AdjustPeriodicEventStreamResponse(
    adjust_periodic_event_stream.Response,
  )
  AuthorizeResponse(authorize.Response)
  BatterySwapResponse(battery_swap.Response)
  BootNotificationResponse(boot_notification.Response)
  CancelReservationResponse(cancel_reservation.Response)
  CertificateSignedResponse(certificate_signed.Response)
  ChangeAvailabilityResponse(change_availability.Response)
  ChangeTransactionTariffResponse(
    change_transaction_tariff.Response,
  )
  ClearCacheResponse(clear_cache.Response)
  ClearChargingProfileResponse(clear_charging_profile.Response)
  ClearDerControlResponse(clear_der_control.Response)
  ClearDisplayMessageResponse(clear_display_message.Response)
  ClearTariffsResponse(clear_tariffs.Response)
  ClearVariableMonitoringResponse(
    clear_variable_monitoring.Response,
  )
  ClearedChargingLimitResponse(cleared_charging_limit.Response)
  ClosePeriodicEventStreamResponse(
    close_periodic_event_stream.Response,
  )
  CostUpdatedResponse(cost_updated.Response)
  CustomerInformationResponse(customer_information.Response)
  DataTransferResponse(data_transfer.Response)
  DeleteCertificateResponse(delete_certificate.Response)
  FirmwareStatusNotificationResponse(
    firmware_status_notification.Response,
  )
  Get15118EvCertificateResponse(get15118_ev_certificate.Response)
  GetBaseReportResponse(get_base_report.Response)
  GetCertificateChainStatusResponse(
    get_certificate_chain_status.Response,
  )
  GetCertificateStatusResponse(get_certificate_status.Response)
  GetChargingProfilesResponse(get_charging_profiles.Response)
  GetCompositeScheduleResponse(get_composite_schedule.Response)
  GetDerControlResponse(get_der_control.Response)
  GetDisplayMessagesResponse(get_display_messages.Response)
  GetInstalledCertificateIdsResponse(
    get_installed_certificate_ids.Response,
  )
  GetLocalListVersionResponse(get_local_list_version.Response)
  GetLogResponse(get_log.Response)
  GetMonitoringReportResponse(get_monitoring_report.Response)
  GetPeriodicEventStreamResponse(
    get_periodic_event_stream.Response,
  )
  GetReportResponse(get_report.Response)
  GetTariffsResponse(get_tariffs.Response)
  GetTransactionStatusResponse(get_transaction_status.Response)
  GetVariablesResponse(get_variables.Response)
  HeartbeatResponse(heartbeat.Response)
  InstallCertificateResponse(install_certificate.Response)
  LogStatusNotificationResponse(log_status_notification.Response)
  MeterValuesResponse(meter_values.Response)
  NotifyAllowedEnergyTransferResponse(
    notify_allowed_energy_transfer.Response,
  )
  NotifyChargingLimitResponse(notify_charging_limit.Response)
  NotifyCustomerInformationResponse(
    notify_customer_information.Response,
  )
  NotifyDerAlarmResponse(notify_der_alarm.Response)
  NotifyDerStartStopResponse(notify_der_start_stop.Response)
  NotifyDisplayMessagesResponse(notify_display_messages.Response)
  NotifyEvChargingNeedsResponse(
    notify_ev_charging_needs.Response,
  )
  NotifyEvChargingScheduleResponse(
    notify_ev_charging_schedule.Response,
  )
  NotifyEventResponse(notify_event.Response)
  NotifyMonitoringReportResponse(
    notify_monitoring_report.Response,
  )
  NotifyPriorityChargingResponse(
    notify_priority_charging.Response,
  )
  NotifyReportResponse(notify_report.Response)
  NotifySettlementResponse(notify_settlement.Response)
  NotifyWebPaymentStartedResponse(
    notify_web_payment_started.Response,
  )
  OpenPeriodicEventStreamResponse(
    open_periodic_event_stream.Response,
  )
  PublishFirmwareResponse(publish_firmware.Response)
  PublishFirmwareStatusNotificationResponse(
    publish_firmware_status_notification.Response,
  )
  PullDynamicScheduleUpdateResponse(
    pull_dynamic_schedule_update.Response,
  )
  ReportChargingProfilesResponse(
    report_charging_profiles.Response,
  )
  ReportDerControlResponse(report_der_control.Response)
  RequestBatterySwapResponse(request_battery_swap.Response)
  RequestStartTransactionResponse(
    request_start_transaction.Response,
  )
  RequestStopTransactionResponse(
    request_stop_transaction.Response,
  )
  ReservationStatusUpdateResponse(
    reservation_status_update.Response,
  )
  ReserveNowResponse(reserve_now.Response)
  ResetResponse(reset.Response)
  SecurityEventNotificationResponse(
    security_event_notification.Response,
  )
  SendLocalListResponse(send_local_list.Response)
  SetChargingProfileResponse(set_charging_profile.Response)
  SetDerControlResponse(set_der_control.Response)
  SetDefaultTariffResponse(set_default_tariff.Response)
  SetDisplayMessageResponse(set_display_message.Response)
  SetMonitoringBaseResponse(set_monitoring_base.Response)
  SetMonitoringLevelResponse(set_monitoring_level.Response)
  SetNetworkProfileResponse(set_network_profile.Response)
  SetVariableMonitoringResponse(set_variable_monitoring.Response)
  SetVariablesResponse(set_variables.Response)
  SignCertificateResponse(sign_certificate.Response)
  StatusNotificationResponse(status_notification.Response)
  TransactionEventResponse(transaction_event.Response)
  TriggerMessageResponse(trigger_message.Response)
  UnlockConnectorResponse(unlock_connector.Response)
  UnpublishFirmwareResponse(unpublish_firmware.Response)
  UpdateDynamicScheduleResponse(update_dynamic_schedule.Response)
  UpdateFirmwareResponse(update_firmware.Response)
  UsePriorityChargingResponse(use_priority_charging.Response)
  VatNumberValidationResponse(vat_number_validation.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