├── .github ├── dependabot.yml └── workflows │ ├── publish.yml │ └── rust.yml ├── .gitignore ├── .pre-commit-config.yaml ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── docs └── ocpp │ ├── v1.6 │ ├── ocpp-1.6 edition 2.pdf │ ├── ocpp-1.6-errata-sheet.pdf │ ├── ocpp-j-1.6-errata-sheet.pdf │ ├── ocpp-j-1.6-specification.pdf │ ├── ocpp-s-1.6-errata-sheet.pdf │ └── ocpp-s-1.6-specification.pdf │ ├── v2.0.1 │ ├── Changelog OCPP 2.0 - 2.0.1.pdf │ ├── OCPP-2.0.1_part0_introduction.pdf │ ├── OCPP-2.0.1_part1_architecture_topology.pdf │ ├── OCPP-2.0.1_part2_appendices.pdf │ ├── OCPP-2.0.1_part2_specification.pdf │ ├── OCPP-2.0.1_part4_ocpp-j-specification.pdf │ ├── OCPP-2.0_part1_errata.pdf │ ├── OCPP-2.0_part2_errata.pdf │ └── OCPP-2.0_part4_errata.pdf │ └── v2.1 │ ├── OCPP-2.1_edition1_part0_introduction.pdf │ ├── OCPP-2.1_edition1_part1_architecture_topology.pdf │ ├── OCPP-2.1_edition1_part2_specification.pdf │ ├── OCPP-2.1_edition1_part4_ocpp-j-specification.pdf │ └── OCPP-2.1_part2_appendices_v20.pdf ├── rust-toolchain.toml └── src ├── lib.rs ├── tests ├── README.md ├── mod.rs └── schema_validation │ ├── mod.rs │ ├── schemas │ ├── v1.6 │ │ ├── json │ │ │ ├── Authorize.json │ │ │ ├── AuthorizeResponse.json │ │ │ ├── BootNotification.json │ │ │ ├── BootNotificationResponse.json │ │ │ ├── CancelReservation.json │ │ │ ├── CancelReservationResponse.json │ │ │ ├── ChangeAvailability.json │ │ │ ├── ChangeAvailabilityResponse.json │ │ │ ├── ChangeConfiguration.json │ │ │ ├── ChangeConfigurationResponse.json │ │ │ ├── ClearCache.json │ │ │ ├── ClearCacheResponse.json │ │ │ ├── ClearChargingProfile.json │ │ │ ├── ClearChargingProfileResponse.json │ │ │ ├── DataTransfer.json │ │ │ ├── DataTransferResponse.json │ │ │ ├── DiagnosticsStatusNotification.json │ │ │ ├── DiagnosticsStatusNotificationResponse.json │ │ │ ├── FirmwareStatusNotification.json │ │ │ ├── FirmwareStatusNotificationResponse.json │ │ │ ├── GetCompositeSchedule.json │ │ │ ├── GetCompositeScheduleResponse.json │ │ │ ├── GetConfiguration.json │ │ │ ├── GetConfigurationResponse.json │ │ │ ├── GetDiagnostics.json │ │ │ ├── GetDiagnosticsResponse.json │ │ │ ├── GetLocalListVersion.json │ │ │ ├── GetLocalListVersionResponse.json │ │ │ ├── Heartbeat.json │ │ │ ├── HeartbeatResponse.json │ │ │ ├── MeterValues.json │ │ │ ├── MeterValuesResponse.json │ │ │ ├── OCPP-1.6-JSON-Schemas.zip │ │ │ ├── RemoteStartTransaction.json │ │ │ ├── RemoteStartTransactionResponse.json │ │ │ ├── RemoteStopTransaction.json │ │ │ ├── RemoteStopTransactionResponse.json │ │ │ ├── ReserveNow.json │ │ │ ├── ReserveNowResponse.json │ │ │ ├── Reset.json │ │ │ ├── ResetResponse.json │ │ │ ├── SendLocalList.json │ │ │ ├── SendLocalListResponse.json │ │ │ ├── SetChargingProfile.json │ │ │ ├── SetChargingProfileResponse.json │ │ │ ├── StartTransaction.json │ │ │ ├── StartTransactionResponse.json │ │ │ ├── StatusNotification.json │ │ │ ├── StatusNotificationResponse.json │ │ │ ├── StopTransaction.json │ │ │ ├── StopTransactionResponse.json │ │ │ ├── TriggerMessage.json │ │ │ ├── TriggerMessageResponse.json │ │ │ ├── UnlockConnector.json │ │ │ ├── UnlockConnectorResponse.json │ │ │ ├── UpdateFirmware.json │ │ │ └── UpdateFirmwareResponse.json │ │ └── soap │ │ │ ├── OCPP_CentralSystemService_1.6.wsdl │ │ │ └── OCPP_ChargePointService_1.6.wsdl │ ├── v2.0.1 │ │ ├── AuthorizeRequest.json │ │ ├── AuthorizeResponse.json │ │ ├── BootNotificationRequest.json │ │ ├── BootNotificationResponse.json │ │ ├── CancelReservationRequest.json │ │ ├── CancelReservationResponse.json │ │ ├── CertificateSignedRequest.json │ │ ├── CertificateSignedResponse.json │ │ ├── ChangeAvailabilityRequest.json │ │ ├── ChangeAvailabilityResponse.json │ │ ├── ClearCacheRequest.json │ │ ├── ClearCacheResponse.json │ │ ├── ClearChargingProfileRequest.json │ │ ├── ClearChargingProfileResponse.json │ │ ├── ClearDisplayMessageRequest.json │ │ ├── ClearDisplayMessageResponse.json │ │ ├── ClearVariableMonitoringRequest.json │ │ ├── ClearVariableMonitoringResponse.json │ │ ├── ClearedChargingLimitRequest.json │ │ ├── ClearedChargingLimitResponse.json │ │ ├── CostUpdatedRequest.json │ │ ├── CostUpdatedResponse.json │ │ ├── CustomerInformationRequest.json │ │ ├── CustomerInformationResponse.json │ │ ├── DataTransferRequest.json │ │ ├── DataTransferResponse.json │ │ ├── DeleteCertificateRequest.json │ │ ├── DeleteCertificateResponse.json │ │ ├── FirmwareStatusNotificationRequest.json │ │ ├── FirmwareStatusNotificationResponse.json │ │ ├── Get15118EVCertificateRequest.json │ │ ├── Get15118EVCertificateResponse.json │ │ ├── GetBaseReportRequest.json │ │ ├── GetBaseReportResponse.json │ │ ├── GetCertificateStatusRequest.json │ │ ├── GetCertificateStatusResponse.json │ │ ├── GetChargingProfilesRequest.json │ │ ├── GetChargingProfilesResponse.json │ │ ├── GetCompositeScheduleRequest.json │ │ ├── GetCompositeScheduleResponse.json │ │ ├── GetDisplayMessagesRequest.json │ │ ├── GetDisplayMessagesResponse.json │ │ ├── GetInstalledCertificateIdsRequest.json │ │ ├── GetInstalledCertificateIdsResponse.json │ │ ├── GetLocalListVersionRequest.json │ │ ├── GetLocalListVersionResponse.json │ │ ├── GetLogRequest.json │ │ ├── GetLogResponse.json │ │ ├── GetMonitoringReportRequest.json │ │ ├── GetMonitoringReportResponse.json │ │ ├── GetReportRequest.json │ │ ├── GetReportResponse.json │ │ ├── GetTransactionStatusRequest.json │ │ ├── GetTransactionStatusResponse.json │ │ ├── GetVariablesRequest.json │ │ ├── GetVariablesResponse.json │ │ ├── HeartbeatRequest.json │ │ ├── HeartbeatResponse.json │ │ ├── InstallCertificateRequest.json │ │ ├── InstallCertificateResponse.json │ │ ├── LogStatusNotificationRequest.json │ │ ├── LogStatusNotificationResponse.json │ │ ├── MeterValuesRequest.json │ │ ├── MeterValuesResponse.json │ │ ├── NotifyChargingLimitRequest.json │ │ ├── NotifyChargingLimitResponse.json │ │ ├── NotifyCustomerInformationRequest.json │ │ ├── NotifyCustomerInformationResponse.json │ │ ├── NotifyDisplayMessagesRequest.json │ │ ├── NotifyDisplayMessagesResponse.json │ │ ├── NotifyEVChargingNeedsRequest.json │ │ ├── NotifyEVChargingNeedsResponse.json │ │ ├── NotifyEVChargingScheduleRequest.json │ │ ├── NotifyEVChargingScheduleResponse.json │ │ ├── NotifyEventRequest.json │ │ ├── NotifyEventResponse.json │ │ ├── NotifyMonitoringReportRequest.json │ │ ├── NotifyMonitoringReportResponse.json │ │ ├── NotifyReportRequest.json │ │ ├── NotifyReportResponse.json │ │ ├── PublishFirmwareRequest.json │ │ ├── PublishFirmwareResponse.json │ │ ├── PublishFirmwareStatusNotificationRequest.json │ │ ├── PublishFirmwareStatusNotificationResponse.json │ │ ├── ReportChargingProfilesRequest.json │ │ ├── ReportChargingProfilesResponse.json │ │ ├── RequestStartTransactionRequest.json │ │ ├── RequestStartTransactionResponse.json │ │ ├── RequestStopTransactionRequest.json │ │ ├── RequestStopTransactionResponse.json │ │ ├── ReservationStatusUpdateRequest.json │ │ ├── ReservationStatusUpdateResponse.json │ │ ├── ReserveNowRequest.json │ │ ├── ReserveNowResponse.json │ │ ├── ResetRequest.json │ │ ├── ResetResponse.json │ │ ├── SecurityEventNotificationRequest.json │ │ ├── SecurityEventNotificationResponse.json │ │ ├── SendLocalListRequest.json │ │ ├── SendLocalListResponse.json │ │ ├── SetChargingProfileRequest.json │ │ ├── SetChargingProfileResponse.json │ │ ├── SetDisplayMessageRequest.json │ │ ├── SetDisplayMessageResponse.json │ │ ├── SetMonitoringBaseRequest.json │ │ ├── SetMonitoringBaseResponse.json │ │ ├── SetMonitoringLevelRequest.json │ │ ├── SetMonitoringLevelResponse.json │ │ ├── SetNetworkProfileRequest.json │ │ ├── SetNetworkProfileResponse.json │ │ ├── SetVariableMonitoringRequest.json │ │ ├── SetVariableMonitoringResponse.json │ │ ├── SetVariablesRequest.json │ │ ├── SetVariablesResponse.json │ │ ├── SignCertificateRequest.json │ │ ├── SignCertificateResponse.json │ │ ├── StatusNotificationRequest.json │ │ ├── StatusNotificationResponse.json │ │ ├── TransactionEventRequest.json │ │ ├── TransactionEventResponse.json │ │ ├── TriggerMessageRequest.json │ │ ├── TriggerMessageResponse.json │ │ ├── UnlockConnectorRequest.json │ │ ├── UnlockConnectorResponse.json │ │ ├── UnpublishFirmwareRequest.json │ │ ├── UnpublishFirmwareResponse.json │ │ ├── UpdateFirmwareRequest.json │ │ └── UpdateFirmwareResponse.json │ └── v2.1 │ │ ├── AFRRSignalRequest.json │ │ ├── AFRRSignalResponse.json │ │ ├── AdjustPeriodicEventStreamRequest.json │ │ ├── AdjustPeriodicEventStreamResponse.json │ │ ├── AuthorizeRequest.json │ │ ├── AuthorizeResponse.json │ │ ├── BatterySwapRequest.json │ │ ├── BatterySwapResponse.json │ │ ├── BootNotificationRequest.json │ │ ├── BootNotificationResponse.json │ │ ├── CancelReservationRequest.json │ │ ├── CancelReservationResponse.json │ │ ├── CertificateSignedRequest.json │ │ ├── CertificateSignedResponse.json │ │ ├── ChangeAvailabilityRequest.json │ │ ├── ChangeAvailabilityResponse.json │ │ ├── ChangeTransactionTariffRequest.json │ │ ├── ChangeTransactionTariffResponse.json │ │ ├── ClearCacheRequest.json │ │ ├── ClearCacheResponse.json │ │ ├── ClearChargingProfileRequest.json │ │ ├── ClearChargingProfileResponse.json │ │ ├── ClearDERControlRequest.json │ │ ├── ClearDERControlResponse.json │ │ ├── ClearDisplayMessageRequest.json │ │ ├── ClearDisplayMessageResponse.json │ │ ├── ClearTariffsRequest.json │ │ ├── ClearTariffsResponse.json │ │ ├── ClearVariableMonitoringRequest.json │ │ ├── ClearVariableMonitoringResponse.json │ │ ├── ClearedChargingLimitRequest.json │ │ ├── ClearedChargingLimitResponse.json │ │ ├── ClosePeriodicEventStreamRequest.json │ │ ├── ClosePeriodicEventStreamResponse.json │ │ ├── CostUpdatedRequest.json │ │ ├── CostUpdatedResponse.json │ │ ├── CustomerInformationRequest.json │ │ ├── CustomerInformationResponse.json │ │ ├── DataTransferRequest.json │ │ ├── DataTransferResponse.json │ │ ├── DeleteCertificateRequest.json │ │ ├── DeleteCertificateResponse.json │ │ ├── FirmwareStatusNotificationRequest.json │ │ ├── FirmwareStatusNotificationResponse.json │ │ ├── Get15118EVCertificateRequest.json │ │ ├── Get15118EVCertificateResponse.json │ │ ├── GetBaseReportRequest.json │ │ ├── GetBaseReportResponse.json │ │ ├── GetCertificateChainStatusRequest.json │ │ ├── GetCertificateChainStatusResponse.json │ │ ├── GetCertificateStatusRequest.json │ │ ├── GetCertificateStatusResponse.json │ │ ├── GetChargingProfilesRequest.json │ │ ├── GetChargingProfilesResponse.json │ │ ├── GetCompositeScheduleRequest.json │ │ ├── GetCompositeScheduleResponse.json │ │ ├── GetDERControlRequest.json │ │ ├── GetDERControlResponse.json │ │ ├── GetDisplayMessagesRequest.json │ │ ├── GetDisplayMessagesResponse.json │ │ ├── GetInstalledCertificateIdsRequest.json │ │ ├── GetInstalledCertificateIdsResponse.json │ │ ├── GetLocalListVersionRequest.json │ │ ├── GetLocalListVersionResponse.json │ │ ├── GetLogRequest.json │ │ ├── GetLogResponse.json │ │ ├── GetMonitoringReportRequest.json │ │ ├── GetMonitoringReportResponse.json │ │ ├── GetPeriodicEventStreamRequest.json │ │ ├── GetPeriodicEventStreamResponse.json │ │ ├── GetReportRequest.json │ │ ├── GetReportResponse.json │ │ ├── GetTariffsRequest.json │ │ ├── GetTariffsResponse.json │ │ ├── GetTransactionStatusRequest.json │ │ ├── GetTransactionStatusResponse.json │ │ ├── GetVariablesRequest.json │ │ ├── GetVariablesResponse.json │ │ ├── HeartbeatRequest.json │ │ ├── HeartbeatResponse.json │ │ ├── InstallCertificateRequest.json │ │ ├── InstallCertificateResponse.json │ │ ├── LogStatusNotificationRequest.json │ │ ├── LogStatusNotificationResponse.json │ │ ├── MeterValuesRequest.json │ │ ├── MeterValuesResponse.json │ │ ├── NotifyAllowedEnergyTransferRequest.json │ │ ├── NotifyAllowedEnergyTransferResponse.json │ │ ├── NotifyChargingLimitRequest.json │ │ ├── NotifyChargingLimitResponse.json │ │ ├── NotifyCustomerInformationRequest.json │ │ ├── NotifyCustomerInformationResponse.json │ │ ├── NotifyDERAlarmRequest.json │ │ ├── NotifyDERAlarmResponse.json │ │ ├── NotifyDERStartStopRequest.json │ │ ├── NotifyDERStartStopResponse.json │ │ ├── NotifyDisplayMessagesRequest.json │ │ ├── NotifyDisplayMessagesResponse.json │ │ ├── NotifyEVChargingNeedsRequest.json │ │ ├── NotifyEVChargingNeedsResponse.json │ │ ├── NotifyEVChargingScheduleRequest.json │ │ ├── NotifyEVChargingScheduleResponse.json │ │ ├── NotifyEventRequest.json │ │ ├── NotifyEventResponse.json │ │ ├── NotifyMonitoringReportRequest.json │ │ ├── NotifyMonitoringReportResponse.json │ │ ├── NotifyPeriodicEventStream.json │ │ ├── NotifyPriorityChargingRequest.json │ │ ├── NotifyPriorityChargingResponse.json │ │ ├── NotifyReportRequest.json │ │ ├── NotifyReportResponse.json │ │ ├── NotifySettlementRequest.json │ │ ├── NotifySettlementResponse.json │ │ ├── NotifyWebPaymentStartedRequest.json │ │ ├── NotifyWebPaymentStartedResponse.json │ │ ├── OpenPeriodicEventStreamRequest.json │ │ ├── OpenPeriodicEventStreamResponse.json │ │ ├── PublishFirmwareRequest.json │ │ ├── PublishFirmwareResponse.json │ │ ├── PublishFirmwareStatusNotificationRequest.json │ │ ├── PublishFirmwareStatusNotificationResponse.json │ │ ├── PullDynamicScheduleUpdateRequest.json │ │ ├── PullDynamicScheduleUpdateResponse.json │ │ ├── ReportChargingProfilesRequest.json │ │ ├── ReportChargingProfilesResponse.json │ │ ├── ReportDERControlRequest.json │ │ ├── ReportDERControlResponse.json │ │ ├── RequestBatterySwapRequest.json │ │ ├── RequestBatterySwapResponse.json │ │ ├── RequestStartTransactionRequest.json │ │ ├── RequestStartTransactionResponse.json │ │ ├── RequestStopTransactionRequest.json │ │ ├── RequestStopTransactionResponse.json │ │ ├── ReservationStatusUpdateRequest.json │ │ ├── ReservationStatusUpdateResponse.json │ │ ├── ReserveNowRequest.json │ │ ├── ReserveNowResponse.json │ │ ├── ResetRequest.json │ │ ├── ResetResponse.json │ │ ├── SecurityEventNotificationRequest.json │ │ ├── SecurityEventNotificationResponse.json │ │ ├── SendLocalListRequest.json │ │ ├── SendLocalListResponse.json │ │ ├── SetChargingProfileRequest.json │ │ ├── SetChargingProfileResponse.json │ │ ├── SetDERControlRequest.json │ │ ├── SetDERControlResponse.json │ │ ├── SetDefaultTariffRequest.json │ │ ├── SetDefaultTariffResponse.json │ │ ├── SetDisplayMessageRequest.json │ │ ├── SetDisplayMessageResponse.json │ │ ├── SetMonitoringBaseRequest.json │ │ ├── SetMonitoringBaseResponse.json │ │ ├── SetMonitoringLevelRequest.json │ │ ├── SetMonitoringLevelResponse.json │ │ ├── SetNetworkProfileRequest.json │ │ ├── SetNetworkProfileResponse.json │ │ ├── SetVariableMonitoringRequest.json │ │ ├── SetVariableMonitoringResponse.json │ │ ├── SetVariablesRequest.json │ │ ├── SetVariablesResponse.json │ │ ├── SignCertificateRequest.json │ │ ├── SignCertificateResponse.json │ │ ├── StatusNotificationRequest.json │ │ ├── StatusNotificationResponse.json │ │ ├── TransactionEventRequest.json │ │ ├── TransactionEventResponse.json │ │ ├── TriggerMessageRequest.json │ │ ├── TriggerMessageResponse.json │ │ ├── UnlockConnectorRequest.json │ │ ├── UnlockConnectorResponse.json │ │ ├── UnpublishFirmwareRequest.json │ │ ├── UnpublishFirmwareResponse.json │ │ ├── UpdateDynamicScheduleRequest.json │ │ ├── UpdateDynamicScheduleResponse.json │ │ ├── UpdateFirmwareRequest.json │ │ ├── UpdateFirmwareResponse.json │ │ ├── UsePriorityChargingRequest.json │ │ ├── UsePriorityChargingResponse.json │ │ ├── VatNumberValidationRequest.json │ │ └── VatNumberValidationResponse.json │ ├── v1_6.rs │ ├── v2_0_1.rs │ └── v2_1.rs ├── v1_6 ├── README.md ├── messages │ ├── authorize.rs │ ├── boot_notification.rs │ ├── cancel_reservation.rs │ ├── change_availability.rs │ ├── change_configuration.rs │ ├── clear_cache.rs │ ├── clear_charging_profile.rs │ ├── data_transfer.rs │ ├── diagnostics_status_notification.rs │ ├── firmware_status_notification.rs │ ├── get_composite_schedule.rs │ ├── get_configuration.rs │ ├── get_diagnostics.rs │ ├── get_local_list_version.rs │ ├── heart_beat.rs │ ├── meter_values.rs │ ├── mod.rs │ ├── remote_start_transaction.rs │ ├── remote_stop_transaction.rs │ ├── reserve_now.rs │ ├── reset.rs │ ├── send_local_list.rs │ ├── set_charging_profile.rs │ ├── start_transaction.rs │ ├── status_notification.rs │ ├── stop_transaction.rs │ ├── trigger_message.rs │ ├── unlock_connector.rs │ └── update_firmware.rs ├── mod.rs └── types │ ├── authorization_data.rs │ ├── authorization_status.rs │ ├── availability_status.rs │ ├── availability_type.rs │ ├── cancel_reservation_status.rs │ ├── charge_point_error_code.rs │ ├── charge_point_status.rs │ ├── charging_profile.rs │ ├── charging_profile_kind_type.rs │ ├── charging_profile_purpose_type.rs │ ├── charging_profile_status.rs │ ├── charging_rate_unit_type.rs │ ├── charging_schedule.rs │ ├── charging_schedule_period.rs │ ├── clear_cache_status.rs │ ├── clear_charging_profile_status.rs │ ├── configuration_status.rs │ ├── data_transfer_status.rs │ ├── diagnostics_status.rs │ ├── firmware_status.rs │ ├── get_composite_schedule_status.rs │ ├── id_tag_info.rs │ ├── key_value.rs │ ├── location.rs │ ├── measurand.rs │ ├── message_trigger.rs │ ├── meter_value.rs │ ├── mod.rs │ ├── phase.rs │ ├── reading_context.rs │ ├── reason.rs │ ├── recurrency_kind_type.rs │ ├── registration_status.rs │ ├── remote_start_stop_status.rs │ ├── reservation_status.rs │ ├── reset_status.rs │ ├── reset_type.rs │ ├── sampled_value.rs │ ├── trigger_message_status.rs │ ├── unit_of_measure.rs │ ├── unlock_status.rs │ ├── update_status.rs │ ├── update_type.rs │ └── value_format.rs ├── v2_0_1 ├── README.md ├── datatypes │ ├── ac_charging_parameters_type.rs │ ├── additional_info_type.rs │ ├── apn_type.rs │ ├── authorization_data.rs │ ├── certificate_hash_data_chain_type.rs │ ├── certificate_hash_data_type.rs │ ├── charging_limit_type.rs │ ├── charging_needs_type.rs │ ├── charging_profile_criterion_type.rs │ ├── charging_profile_type.rs │ ├── charging_schedule_period_type.rs │ ├── charging_schedule_type.rs │ ├── charging_station_type.rs │ ├── clear_charging_profile_type.rs │ ├── clear_monitoring_result_type.rs │ ├── component_type.rs │ ├── component_variable_type.rs │ ├── composite_schedule_type.rs │ ├── consumption_cost_type.rs │ ├── cost_type.rs │ ├── dc_charging_parameters_type.rs │ ├── event_data_type.rs │ ├── evse_type.rs │ ├── firmware_type.rs │ ├── get_variable_data_type.rs │ ├── get_variable_result_type.rs │ ├── id_token_info_type.rs │ ├── id_token_type.rs │ ├── log_parameters_type.rs │ ├── message_content_type.rs │ ├── message_info_type.rs │ ├── meter_value_type.rs │ ├── mod.rs │ ├── modem_type.rs │ ├── monitoring_data_type.rs │ ├── network_connection_profile_type.rs │ ├── ocsp_request_data_type.rs │ ├── relative_time_interval_type.rs │ ├── report_data_type.rs │ ├── sales_tariff_entry_type.rs │ ├── sales_tariff_type.rs │ ├── sampled_value_type.rs │ ├── set_monitoring_data_type.rs │ ├── set_monitoring_result_type.rs │ ├── set_variable_data_type.rs │ ├── set_variable_result_type.rs │ ├── signed_meter_value_type.rs │ ├── status_info_type.rs │ ├── transaction_type.rs │ ├── unit_of_measure_type.rs │ ├── variable_attribute_type.rs │ ├── variable_characteristics_type.rs │ ├── variable_monitoring_type.rs │ ├── variable_type.rs │ └── vpn_type.rs ├── enumerations │ ├── apn_authentication_enum_type.rs │ ├── attribute_enum_type.rs │ ├── authorization_status_enum_type.rs │ ├── authorize_certificate_status_enum_type.rs │ ├── boot_reason_enum_type.rs │ ├── cancel_reservation_status_enum_type.rs │ ├── certificate_action_enum_type.rs │ ├── certificate_signed_status_enum_type.rs │ ├── certificate_signing_use_enum_type.rs │ ├── change_availability_status_enum_type.rs │ ├── charging_limit_source_enum_type.rs │ ├── charging_profile_kind_enum_type.rs │ ├── charging_profile_purpose_enum_type.rs │ ├── charging_profile_status_enum_type.rs │ ├── charging_rate_unit_enum_type.rs │ ├── charging_state_enum_type.rs │ ├── clear_cache_status_enum_type.rs │ ├── clear_charging_profile_status_enum_type.rs │ ├── clear_message_status_enum_type.rs │ ├── clear_monitoring_status_enum_type.rs │ ├── component_criterion_enum_type.rs │ ├── connector_enum_type.rs │ ├── connector_status_enum_type.rs │ ├── cost_kind_enum_type.rs │ ├── customer_information_status_enum_type.rs │ ├── data_enum_type.rs │ ├── data_transfer_status_enum_type.rs │ ├── delete_certificate_status_enum_type.rs │ ├── display_message_status_enum_type.rs │ ├── energy_transfer_mode_enum_type.rs │ ├── event_notification_enum_type.rs │ ├── event_trigger_enum_type.rs │ ├── firmware_status_enum_type.rs │ ├── generic_device_model_status_enum_type.rs │ ├── generic_status_enum_type.rs │ ├── get_certificate_id_use_enum_type.rs │ ├── get_certificate_status_enum_type.rs │ ├── get_charging_profile_status_enum_type.rs │ ├── get_display_messages_status_enum_type.rs │ ├── get_installed_certificate_status_enum_type.rs │ ├── get_variable_status_enum_type.rs │ ├── hash_algorithm_enum_type.rs │ ├── id_token_enum_type.rs │ ├── install_certificate_status_enum_type.rs │ ├── install_certificate_use_enum_type.rs │ ├── iso15118ev_certificate_status_enum_type.rs │ ├── location_enum_type.rs │ ├── log_enum_type.rs │ ├── log_status_enum_type.rs │ ├── measurand_enum_type.rs │ ├── message_format_enum_type.rs │ ├── message_priority_enum_type.rs │ ├── message_state_enum_type.rs │ ├── message_trigger_enum_type.rs │ ├── mod.rs │ ├── monitor_enum_type.rs │ ├── monitoring_base_enum_type.rs │ ├── monitoring_criterion_enum_type.rs │ ├── mutability_enum_type.rs │ ├── notify_ev_charging_needs_status_enum_type.rs │ ├── ocpp_interface_enum_type.rs │ ├── ocpp_transport_enum_type.rs │ ├── ocpp_version_enum_type.rs │ ├── operational_status_enum_type.rs │ ├── phase_enum_type.rs │ ├── publish_firmware_status_enum_type.rs │ ├── reading_context_enum_type.rs │ ├── reason_enum_type.rs │ ├── recurrency_kind_enum_type.rs │ ├── registration_status_enum_type.rs │ ├── report_base_enum_type.rs │ ├── request_start_stop_status_enum_type.rs │ ├── reservation_update_status_enum_type.rs │ ├── reserve_now_status_enum_type.rs │ ├── reset_enum_type.rs │ ├── reset_status_enum_type.rs │ ├── send_local_list_status_enum_type.rs │ ├── set_monitoring_status_enum_type.rs │ ├── set_network_profile_status_enum_type.rs │ ├── set_variable_status_enum_type.rs │ ├── transaction_event_enum_type.rs │ ├── trigger_message_status_enum_type.rs │ ├── trigger_reason_enum_type.rs │ ├── unlock_status_enum_type.rs │ ├── unpublish_firmware_status_enum_type.rs │ ├── update_enum_type.rs │ ├── update_firmware_status_enum_type.rs │ ├── upload_log_status_enum_type.rs │ └── vpn_enum_type.rs ├── helpers │ ├── datetime_rfc3339.rs │ ├── mod.rs │ └── validator.rs ├── messages │ ├── authorize.rs │ ├── boot_notification.rs │ ├── cancel_reservation.rs │ ├── certificate_signed.rs │ ├── change_availability.rs │ ├── clear_cache.rs │ ├── clear_charging_profile.rs │ ├── clear_display_message.rs │ ├── clear_variable_monitoring.rs │ ├── cleared_charging_limit.rs │ ├── cost_updated.rs │ ├── customer_information.rs │ ├── datatransfer.rs │ ├── delete_certificate.rs │ ├── firmware_status_notification.rs │ ├── get_15118ev_certificate.rs │ ├── get_base_report.rs │ ├── get_certificate_status.rs │ ├── get_charging_profiles.rs │ ├── get_composite_schedule.rs │ ├── get_display_message.rs │ ├── get_installed_certificate_ids.rs │ ├── get_local_list_version.rs │ ├── get_log.rs │ ├── get_monitoring_report.rs │ ├── get_report.rs │ ├── get_transaction_status.rs │ ├── get_variables.rs │ ├── heartbeat.rs │ ├── install_certificate.rs │ ├── log_status_notification.rs │ ├── meter_values.rs │ ├── mod.rs │ ├── notify_charging_limit.rs │ ├── notify_customer_information.rs │ ├── notify_display_messages.rs │ ├── notify_ev_charging_needs.rs │ ├── notify_ev_charging_schedule.rs │ ├── notify_event.rs │ ├── notify_monitoring_report.rs │ ├── notify_report.rs │ ├── publish_firmware.rs │ ├── publish_firmware_status_notification.rs │ ├── report_charging_profiles.rs │ ├── request_start_transaction.rs │ ├── request_stop_transaction.rs │ ├── reservation_status_update.rs │ ├── reserve_now.rs │ ├── reset.rs │ ├── security_event_notification.rs │ ├── send_local_list.rs │ ├── set_charging_profile.rs │ ├── set_display_message.rs │ ├── set_monitoring_base.rs │ ├── set_monitoring_level.rs │ ├── set_network_profile.rs │ ├── set_variable_monitoring.rs │ ├── set_variables.rs │ ├── sign_certificate.rs │ ├── status_notification.rs │ ├── transaction_event.rs │ ├── trigger_message.rs │ ├── unlock_connector.rs │ ├── unpublish_firmware.rs │ └── update_firmware.rs └── mod.rs └── v2_1 ├── datatypes ├── absolute_price_schedule.rs ├── ac_charging_parameters.rs ├── additional_info.rs ├── additional_selected_services.rs ├── address.rs ├── apn.rs ├── authorization_data.rs ├── battery_data.rs ├── certificate_hash_data.rs ├── certificate_hash_data_chain.rs ├── certificate_status.rs ├── certificate_status_request_info.rs ├── charging_limit.rs ├── charging_needs.rs ├── charging_period.rs ├── charging_profile.rs ├── charging_profile_criterion.rs ├── charging_schedule.rs ├── charging_schedule_period.rs ├── charging_schedule_update.rs ├── charging_station.rs ├── clear_charging_profile.rs ├── clear_monitoring_result.rs ├── clear_tariffs_result.rs ├── component.rs ├── component_variable.rs ├── composite_schedule.rs ├── constant_stream_data.rs ├── consumption_cost.rs ├── cost.rs ├── cost_details.rs ├── cost_dimension.rs ├── custom_data.rs ├── dc_charging_parameters.rs ├── der_charging_parameters.rs ├── der_curve.rs ├── der_curve_get.rs ├── der_curve_points.rs ├── enter_service.rs ├── enter_service_get.rs ├── ev_absolute_price_schedule.rs ├── ev_absolute_price_schedule_entry.rs ├── ev_energy_offer.rs ├── ev_power_schedule.rs ├── ev_power_schedule_entry.rs ├── ev_price_rule.rs ├── evse.rs ├── firmware.rs ├── fixed_pf.rs ├── fixed_pf_get.rs ├── fixed_var.rs ├── fixed_var_get.rs ├── freq_droop.rs ├── freq_droop_get.rs ├── get_variable_data.rs ├── get_variable_result.rs ├── gradient.rs ├── gradient_get.rs ├── hysteresis.rs ├── id_token.rs ├── id_token_info.rs ├── limit_at_soc.rs ├── limit_max_discharge.rs ├── limit_max_discharge_get.rs ├── log_parameters.rs ├── message_content.rs ├── message_info.rs ├── meter_value.rs ├── mod.rs ├── modem.rs ├── monitoring_data.rs ├── network_connection_profile.rs ├── ocsp_request_data.rs ├── overstay_rule.rs ├── overstay_rule_list.rs ├── periodic_event_stream_params.rs ├── price.rs ├── price_level_schedule.rs ├── price_level_schedule_entry.rs ├── price_rule.rs ├── price_rule_stack.rs ├── rational_number.rs ├── reactive_power_params.rs ├── relative_time_interval.rs ├── report_data.rs ├── sales_tariff.rs ├── sales_tariff_entry.rs ├── sampled_value.rs ├── set_monitoring_data.rs ├── set_monitoring_result.rs ├── set_variable_data.rs ├── set_variable_result.rs ├── signed_meter_value.rs ├── status_info.rs ├── stream_data_element.rs ├── tariff.rs ├── tariff_assignment.rs ├── tariff_conditions.rs ├── tariff_conditions_fixed.rs ├── tariff_energy.rs ├── tariff_energy_price.rs ├── tariff_fixed.rs ├── tariff_fixed_price.rs ├── tariff_time.rs ├── tariff_time_price.rs ├── tax_rate.rs ├── tax_rule.rs ├── total_cost.rs ├── total_price.rs ├── total_usage.rs ├── transaction.rs ├── transaction_limit.rs ├── unit_of_measure.rs ├── v2x_charging_parameters.rs ├── v2x_freq_watt_point.rs ├── v2x_signal_watt_point.rs ├── variable.rs ├── variable_attribute.rs ├── variable_characteristics.rs ├── variable_monitoring.rs ├── voltage_params.rs └── vpn.rs ├── enumerations ├── apn_authentication.rs ├── attribute.rs ├── authorization_status.rs ├── authorize_certificate_status.rs ├── battery_swap_event.rs ├── boot_reason.rs ├── cancel_reservation_status.rs ├── certificate_action.rs ├── certificate_signed_status.rs ├── certificate_signing_use.rs ├── certificate_status.rs ├── certificate_status_source.rs ├── change_availability_status.rs ├── charging_limit_source.rs ├── charging_profile_kind.rs ├── charging_profile_purpose.rs ├── charging_profile_status.rs ├── charging_rate_unit.rs ├── charging_state.rs ├── clear_cache_status.rs ├── clear_charging_profile_status.rs ├── clear_message_status.rs ├── clear_monitoring_status.rs ├── component_criterion.rs ├── connector.rs ├── connector_status.rs ├── control_mode.rs ├── cost_dimension.rs ├── cost_kind.rs ├── customer_information_status.rs ├── data_enum.rs ├── data_transfer_status.rs ├── day_of_week.rs ├── delete_certificate_status.rs ├── der_control.rs ├── der_control_status.rs ├── der_unit.rs ├── display_message_status.rs ├── energy_transfer_mode.rs ├── event_notification.rs ├── event_trigger.rs ├── evse_kind.rs ├── firmware_status.rs ├── generic_device_model_status.rs ├── generic_status.rs ├── get_certificate_id_use.rs ├── get_certificate_status.rs ├── get_charging_profile_status.rs ├── get_display_messages_status.rs ├── get_installed_certificate_status.rs ├── get_variable_status.rs ├── grid_event_fault.rs ├── hash_algorithm.rs ├── install_certificate_status.rs ├── install_certificate_use.rs ├── islanding_detection.rs ├── iso15118ev_certificate_status.rs ├── location.rs ├── log.rs ├── log_status.rs ├── measurand.rs ├── message_format.rs ├── message_priority.rs ├── message_state.rs ├── message_trigger.rs ├── mobility_needs_mode.rs ├── mod.rs ├── monitor.rs ├── monitoring_base.rs ├── monitoring_criterion.rs ├── mutability.rs ├── notify_allowed_energy_transfer_status.rs ├── notify_ev_charging_needs_status.rs ├── ocpp_interface.rs ├── ocpp_transport.rs ├── ocpp_version.rs ├── operation_mode.rs ├── operational_status.rs ├── payment_status.rs ├── phase.rs ├── power_during_cessation.rs ├── preconditioning_status.rs ├── priority_charging_status.rs ├── publish_firmware_status.rs ├── reading_context.rs ├── reason.rs ├── recurrency_kind.rs ├── registration_status.rs ├── report_base.rs ├── request_start_stop_status.rs ├── reservation_update_status.rs ├── reserve_now_status.rs ├── reset.rs ├── reset_status.rs ├── send_local_list_status.rs ├── set_monitoring_status.rs ├── set_network_profile_status.rs ├── set_variable_status.rs ├── signing_method.rs ├── tariff_change_status.rs ├── tariff_clear_status.rs ├── tariff_cost.rs ├── tariff_get_status.rs ├── tariff_kind.rs ├── tariff_set_status.rs ├── transaction_event.rs ├── trigger_message_status.rs ├── trigger_reason.rs ├── unlock_status.rs ├── unpublish_firmware_status.rs ├── update.rs ├── update_firmware_status.rs ├── upload_log_status.rs └── vpn.rs ├── helpers ├── datetime_rfc3339.rs ├── mod.rs └── validator.rs ├── messages ├── adjust_periodic_event_stream.rs ├── afrr_signal.rs ├── authorize.rs ├── battery_swap.rs ├── boot_notification.rs ├── cancel_reservation.rs ├── certificate_signed.rs ├── change_availability.rs ├── change_transaction_tariff.rs ├── clear_cache.rs ├── clear_charging_profile.rs ├── clear_der_control.rs ├── clear_display_message.rs ├── clear_tariffs.rs ├── clear_variable_monitoring.rs ├── cleared_charging_limit.rs ├── close_periodic_event_stream.rs ├── cost_updated.rs ├── customer_information.rs ├── data_transfer.rs ├── delete_certificate.rs ├── firmware_status_notification.rs ├── get_15118ev_certificate.rs ├── get_base_report.rs ├── get_certificate_chain_status.rs ├── get_certificate_status.rs ├── get_charging_profiles.rs ├── get_composite_schedule.rs ├── get_display_messages.rs ├── get_installed_certificate_ids.rs ├── get_local_list_version.rs ├── get_log.rs ├── get_monitoring_report.rs ├── get_periodic_event_stream.rs ├── get_report.rs ├── get_tariffs.rs ├── get_transaction_status.rs ├── get_variables.rs ├── heartbeat.rs ├── install_certificate.rs ├── log_status_notification.rs ├── meter_values.rs ├── mod.rs ├── notify_allowed_energy_transfer.rs ├── notify_charging_limit.rs ├── notify_customer_information.rs ├── notify_der_alarm.rs ├── notify_der_start_stop.rs ├── notify_display_messages.rs ├── notify_ev_charging_needs.rs ├── notify_ev_charging_schedule.rs ├── notify_event.rs ├── notify_monitoring_report.rs ├── notify_periodic_event_stream.rs ├── notify_priority_charging.rs ├── notify_report.rs ├── notify_settlement.rs ├── notify_web_payment_started.rs ├── open_periodic_event_stream.rs ├── publish_firmware.rs ├── publish_firmware_status_notification.rs ├── pull_dynamic_schedule_update.rs ├── report_charging_profiles.rs ├── report_der_control.rs ├── request_battery_swap.rs ├── request_start_transaction.rs ├── request_stop_transaction.rs ├── reservation_status_update.rs ├── reserve_now.rs ├── reset.rs ├── security_event_notification.rs ├── send_local_list.rs ├── set_charging_profile.rs ├── set_default_tariff.rs ├── set_monitoring_base.rs ├── set_monitoring_level.rs ├── set_network_profile.rs ├── set_variable_monitoring.rs ├── set_variables.rs ├── sign_certificate.rs ├── status_notification.rs ├── transaction_event.rs ├── unlock_connector.rs ├── unpublish_firmware.rs ├── update_firmware.rs ├── use_priority_charging.rs └── vat_number_validation.rs └── mod.rs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "cargo" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | groups: 13 | patch: 14 | applies-to: version-updates 15 | patterns: 16 | - "*" 17 | update-types: 18 | - "patch" 19 | 20 | - package-ecosystem: "github-actions" 21 | directory: "/" 22 | schedule: 23 | interval: "daily" 24 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish to crates.io 2 | 3 | on: 4 | workflow_dispatch: {} 5 | release: 6 | types: 7 | - published 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build-test-publish: 14 | name: Publish to crates.io 15 | runs-on: ubuntu-latest 16 | steps: 17 | # build 18 | - uses: actions/checkout@v4 19 | - name: install llvm tools preview 20 | run: rustup component add llvm-tools-preview 21 | - uses: dtolnay/rust-toolchain@stable 22 | - run: cargo build --release --all-features 23 | 24 | # test 25 | - name: Run tests 26 | run: LLVM_PROFILE_FILE="your_name-%p-%m.profraw" cargo test --verbose --all-features 27 | 28 | # publish 29 | - uses: katyo/publish-crates@v2 30 | with: 31 | registry-token: ${{ secrets.CARGO_TOKEN }} 32 | check-repo: false 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ocpp/target 2 | target 3 | **/target 4 | .DS_Store 5 | .vscode 6 | **/.idea 7 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/mirrors-prettier 3 | rev: "v2.6.2" 4 | hooks: 5 | - id: prettier 6 | - repo: https://github.com/doublify/pre-commit-rust 7 | rev: v1.0 8 | hooks: 9 | - id: fmt 10 | - id: cargo-check 11 | - id: clippy 12 | -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-1.6 edition 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-1.6 edition 2.pdf -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-1.6-errata-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-1.6-errata-sheet.pdf -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-j-1.6-errata-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-j-1.6-errata-sheet.pdf -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-j-1.6-specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-j-1.6-specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-s-1.6-errata-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-s-1.6-errata-sheet.pdf -------------------------------------------------------------------------------- /docs/ocpp/v1.6/ocpp-s-1.6-specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v1.6/ocpp-s-1.6-specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/Changelog OCPP 2.0 - 2.0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/Changelog OCPP 2.0 - 2.0.1.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0.1_part0_introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0.1_part0_introduction.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0.1_part1_architecture_topology.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0.1_part1_architecture_topology.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0.1_part2_appendices.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0.1_part2_appendices.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0.1_part2_specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0.1_part2_specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0.1_part4_ocpp-j-specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0.1_part4_ocpp-j-specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0_part1_errata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0_part1_errata.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0_part2_errata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0_part2_errata.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.0.1/OCPP-2.0_part4_errata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.0.1/OCPP-2.0_part4_errata.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.1/OCPP-2.1_edition1_part0_introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.1/OCPP-2.1_edition1_part0_introduction.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.1/OCPP-2.1_edition1_part1_architecture_topology.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.1/OCPP-2.1_edition1_part1_architecture_topology.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.1/OCPP-2.1_edition1_part2_specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.1/OCPP-2.1_edition1_part2_specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.1/OCPP-2.1_edition1_part4_ocpp-j-specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.1/OCPP-2.1_edition1_part4_ocpp-j-specification.pdf -------------------------------------------------------------------------------- /docs/ocpp/v2.1/OCPP-2.1_part2_appendices_v20.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/docs/ocpp/v2.1/OCPP-2.1_part2_appendices_v20.pdf -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "stable" 3 | profile = "minimal" -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! # rust-ocpp 2 | //! 3 | //! `rust-ocpp` is a collection of data types and enums specified by the Open Charge Point Protocol 4 | //! by Open Charge Alliance 5 | //! 6 | //! More Info on Open Charge Alliance can be found here: [Open Charge Alliance](https://www.openchargealliance.org/) 7 | //! 8 | //! It aims to implement the `ocpp 1.6` and `ocpp 2.0.1` protocols. 9 | //! 10 | //! # v1_6 11 | //! The [v1_6](v1_6) module contains the `ocpp 1.6` implementation 12 | //! 13 | //! # v2_0_1 14 | //! The [v2_0_1](v2_0_1) module contains the `ocpp 2.0.1` implementation 15 | /// tests 16 | #[cfg(test)] 17 | pub mod tests; 18 | #[cfg(feature = "v1_6")] 19 | pub mod v1_6; 20 | #[cfg(feature = "v2_0_1")] 21 | pub mod v2_0_1; 22 | #[cfg(feature = "v2_1")] 23 | pub mod v2_1; 24 | -------------------------------------------------------------------------------- /src/tests/README.md: -------------------------------------------------------------------------------- 1 | # tests 2 | 3 | `schema_validation`: uses jsonschema files to validate the implementations 4 | -------------------------------------------------------------------------------- /src/tests/mod.rs: -------------------------------------------------------------------------------- 1 | /// Validate implementation using official json schemas 2 | /// provided by the Open Charge Alliance 3 | #[cfg(test)] 4 | mod schema_validation; 5 | -------------------------------------------------------------------------------- /src/tests/schema_validation/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(all(test, feature = "v1_6"))] 2 | mod v1_6; 3 | #[cfg(all(test, feature = "v2_0_1"))] 4 | mod v2_0_1; 5 | #[cfg(all(test, feature = "v2_1"))] 6 | mod v2_1; 7 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/Authorize.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:AuthorizeRequest", 4 | "title": "AuthorizeRequest", 5 | "type": "object", 6 | "properties": { 7 | "idTag": { 8 | "type": "string", 9 | "maxLength": 20 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "required": ["idTag"] 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/AuthorizeResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:AuthorizeResponse", 4 | "title": "AuthorizeResponse", 5 | "type": "object", 6 | "properties": { 7 | "idTagInfo": { 8 | "type": "object", 9 | "properties": { 10 | "expiryDate": { 11 | "type": "string", 12 | "format": "date-time" 13 | }, 14 | "parentIdTag": { 15 | "type": "string", 16 | "maxLength": 20 17 | }, 18 | "status": { 19 | "type": "string", 20 | "additionalProperties": false, 21 | "enum": ["Accepted", "Blocked", "Expired", "Invalid", "ConcurrentTx"] 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["status"] 26 | } 27 | }, 28 | "additionalProperties": false, 29 | "required": ["idTagInfo"] 30 | } 31 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/BootNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:BootNotificationResponse", 4 | "title": "BootNotificationResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Pending", "Rejected"] 11 | }, 12 | "currentTime": { 13 | "type": "string", 14 | "format": "date-time" 15 | }, 16 | "interval": { 17 | "type": "integer" 18 | } 19 | }, 20 | "additionalProperties": false, 21 | "required": ["status", "currentTime", "interval"] 22 | } 23 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/CancelReservation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:CancelReservationRequest", 4 | "title": "CancelReservationRequest", 5 | "type": "object", 6 | "properties": { 7 | "reservationId": { 8 | "type": "integer" 9 | } 10 | }, 11 | "additionalProperties": false, 12 | "required": ["reservationId"] 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/CancelReservationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:CancelReservationResponse", 4 | "title": "CancelReservationResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ChangeAvailability.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityRequest", 4 | "title": "ChangeAvailabilityRequest", 5 | "type": "object", 6 | "properties": { 7 | "connectorId": { 8 | "type": "integer" 9 | }, 10 | "type": { 11 | "type": "string", 12 | "additionalProperties": false, 13 | "enum": ["Inoperative", "Operative"] 14 | } 15 | }, 16 | "additionalProperties": false, 17 | "required": ["connectorId", "type"] 18 | } 19 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ChangeAvailabilityResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityResponse", 4 | "title": "ChangeAvailabilityResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected", "Scheduled"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ChangeConfiguration.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ChangeConfigurationRequest", 4 | "title": "ChangeConfigurationRequest", 5 | "type": "object", 6 | "properties": { 7 | "key": { 8 | "type": "string", 9 | "maxLength": 50 10 | }, 11 | "value": { 12 | "type": "string", 13 | "maxLength": 500 14 | } 15 | }, 16 | "additionalProperties": false, 17 | "required": ["key", "value"] 18 | } 19 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ChangeConfigurationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ChangeConfigurationResponse", 4 | "title": "ChangeConfigurationResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected", "RebootRequired", "NotSupported"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ClearCache.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ClearCacheRequest", 4 | "title": "ClearCacheRequest", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ClearCacheResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ClearCacheResponse", 4 | "title": "ClearCacheResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ClearChargingProfile.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ClearChargingProfileRequest", 4 | "title": "ClearChargingProfileRequest", 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "integer" 9 | }, 10 | "connectorId": { 11 | "type": "integer" 12 | }, 13 | "chargingProfilePurpose": { 14 | "type": "string", 15 | "additionalProperties": false, 16 | "enum": ["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"] 17 | }, 18 | "stackLevel": { 19 | "type": "integer" 20 | } 21 | }, 22 | "additionalProperties": false 23 | } 24 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ClearChargingProfileResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ClearChargingProfileResponse", 4 | "title": "ClearChargingProfileResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Unknown"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/DataTransfer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:DataTransferRequest", 4 | "title": "DataTransferRequest", 5 | "type": "object", 6 | "properties": { 7 | "vendorId": { 8 | "type": "string", 9 | "maxLength": 255 10 | }, 11 | "messageId": { 12 | "type": "string", 13 | "maxLength": 50 14 | }, 15 | "data": { 16 | "type": "string" 17 | } 18 | }, 19 | "additionalProperties": false, 20 | "required": ["vendorId"] 21 | } 22 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/DataTransferResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:DataTransferResponse", 4 | "title": "DataTransferResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected", "UnknownMessageId", "UnknownVendorId"] 11 | }, 12 | "data": { 13 | "type": "string" 14 | } 15 | }, 16 | "additionalProperties": false, 17 | "required": ["status"] 18 | } 19 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/DiagnosticsStatusNotification.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:DiagnosticsStatusNotificationRequest", 4 | "title": "DiagnosticsStatusNotificationRequest", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Idle", "Uploaded", "UploadFailed", "Uploading"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/DiagnosticsStatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:DiagnosticsStatusNotificationResponse", 4 | "title": "DiagnosticsStatusNotificationResponse", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/FirmwareStatusNotification.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationRequest", 4 | "title": "FirmwareStatusNotificationRequest", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": [ 11 | "Downloaded", 12 | "DownloadFailed", 13 | "Downloading", 14 | "Idle", 15 | "InstallationFailed", 16 | "Installing", 17 | "Installed" 18 | ] 19 | } 20 | }, 21 | "additionalProperties": false, 22 | "required": ["status"] 23 | } 24 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/FirmwareStatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationResponse", 4 | "title": "FirmwareStatusNotificationResponse", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetCompositeSchedule.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleRequest", 4 | "title": "GetCompositeScheduleRequest", 5 | "type": "object", 6 | "properties": { 7 | "connectorId": { 8 | "type": "integer" 9 | }, 10 | "duration": { 11 | "type": "integer" 12 | }, 13 | "chargingRateUnit": { 14 | "type": "string", 15 | "additionalProperties": false, 16 | "enum": ["A", "W"] 17 | } 18 | }, 19 | "additionalProperties": false, 20 | "required": ["connectorId", "duration"] 21 | } 22 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetConfiguration.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetConfigurationRequest", 4 | "title": "GetConfigurationRequest", 5 | "type": "object", 6 | "properties": { 7 | "key": { 8 | "type": "array", 9 | "items": { 10 | "type": "string", 11 | "maxLength": 50 12 | } 13 | } 14 | }, 15 | "additionalProperties": false 16 | } 17 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetDiagnostics.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetDiagnosticsRequest", 4 | "title": "GetDiagnosticsRequest", 5 | "type": "object", 6 | "properties": { 7 | "location": { 8 | "type": "string", 9 | "format": "uri" 10 | }, 11 | "retries": { 12 | "type": "integer" 13 | }, 14 | "retryInterval": { 15 | "type": "integer" 16 | }, 17 | "startTime": { 18 | "type": "string", 19 | "format": "date-time" 20 | }, 21 | "stopTime": { 22 | "type": "string", 23 | "format": "date-time" 24 | } 25 | }, 26 | "additionalProperties": false, 27 | "required": ["location"] 28 | } 29 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetDiagnosticsResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetDiagnosticsResponse", 4 | "title": "GetDiagnosticsResponse", 5 | "type": "object", 6 | "properties": { 7 | "fileName": { 8 | "type": "string", 9 | "maxLength": 255 10 | } 11 | }, 12 | "additionalProperties": false 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetLocalListVersion.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetLocalListVersionRequest", 4 | "title": "GetLocalListVersionRequest", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/GetLocalListVersionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:GetLocalListVersionResponse", 4 | "title": "GetLocalListVersionResponse", 5 | "type": "object", 6 | "properties": { 7 | "listVersion": { 8 | "type": "integer" 9 | } 10 | }, 11 | "additionalProperties": false, 12 | "required": ["listVersion"] 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/Heartbeat.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:HeartbeatRequest", 4 | "title": "HeartbeatRequest", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/HeartbeatResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:HeartbeatResponse", 4 | "title": "HeartbeatResponse", 5 | "type": "object", 6 | "properties": { 7 | "currentTime": { 8 | "type": "string", 9 | "format": "date-time" 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "required": ["currentTime"] 14 | } 15 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/MeterValuesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:MeterValuesResponse", 4 | "title": "MeterValuesResponse", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/OCPP-1.6-JSON-Schemas.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codelabsab/rust-ocpp/bc60955f79a3bc02b8b7df4a9f69e0eb375893c8/src/tests/schema_validation/schemas/v1.6/json/OCPP-1.6-JSON-Schemas.zip -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/RemoteStartTransactionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:RemoteStartTransactionResponse", 4 | "title": "RemoteStartTransactionResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/RemoteStopTransaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:RemoteStopTransactionRequest", 4 | "title": "RemoteStopTransactionRequest", 5 | "type": "object", 6 | "properties": { 7 | "transactionId": { 8 | "type": "integer" 9 | } 10 | }, 11 | "additionalProperties": false, 12 | "required": ["transactionId"] 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/RemoteStopTransactionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:RemoteStopTransactionResponse", 4 | "title": "RemoteStopTransactionResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ReserveNow.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ReserveNowRequest", 4 | "title": "ReserveNowRequest", 5 | "type": "object", 6 | "properties": { 7 | "connectorId": { 8 | "type": "integer" 9 | }, 10 | "expiryDate": { 11 | "type": "string", 12 | "format": "date-time" 13 | }, 14 | "idTag": { 15 | "type": "string", 16 | "maxLength": 20 17 | }, 18 | "parentIdTag": { 19 | "type": "string", 20 | "maxLength": 20 21 | }, 22 | "reservationId": { 23 | "type": "integer" 24 | } 25 | }, 26 | "additionalProperties": false, 27 | "required": ["connectorId", "expiryDate", "idTag", "reservationId"] 28 | } 29 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ReserveNowResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ReserveNowResponse", 4 | "title": "ReserveNowResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Faulted", "Occupied", "Rejected", "Unavailable"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/Reset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ResetRequest", 4 | "title": "ResetRequest", 5 | "type": "object", 6 | "properties": { 7 | "type": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Hard", "Soft"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["type"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/ResetResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:ResetResponse", 4 | "title": "ResetResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/SendLocalListResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:SendLocalListResponse", 4 | "title": "SendLocalListResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Failed", "NotSupported", "VersionMismatch"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/SetChargingProfileResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:SetChargingProfileResponse", 4 | "title": "SetChargingProfileResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected", "NotSupported"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/StartTransaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:StartTransactionRequest", 4 | "title": "StartTransactionRequest", 5 | "type": "object", 6 | "properties": { 7 | "connectorId": { 8 | "type": "integer" 9 | }, 10 | "idTag": { 11 | "type": "string", 12 | "maxLength": 20 13 | }, 14 | "meterStart": { 15 | "type": "integer" 16 | }, 17 | "reservationId": { 18 | "type": "integer" 19 | }, 20 | "timestamp": { 21 | "type": "string", 22 | "format": "date-time" 23 | } 24 | }, 25 | "additionalProperties": false, 26 | "required": ["connectorId", "idTag", "meterStart", "timestamp"] 27 | } 28 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/StatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:StatusNotificationResponse", 4 | "title": "StatusNotificationResponse", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/StopTransactionResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:StopTransactionResponse", 4 | "title": "StopTransactionResponse", 5 | "type": "object", 6 | "properties": { 7 | "idTagInfo": { 8 | "type": "object", 9 | "properties": { 10 | "expiryDate": { 11 | "type": "string", 12 | "format": "date-time" 13 | }, 14 | "parentIdTag": { 15 | "type": "string", 16 | "maxLength": 20 17 | }, 18 | "status": { 19 | "type": "string", 20 | "additionalProperties": false, 21 | "enum": ["Accepted", "Blocked", "Expired", "Invalid", "ConcurrentTx"] 22 | } 23 | }, 24 | "additionalProperties": false, 25 | "required": ["status"] 26 | } 27 | }, 28 | "additionalProperties": false 29 | } 30 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/TriggerMessage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:TriggerMessageRequest", 4 | "title": "TriggerMessageRequest", 5 | "type": "object", 6 | "properties": { 7 | "requestedMessage": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": [ 11 | "BootNotification", 12 | "DiagnosticsStatusNotification", 13 | "FirmwareStatusNotification", 14 | "Heartbeat", 15 | "MeterValues", 16 | "StatusNotification" 17 | ] 18 | }, 19 | "connectorId": { 20 | "type": "integer" 21 | } 22 | }, 23 | "additionalProperties": false, 24 | "required": ["requestedMessage"] 25 | } 26 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/TriggerMessageResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:TriggerMessageResponse", 4 | "title": "TriggerMessageResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Accepted", "Rejected", "NotImplemented"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/UnlockConnector.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:UnlockConnectorRequest", 4 | "title": "UnlockConnectorRequest", 5 | "type": "object", 6 | "properties": { 7 | "connectorId": { 8 | "type": "integer" 9 | } 10 | }, 11 | "additionalProperties": false, 12 | "required": ["connectorId"] 13 | } 14 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/UnlockConnectorResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:UnlockConnectorResponse", 4 | "title": "UnlockConnectorResponse", 5 | "type": "object", 6 | "properties": { 7 | "status": { 8 | "type": "string", 9 | "additionalProperties": false, 10 | "enum": ["Unlocked", "UnlockFailed", "NotSupported"] 11 | } 12 | }, 13 | "additionalProperties": false, 14 | "required": ["status"] 15 | } 16 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/UpdateFirmware.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:UpdateFirmwareRequest", 4 | "title": "UpdateFirmwareRequest", 5 | "type": "object", 6 | "properties": { 7 | "location": { 8 | "type": "string", 9 | "format": "uri" 10 | }, 11 | "retries": { 12 | "type": "integer" 13 | }, 14 | "retrieveDate": { 15 | "type": "string", 16 | "format": "date-time" 17 | }, 18 | "retryInterval": { 19 | "type": "integer" 20 | } 21 | }, 22 | "additionalProperties": false, 23 | "required": ["location", "retrieveDate"] 24 | } 25 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v1.6/json/UpdateFirmwareResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "id": "urn:OCPP:1.6:2019:12:UpdateFirmwareResponse", 4 | "title": "UpdateFirmwareResponse", 5 | "type": "object", 6 | "properties": {}, 7 | "additionalProperties": false 8 | } 9 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/ClearCacheRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:ClearCacheRequest", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/ClearedChargingLimitResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:ClearedChargingLimitResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/CostUpdatedResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:CostUpdatedResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/FirmwareStatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:FirmwareStatusNotificationResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/GetLocalListVersionRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:GetLocalListVersionRequest", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/HeartbeatRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:HeartbeatRequest", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/LogStatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:LogStatusNotificationResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/MeterValuesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:MeterValuesResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyChargingLimitResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyChargingLimitResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyCustomerInformationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyCustomerInformationResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyDisplayMessagesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyDisplayMessagesResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyEventResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyEventResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyMonitoringReportResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyMonitoringReportResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/NotifyReportResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:NotifyReportResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/ReportChargingProfilesResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:ReportChargingProfilesResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/ReservationStatusUpdateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:ReservationStatusUpdateResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/SecurityEventNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:SecurityEventNotificationResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/tests/schema_validation/schemas/v2.0.1/StatusNotificationResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "urn:OCPP:Cp:2:2020:3:StatusNotificationResponse", 4 | "comment": "OCPP 2.0.1 FINAL", 5 | "definitions": { 6 | "CustomDataType": { 7 | "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", 8 | "javaType": "CustomData", 9 | "type": "object", 10 | "properties": { 11 | "vendorId": { 12 | "type": "string", 13 | "maxLength": 255 14 | } 15 | }, 16 | "required": ["vendorId"] 17 | } 18 | }, 19 | "type": "object", 20 | "additionalProperties": false, 21 | "properties": { 22 | "customData": { 23 | "$ref": "#/definitions/CustomDataType" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/v1_6/README.md: -------------------------------------------------------------------------------- 1 | # OCPP v1.6 2 | -------------------------------------------------------------------------------- /src/v1_6/messages/authorize.rs: -------------------------------------------------------------------------------- 1 | use crate::v1_6::types::IdTagInfo; 2 | use validator::Validate; 3 | 4 | // # From OCPP Specification 5 | // 6.1. Authorize.req 6 | #[derive(serde::Serialize, serde::Deserialize, Validate, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct AuthorizeRequest { 9 | /// Required. This contains the identifier that needs to be authorized. 10 | #[validate(length(min = 1, max = 20))] 11 | pub id_tag: String, // IdToken, should maybe be a type? 12 | } 13 | 14 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 15 | #[serde(rename_all = "camelCase")] 16 | pub struct AuthorizeResponse { 17 | /// This contains the field definition of the Authorize.conf PDU sent by the Central System to the Charge Point in response to a Authorize.req PDU. See also Authorize 18 | pub id_tag_info: IdTagInfo, 19 | } 20 | -------------------------------------------------------------------------------- /src/v1_6/messages/cancel_reservation.rs: -------------------------------------------------------------------------------- 1 | use crate::v1_6::types::CancelReservationStatus; 2 | 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct CancelReservationRequest { 6 | /// Required. Id of the reservation to cancel. 7 | pub reservation_id: i32, 8 | } 9 | 10 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 11 | #[serde(rename_all = "camelCase")] 12 | pub struct CancelReservationResponse { 13 | /// Required. This indicates the success or failure of the cancelling of a reservation by Central System. 14 | pub status: CancelReservationStatus, 15 | } 16 | -------------------------------------------------------------------------------- /src/v1_6/messages/clear_cache.rs: -------------------------------------------------------------------------------- 1 | use crate::v1_6::types::ClearCacheStatus; 2 | 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | pub struct ClearCacheRequest { 5 | // This contains the field definition of the ClearCache.req PDU sent by the Central System to the Charge Point. See also Clear Cache. No fields are defined. 6 | } 7 | 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | /// This contains the field definition of the ClearCache.conf PDU sent by the Charge Point to the Central System in response to a ClearCache.req PDU. See also Clear Cache 11 | pub struct ClearCacheResponse { 12 | pub status: ClearCacheStatus, 13 | } 14 | -------------------------------------------------------------------------------- /src/v1_6/messages/diagnostics_status_notification.rs: -------------------------------------------------------------------------------- 1 | use crate::v1_6::types::DiagnosticsStatus; 2 | 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct DiagnosticsStatusNotificationRequest { 6 | pub status: DiagnosticsStatus, 7 | } 8 | 9 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 10 | #[serde(rename_all = "camelCase")] 11 | pub struct DiagnosticsStatusNotificationResponse {} 12 | -------------------------------------------------------------------------------- /src/v1_6/messages/firmware_status_notification.rs: -------------------------------------------------------------------------------- 1 | use crate::v1_6::types::FirmwareStatus; 2 | 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct FirmwareStatusNotificationRequest { 6 | pub status: FirmwareStatus, 7 | } 8 | 9 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 10 | #[serde(rename_all = "camelCase")] 11 | pub struct FirmwareStatusNotificationResponse {} 12 | -------------------------------------------------------------------------------- /src/v1_6/messages/get_local_list_version.rs: -------------------------------------------------------------------------------- 1 | /// This contains the field definition of the GetLocalListVersion.req PDU sent by the Central System to the Charge Point. See also Get Local List Version 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | #[serde(rename_all = "camelCase")] 4 | pub struct GetLocalListVersionRequest { 5 | // No fields are defined. 6 | } 7 | 8 | /// This contains the field definition of the GetDiagnostics.conf PDU sent by the Charge Point to the Central System in response to a GetDiagnosticsRequest PDU. See also Get Diagnostics 9 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 10 | #[serde(rename_all = "camelCase")] 11 | pub struct GetLocalListVersionResponse { 12 | /// Required. This contains the current version number of the local authorization list in the Charge Point. 13 | pub list_version: i32, 14 | } 15 | -------------------------------------------------------------------------------- /src/v1_6/messages/heart_beat.rs: -------------------------------------------------------------------------------- 1 | use chrono::{DateTime, Utc}; 2 | use validator::Validate; 3 | 4 | #[derive(serde::Serialize, serde::Deserialize, Validate, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct HeartbeatRequest {} 7 | 8 | #[derive(serde::Serialize, serde::Deserialize, Validate, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct HeartbeatResponse { 11 | /// # From OCPP Specification 12 | /// Required. This contains the current time of the Central System. 13 | pub current_time: DateTime, 14 | } 15 | -------------------------------------------------------------------------------- /src/v1_6/messages/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod authorize; 2 | pub mod boot_notification; 3 | pub mod cancel_reservation; 4 | pub mod change_availability; 5 | pub mod change_configuration; 6 | pub mod clear_cache; 7 | pub mod clear_charging_profile; 8 | pub mod data_transfer; 9 | pub mod diagnostics_status_notification; 10 | pub mod firmware_status_notification; 11 | pub mod get_composite_schedule; 12 | pub mod get_configuration; 13 | pub mod get_diagnostics; 14 | pub mod get_local_list_version; 15 | pub mod heart_beat; 16 | pub mod meter_values; 17 | pub mod remote_start_transaction; 18 | pub mod remote_stop_transaction; 19 | pub mod reserve_now; 20 | pub mod reset; 21 | pub mod send_local_list; 22 | pub mod set_charging_profile; 23 | pub mod start_transaction; 24 | pub mod status_notification; 25 | pub mod stop_transaction; 26 | pub mod trigger_message; 27 | pub mod unlock_connector; 28 | pub mod update_firmware; 29 | -------------------------------------------------------------------------------- /src/v1_6/mod.rs: -------------------------------------------------------------------------------- 1 | //! # Implementation of the OCPP 1.6 Specification 2 | //! 3 | //! # Supported Feature Profiles 4 | //! 5 | //! 6 | 7 | /// message types 8 | pub mod messages; 9 | 10 | /// types 11 | pub mod types; 12 | -------------------------------------------------------------------------------- /src/v1_6/types/authorization_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in a response to an AuthorizeRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum AuthorizationStatus { 4 | /// Identifier is allowed for charging. 5 | #[default] 6 | Accepted, 7 | /// Identifier has been blocked. Not allowed for charging. 8 | Blocked, 9 | /// Identifier has expired. Not allowed for charging. 10 | Expired, 11 | /// Identifier is unknown. Not allowed for charging. 12 | Invalid, 13 | /// Identifier is already involved in another transaction and multiple transactions are not allowed. (Only relevant for a StartTransaction.req.) 14 | ConcurrentTx, 15 | } 16 | -------------------------------------------------------------------------------- /src/v1_6/types/availability_status.rs: -------------------------------------------------------------------------------- 1 | /// Status returned in response to ChangeAvailabilityRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum AvailabilityStatus { 4 | /// Request has been accepted and will be executed. 5 | #[default] 6 | Accepted, 7 | /// Request has not been accepted and will not be executed. 8 | Rejected, 9 | /// Request has been accepted and will be executed when transaction(s) in progress have finished. 10 | Scheduled, 11 | } 12 | -------------------------------------------------------------------------------- /src/v1_6/types/availability_type.rs: -------------------------------------------------------------------------------- 1 | /// Requested availability change in ChangeAvailabilityRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum AvailabilityType { 4 | /// Charge point is not available for charging. 5 | Inoperative, 6 | /// Charge point is available for charging. 7 | #[default] 8 | Operative, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/cancel_reservation_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in CancelReservationResponse 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum CancelReservationStatus { 4 | /// Reservation for the identifier has been cancelled. 5 | #[default] 6 | Accepted, 7 | /// Reservation could not be cancelled, because there is no reservation active for the identifier. 8 | Rejected, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/charging_profile_kind_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ChargingProfileKindType { 3 | /// Schedule periods are relative to a fixed point in time defined in the schedule. 4 | #[default] 5 | Absolute, 6 | /// The schedule restarts periodically at the first schedule period. 7 | Recurring, 8 | /// Schedule periods are relative to a situation-specific start point (such as the start of a Transaction) that is determined by the charge point. 9 | Relative, 10 | } 11 | -------------------------------------------------------------------------------- /src/v1_6/types/charging_profile_status.rs: -------------------------------------------------------------------------------- 1 | /// Status returned in response to SetChargingProfileRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ChargingProfileStatus { 4 | /// Request has been accepted and will be executed. 5 | #[default] 6 | Accepted, 7 | /// Request has not been accepted and will not be executed. 8 | Rejected, 9 | /// Charge Point indicates that the request is not supported. 10 | NotSupported, 11 | } 12 | -------------------------------------------------------------------------------- /src/v1_6/types/clear_cache_status.rs: -------------------------------------------------------------------------------- 1 | /// Status returned in response to ClearCacheRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ClearCacheStatus { 4 | /// Command has been executed. 5 | #[default] 6 | Accepted, 7 | /// Command has not been executed. 8 | Rejected, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/clear_charging_profile_status.rs: -------------------------------------------------------------------------------- 1 | /// Status returned in response to ClearChargingProfileRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ClearChargingProfileStatus { 4 | /// Request has been accepted and will be executed. 5 | #[default] 6 | Accepted, 7 | /// No Charging Profile(s) were found matching the request. 8 | Unknown, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/configuration_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ConfigurationStatus { 3 | /// # From OCPP Specification 4 | /// Configuration key is supported and setting has been changed. 5 | #[default] 6 | Accepted, 7 | 8 | /// # From OCPP Specification 9 | /// Configuration key is supported, but setting could not be changed. 10 | Rejected, 11 | 12 | /// # From OCPP Specification 13 | /// Configuration key is supported and setting has been changed, but change will be available after reboot (Charge Point will not reboot itself) 14 | RebootRequired, 15 | 16 | /// # From OCPP Specification 17 | /// Configuration key is not supported. 18 | NotSupported, 19 | } 20 | -------------------------------------------------------------------------------- /src/v1_6/types/data_transfer_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in DataTransferRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum DataTransferStatus { 4 | /// Message has been accepted and the contained request is accepted. 5 | #[default] 6 | Accepted, 7 | /// Message has been accepted but the contained request is rejected. 8 | Rejected, 9 | /// Message could not be interpreted due to unknown messageId string. 10 | UnknownMessageId, 11 | /// Message could not be interpreted due to unknown vendorId string. 12 | UnknownVendorId, 13 | } 14 | -------------------------------------------------------------------------------- /src/v1_6/types/diagnostics_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in DiagnosticsStatusNotificationRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum DiagnosticsStatus { 4 | /// Charge Point is not performing diagnostics related tasks. Status Idle SHALL only be used as in a DiagnosticsStatusNotification.req that was triggered by a TriggerMessage.req 5 | #[default] 6 | Idle, 7 | /// Diagnostics information has been uploaded. 8 | Uploaded, 9 | /// Uploading of diagnostics failed. 10 | UploadFailed, 11 | /// File is being uploaded. 12 | Uploading, 13 | } 14 | -------------------------------------------------------------------------------- /src/v1_6/types/firmware_status.rs: -------------------------------------------------------------------------------- 1 | /// Status of a firmware download as reported in FirmwareStatusNotificationRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum FirmwareStatus { 4 | /// New firmware has been downloaded by Charge Point. 5 | Downloaded, 6 | /// Charge point failed to download firmware. 7 | DownloadFailed, 8 | /// Firmware is being downloaded. 9 | Downloading, 10 | /// Charge Point is not performing firmware update related tasks. Status Idle SHALL only be used as in a FirmwareStatusNotificationRequest that was triggered by a TriggerMessageRequest 11 | #[default] 12 | Idle, 13 | /// Installation of new firmware has failed. 14 | InstallationFailed, 15 | /// Firmware is being installed. 16 | Installing, 17 | /// New firmware has successfully been installed in charge point. 18 | Installed, 19 | } 20 | -------------------------------------------------------------------------------- /src/v1_6/types/get_composite_schedule_status.rs: -------------------------------------------------------------------------------- 1 | /// Status returned in response to GetCompositeScheduleRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum GetCompositeScheduleStatus { 4 | /// Request has been accepted and will be executed. 5 | #[default] 6 | Accepted, 7 | /// Request has not been accepted and will not be executed. 8 | Rejected, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/key_value.rs: -------------------------------------------------------------------------------- 1 | /// Contains information about a specific configuration key. It is returned in GetConfigurationResponse 2 | use validator::Validate; 3 | 4 | #[derive(serde::Serialize, serde::Deserialize, Validate, Debug, Clone, PartialEq, Default)] 5 | pub struct KeyValue { 6 | /// Required. 7 | #[validate(length(min = 1, max = 50))] 8 | pub key: String, 9 | /// Required. False if the value can be set with the ChangeConfiguration message. 10 | pub readonly: bool, 11 | /// Optional. If key is known but not set, this field may be absent. 12 | #[validate(length(min = 1, max = 500))] 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub value: Option, 15 | } 16 | -------------------------------------------------------------------------------- /src/v1_6/types/location.rs: -------------------------------------------------------------------------------- 1 | /// Allowable values of the optional "location" field of a value element in SampledValue. 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum Location { 4 | /// Measurement inside body of Charge Point (e.g. Temperature) 5 | Body, 6 | ///Measurement taken from cable between EV and Charge Point 7 | Cable, 8 | ///Measurement taken by EV 9 | #[serde(rename = "EV")] 10 | Ev, 11 | ///Measurement at network (“grid”) inlet connection 12 | Inlet, 13 | ///Measurement at a Connector. Default value 14 | #[default] 15 | Outlet, 16 | } 17 | -------------------------------------------------------------------------------- /src/v1_6/types/message_trigger.rs: -------------------------------------------------------------------------------- 1 | /// Type of request to be triggered in a TriggerMessageRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum MessageTrigger { 4 | /// To trigger a BootNotification request 5 | BootNotification, 6 | ///To trigger a DiagnosticsStatusNotification request 7 | DiagnosticsStatusNotification, 8 | /// To trigger a FirmwareStatusNotification request 9 | FirmwareStatusNotification, 10 | /// To trigger a Heartbeat request 11 | #[default] 12 | Heartbeat, 13 | /// To trigger a MeterValues request 14 | MeterValues, 15 | /// To trigger a StatusNotification request 16 | StatusNotification, 17 | } 18 | -------------------------------------------------------------------------------- /src/v1_6/types/meter_value.rs: -------------------------------------------------------------------------------- 1 | use chrono::DateTime; 2 | use chrono::Utc; 3 | 4 | use super::SampledValue; 5 | 6 | /// Collection of one or more sampled values in MeterValues.req and StopTransaction.req. All sampled values in a MeterValue are sampled at the same point in time. 7 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct MeterValue { 10 | /// Required. Timestamp for measured value(s). 11 | pub timestamp: DateTime, 12 | /// Required. One or more measured values 13 | pub sampled_value: Vec, 14 | } 15 | -------------------------------------------------------------------------------- /src/v1_6/types/phase.rs: -------------------------------------------------------------------------------- 1 | /// Phase as used in SampledValue. Phase specifies how a measured value is to be interpreted. Please note that not all values of Phase are applicable to all Measurands. 2 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 3 | pub enum Phase { 4 | #[default] 5 | L1, 6 | L2, 7 | L3, 8 | N, 9 | #[serde(rename = "L1-N")] 10 | L1N, 11 | #[serde(rename = "L2-N")] 12 | L2N, 13 | #[serde(rename = "L3-N")] 14 | L3N, 15 | #[serde(rename = "L1-L2")] 16 | L1L2, 17 | #[serde(rename = "L2-L3")] 18 | L2L3, 19 | #[serde(rename = "L3-L1")] 20 | L3L1, 21 | } 22 | -------------------------------------------------------------------------------- /src/v1_6/types/recurrency_kind_type.rs: -------------------------------------------------------------------------------- 1 | /// Type of recurrence of a charging profile, as used in ChargingProfile. 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum RecurrencyKindType { 4 | /// The schedule restarts every 24 hours, at the same time as in the startSchedule. 5 | #[default] 6 | Daily, 7 | /// The schedule restarts every 7 days, at the same time and day-of-the-week as in the startSchedule. 8 | Weekly, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/registration_status.rs: -------------------------------------------------------------------------------- 1 | /// # From OCPP Specification 2 | /// Result of registration in response to BootNotification.req. 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | pub enum RegistrationStatus { 5 | /// # From OCPP Specification 6 | /// Charge point is accepted by Central System. 7 | #[default] 8 | Accepted, 9 | /// # From OCPP Specification 10 | /// Central System is not yet ready to accept the Charge Point. Central System may send 11 | /// messages to retrieve information or prepare the Charge Point. 12 | Pending, 13 | /// # From OCPP Specification 14 | /// Charge point is not accepted by Central System. This may happen when the Charge Point id is 15 | /// not known by Central System. 16 | Rejected, 17 | } 18 | -------------------------------------------------------------------------------- /src/v1_6/types/remote_start_stop_status.rs: -------------------------------------------------------------------------------- 1 | /// The result of a RemoteStartTransaction.req or RemoteStopTransaction.req request. 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum RemoteStartStopStatus { 4 | /// Command will be executed. 5 | #[default] 6 | Accepted, 7 | /// Command will not be executed. 8 | Rejected, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/reservation_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in ReserveNowResponse 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ReservationStatus { 4 | /// Reservation has been made. 5 | #[default] 6 | Accepted, 7 | /// Reservation has not been made, because connectors or specified connector are in a faulted state. 8 | Faulted, 9 | /// Reservation has not been made. All connectors or the specified connector are occupied. 10 | Occupied, 11 | /// Reservation has not been made. Charge Point is not configured to accept reservations. 12 | Rejected, 13 | /// Reservation has not been made, because connectors or specified connector are in an unavailable state. 14 | Unavailable, 15 | } 16 | -------------------------------------------------------------------------------- /src/v1_6/types/reset_status.rs: -------------------------------------------------------------------------------- 1 | /// Result of ResetRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ResetRequestStatus { 4 | /// Command will be executed. 5 | Hard, 6 | /// Command will not be executed. 7 | #[default] 8 | Soft, 9 | } 10 | 11 | /// Result of ResetResponse 12 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 13 | pub enum ResetResponseStatus { 14 | /// Command will be executed. 15 | #[default] 16 | Accepted, 17 | /// Command will not be executed. 18 | Rejected, 19 | } 20 | -------------------------------------------------------------------------------- /src/v1_6/types/reset_type.rs: -------------------------------------------------------------------------------- 1 | /// Type of reset requested by ResetRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ResetType { 4 | /// Restart (all) the hardware, the Charge Point is not required to gracefully stop ongoing transaction. If possible the Charge Point sends a StopTransaction.req for previously ongoing transactions after having restarted and having been accepted by the Central System via a BootNotification.conf. This is a last resort solution for a not correctly functioning Charge Point, by sending a "hard" reset, (queued) information might get lost. 5 | Hard, 6 | /// Stop ongoing transactions gracefully and sending StopTransaction.req for every ongoing transaction. It should then restart the application software (if possible, otherwise restart the processor/controller). 7 | #[default] 8 | Soft, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/trigger_message_status.rs: -------------------------------------------------------------------------------- 1 | /// Status in TriggerMessageResponse 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum TriggerMessageStatus { 4 | /// Requested notification will be sent. 5 | #[default] 6 | Accepted, 7 | /// Requested notification will not be sent. 8 | Rejected, 9 | /// Requested notification cannot be sent because it is either not implemented or unknown. 10 | NotImplemented, 11 | } 12 | -------------------------------------------------------------------------------- /src/v1_6/types/unlock_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UnlockStatus { 3 | /// # From OCPP Specification 4 | /// Connector has successfully been unlocked. 5 | #[default] 6 | Unlocked, 7 | /// # From OCPP Specification 8 | /// Failed to unlock the connector: The Charge Point has tried to unlock the connector and has 9 | /// detected that the connector is still locked or the unlock mechanism failed. 10 | UnlockFailed, 11 | /// # From OCPP Specification 12 | /// Charge Point has no connector lock, or ConnectorId is unknown. 13 | NotSupported, 14 | } 15 | -------------------------------------------------------------------------------- /src/v1_6/types/update_status.rs: -------------------------------------------------------------------------------- 1 | /// Type of update for a SendLocalListRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum UpdateStatus { 4 | /// Local Authorization List successfully updated. 5 | #[default] 6 | Accepted, 7 | /// Failed to update the Local Authorization List. 8 | Failed, 9 | /// Update of Local Authorization List is not supported by Charge Point. 10 | NotSupported, 11 | /// Version number in the request for a differential update is less or equal then version number of current list. 12 | VersionMismatch, 13 | } 14 | -------------------------------------------------------------------------------- /src/v1_6/types/update_type.rs: -------------------------------------------------------------------------------- 1 | /// Type of update for a SendLocalListRequest 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum UpdateType { 4 | /// Indicates that the current Local Authorization List must be updated with the values in this message. 5 | Differential, 6 | /// Indicates that the current Local Authorization List must be replaced by the values in this message. 7 | #[default] 8 | Full, 9 | } 10 | -------------------------------------------------------------------------------- /src/v1_6/types/value_format.rs: -------------------------------------------------------------------------------- 1 | /// Format that specifies how the value element in SampledValue is to be interpreted. 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | pub enum ValueFormat { 4 | /// Data is to be interpreted as integer/decimal numeric data. 5 | #[default] 6 | Raw, 7 | /// Data is represented as a signed binary data block, encoded as hex data. 8 | SignedData, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/README.md: -------------------------------------------------------------------------------- 1 | # OCPP v2.0.1 2 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/ac_charging_parameters_type.rs: -------------------------------------------------------------------------------- 1 | //! EV AC charging parameters 2 | 3 | /// EV AC charging parameters 4 | /// 5 | /// ACChargingParametersType is used by: [ChargingNeedsType](`crate::v2_0_1::datatypes::charging_needs_type::ChargingNeedsType`) 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct ACChargingParametersType { 9 | /// Amount of energy requested (in Wh). This includes energy required for preconditioning. 10 | pub energy_amount: i32, 11 | /// Minimum current (amps) supported by theelectric vehicle (per phase). 12 | pub ev_min_current: i32, 13 | /// Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity. 14 | pub ev_max_current: i32, 15 | /// Maximum voltage supported by the electric vehicle 16 | pub ev_max_voltage: i32, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/certificate_hash_data_chain_type.rs: -------------------------------------------------------------------------------- 1 | use super::certificate_hash_data_type::CertificateHashDataType; 2 | use crate::v2_0_1::enumerations::get_certificate_id_use_enum_type::GetCertificateIdUseEnumType; 3 | 4 | /// CertificateHashDataChainType is used by: GetInstalledCertificateIdsResponse 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct CertificateHashDataChainType { 8 | /// Required. Indicates the type of the requested certificate(s). 9 | pub certificate_type: GetCertificateIdUseEnumType, 10 | /// Required. Information to identify a certificate 11 | pub certificate_hash_data: CertificateHashDataType, 12 | /// Optional. Information to identify the child certificate(s). 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub child_certificate_hash_data: Option>, 15 | } 16 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/charging_limit_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::charging_limit_source_enum_type::ChargingLimitSourceEnumType; 2 | 3 | /// ChargingLimitType is used by: NotifyChargingLimitRequest 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct ChargingLimitType { 7 | /// Required. Represents the source of the charging limit. 8 | pub charging_limit_source: ChargingLimitSourceEnumType, 9 | /// Optional. Indicates whether the charging limit is critical for the grid. 10 | #[serde(skip_serializing_if = "Option::is_none")] 11 | pub is_grid_critical: Option, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/clear_monitoring_result_type.rs: -------------------------------------------------------------------------------- 1 | use super::status_info_type::StatusInfoType; 2 | use crate::v2_0_1::enumerations::clear_monitoring_status_enum_type::ClearMonitoringStatusEnumType; 3 | 4 | /// ClearMonitoringResultType is used by: ClearVariableMonitoringResponse 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct ClearMonitoringResultType { 8 | /// Required. Result of the clear request for this monitor, identified by its Id. 9 | pub status: ClearMonitoringStatusEnumType, 10 | /// Required. Id of the monitor of which a clear was requested. 11 | pub id: i32, 12 | /// Optional. Detailed status information. 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub status_info: Option, 15 | } 16 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/component_variable_type.rs: -------------------------------------------------------------------------------- 1 | //! Struct to report components, variables and variable attributes and characteristics. 2 | use super::component_type::ComponentType; 3 | use super::variable_type::VariableType; 4 | 5 | /// ComponentVariableType is used by: 6 | /// [GetMonitoringReportRequest](`crate::v2_0_1::messages::get_monitoring_report::GetMonitoringReportRequest`) 7 | /// [GetReportRequest](`crate::v2_0_1::messages::get_report::GetReportRequest`) 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct ComponentVariableType { 11 | /// Required. Component for which a report of Variable is requested. 12 | pub component: ComponentType, 13 | /// Optional. Variable(s) for which the report is requested. 14 | #[serde(skip_serializing_if = "Option::is_none")] 15 | pub variable: Option, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/composite_schedule_type.rs: -------------------------------------------------------------------------------- 1 | use chrono::DateTime; 2 | use chrono::Utc; 3 | 4 | use super::charging_schedule_period_type::ChargingSchedulePeriodType; 5 | use crate::v2_0_1::enumerations::charging_rate_unit_enum_type::ChargingRateUnitEnumType; 6 | 7 | /// CompositeScheduleType is used by: GetCompositeScheduleResponse 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct CompositeScheduleType { 11 | pub evse_id: i32, 12 | pub duration: i32, 13 | pub schedule_start: DateTime, 14 | pub charging_rate_unit: ChargingRateUnitEnumType, 15 | pub charging_schedule_period: Vec, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/consumption_cost_type.rs: -------------------------------------------------------------------------------- 1 | use super::cost_type::CostType; 2 | 3 | /// ConsumptionCostType is used by: Common:SalesTariffEntryType 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct ConsumptionCostType { 7 | pub start_value: i32, 8 | pub cost: Vec, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/cost_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::cost_kind_enum_type::CostKindEnumType; 2 | 3 | /// CostType is used by: Common:ConsumptionCostType 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct CostType { 7 | pub cost_kind: CostKindEnumType, 8 | pub amount: i32, 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub amount_multiplier: Option, 11 | } 12 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/evse_type.rs: -------------------------------------------------------------------------------- 1 | /// Electric Vehicle Supply Equipment 2 | /// EVSEType is used by: Common:ComponentType , TriggerMessageRequest , ChangeAvailabilityRequest , TransactionEventRequest 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct EVSEType { 6 | pub id: i32, 7 | #[serde(skip_serializing_if = "Option::is_none")] 8 | pub connector_id: Option, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/firmware_type.rs: -------------------------------------------------------------------------------- 1 | use chrono::DateTime; 2 | use chrono::Utc; 3 | 4 | /// Represents a copy of the firmware that can be loaded/updated on the Charging Station. 5 | /// FirmwareType is used by: UpdateFirmwareRequest 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct FirmwareType { 9 | pub location: String, 10 | pub retrieve_date_time: DateTime, 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub install_date_time: Option>, 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub signing_certificate: Option, 15 | #[serde(skip_serializing_if = "Option::is_none")] 16 | pub signature: Option, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/get_variable_data_type.rs: -------------------------------------------------------------------------------- 1 | use super::component_type::ComponentType; 2 | use super::variable_type::VariableType; 3 | use crate::v2_0_1::enumerations::attribute_enum_type::AttributeEnumType; 4 | 5 | /// Class to hold parameters for GetVariables request. 6 | /// GetVariableDataType is used by: GetVariablesRequest 7 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct GetVariableDataType { 10 | #[serde(skip_serializing_if = "Option::is_none")] 11 | pub attribute_type: Option, 12 | pub component: ComponentType, 13 | pub variable: VariableType, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/id_token_type.rs: -------------------------------------------------------------------------------- 1 | use super::additional_info_type::AdditionalInfoType; 2 | use crate::v2_0_1::enumerations::id_token_enum_type::IdTokenEnumType; 3 | 4 | /// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. 5 | /// IdTokenType is used by: Common:AuthorizationData , Common:IdTokenInfoType , RequestStartTransactionRequest, AuthorizeRequest , TransactionEventRequest , ReserveNowRequest , CustomerInformationRequest 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct IdTokenType { 9 | pub id_token: String, 10 | #[serde(rename = "type")] 11 | pub kind: IdTokenEnumType, 12 | #[serde(skip_serializing_if = "Option::is_none")] 13 | pub additional_info: Option>, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/log_parameters_type.rs: -------------------------------------------------------------------------------- 1 | use chrono::DateTime; 2 | use chrono::Utc; 3 | 4 | /// Generic class for the configuration of logging entries. 5 | /// LogParametersType is used by: GetLogRequest 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct LogParametersType { 9 | pub remote_location: String, 10 | #[serde(skip_serializing_if = "Option::is_none")] 11 | pub oldest_timestamp: Option>, 12 | #[serde(skip_serializing_if = "Option::is_none")] 13 | pub latest_timestamp: Option>, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/message_content_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::message_format_enum_type::MessageFormatEnumType; 2 | 3 | /// Contains message details, for a message to be displayed on a Charging Station. 4 | /// MessageContentType is used by: Common:IdTokenInfoType , Common:MessageInfoType , TransactionEventResponse 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct MessageContentType { 8 | pub format: MessageFormatEnumType, 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub language: Option, 11 | pub content: String, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/meter_value_type.rs: -------------------------------------------------------------------------------- 1 | use chrono::DateTime; 2 | use chrono::Utc; 3 | 4 | use super::sampled_value_type::SampledValueType; 5 | 6 | /// Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time. 7 | /// MeterValueType is used by: MeterValuesRequest , TransactionEventRequest 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct MeterValueType { 11 | pub timestamp: DateTime, 12 | pub sampled_value: Vec, 13 | } 14 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/modem_type.rs: -------------------------------------------------------------------------------- 1 | /// Defines parameters required for initiating and maintaining wireless communication with other devices. 2 | /// ModemType is used by: BootNotificationRequest.ChargingStationType 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct ModemType { 6 | #[serde(skip_serializing_if = "Option::is_none")] 7 | pub iccid: Option, 8 | #[serde(skip_serializing_if = "Option::is_none")] 9 | pub imsi: Option, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/monitoring_data_type.rs: -------------------------------------------------------------------------------- 1 | use super::component_type::ComponentType; 2 | use super::variable_monitoring_type::VariableMonitoringType; 3 | use super::variable_type::VariableType; 4 | 5 | /// Class to hold parameters of SetVariableMonitoring request. 6 | /// MonitoringDataType is used by: NotifyMonitoringReportRequest 7 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct MonitoringDataType { 10 | pub component: ComponentType, 11 | pub variable: VariableType, 12 | pub variable_monitoring: Vec, 13 | } 14 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/ocsp_request_data_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::hash_algorithm_enum_type::HashAlgorithmEnumType; 2 | use validator::Validate; 3 | 4 | /// OCSPRequestDataType is used by: AuthorizeRequest , GetCertificateStatusRequest 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Validate, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct OCSPRequestDataType { 8 | pub hash_algorithm: HashAlgorithmEnumType, 9 | #[validate(length(min = 0, max = 128))] 10 | pub issuer_name_hash: String, 11 | #[validate(length(min = 0, max = 128))] 12 | pub issuer_key_hash: String, 13 | #[validate(length(min = 0, max = 40))] 14 | pub serial_number: String, 15 | #[validate(length(min = 0, max = 512))] 16 | #[serde(rename = "responderURL")] 17 | pub responder_url: String, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/relative_time_interval_type.rs: -------------------------------------------------------------------------------- 1 | /// RelativeTimeIntervalType is used by: Common:SalesTariffEntryType 2 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 3 | #[serde(rename_all = "camelCase")] 4 | pub struct RelativeTimeIntervalType { 5 | pub start: i32, 6 | pub duration: i32, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/report_data_type.rs: -------------------------------------------------------------------------------- 1 | use super::component_type::ComponentType; 2 | use super::variable_attribute_type::VariableAttributeType; 3 | use super::variable_characteristics_type::VariableCharacteristicsType; 4 | use super::variable_type::VariableType; 5 | 6 | /// Class to report components, variables and variable attributes and characteristics. 7 | /// ReportDataType is used by: NotifyReportRequest 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct ReportDataType { 11 | pub component: ComponentType, 12 | pub variable: VariableType, 13 | pub variable_attribute: Vec, 14 | #[serde(skip_serializing_if = "Option::is_none")] 15 | pub variable_characteristics: Option, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/sales_tariff_entry_type.rs: -------------------------------------------------------------------------------- 1 | use super::consumption_cost_type::ConsumptionCostType; 2 | use super::relative_time_interval_type::RelativeTimeIntervalType; 3 | 4 | /// SalesTariffEntryType is used by: Common:SalesTariffType 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct SalesTariffEntryType { 8 | #[serde(skip_serializing_if = "Option::is_none")] 9 | pub e_price_level: Option, 10 | pub relative_time_interval: RelativeTimeIntervalType, 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub consumption_cost: Option>, 13 | } 14 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/sales_tariff_type.rs: -------------------------------------------------------------------------------- 1 | use super::sales_tariff_entry_type::SalesTariffEntryType; 2 | use validator::Validate; 3 | 4 | /// This dataType is based on dataTypes from ISO 15118-2. 5 | /// SalesTariffType is used by: Common:ChargingScheduleType 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Validate, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct SalesTariffType { 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub id: Option, 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub sales_tariff_description: Option, 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub num_e_price_levels: Option, 15 | #[validate(length(min = 1, max = 1024))] 16 | pub sales_tariff_entry: Vec, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/set_variable_data_type.rs: -------------------------------------------------------------------------------- 1 | use super::component_type::ComponentType; 2 | use super::variable_type::VariableType; 3 | use crate::v2_0_1::enumerations::attribute_enum_type::AttributeEnumType; 4 | 5 | /// SetVariableDataType is used by: SetVariablesRequest 6 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 7 | #[serde(rename_all = "camelCase")] 8 | pub struct SetVariableDataType { 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub attribute_type: Option, 11 | pub attribute_value: String, 12 | pub component: ComponentType, 13 | pub variable: VariableType, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/set_variable_result_type.rs: -------------------------------------------------------------------------------- 1 | use super::component_type::ComponentType; 2 | use super::status_info_type::StatusInfoType; 3 | use super::variable_type::VariableType; 4 | use crate::v2_0_1::enumerations::attribute_enum_type::AttributeEnumType; 5 | use crate::v2_0_1::enumerations::set_variable_status_enum_type::SetVariableStatusEnumType; 6 | 7 | /// SetVariableResultType is used by: SetVariablesResponse 8 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 9 | #[serde(rename_all = "camelCase")] 10 | pub struct SetVariableResultType { 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub attribute_type: Option, 13 | pub attribute_status: SetVariableStatusEnumType, 14 | pub component: ComponentType, 15 | pub variable: VariableType, 16 | #[serde(skip_serializing_if = "Option::is_none")] 17 | pub attribute_status_info: Option, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/signed_meter_value_type.rs: -------------------------------------------------------------------------------- 1 | /// Represent a signed version of the meter value. 2 | /// SignedMeterValueType is used by: Common:SampledValueType 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct SignedMeterValueType { 6 | pub signed_meter_data: String, 7 | pub signing_method: String, 8 | pub encoding_method: String, 9 | pub public_key: String, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/transaction_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::charging_state_enum_type::ChargingStateEnumType; 2 | use crate::v2_0_1::enumerations::reason_enum_type::ReasonEnumType; 3 | 4 | /// TransactionType is used by: TransactionEventRequest 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct TransactionType { 8 | pub transaction_id: String, 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub charging_state: Option, 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub time_spent_charging: Option, 13 | #[serde(skip_serializing_if = "Option::is_none")] 14 | pub stopped_reason: Option, 15 | #[serde(skip_serializing_if = "Option::is_none")] 16 | pub remote_start_id: Option, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/unit_of_measure_type.rs: -------------------------------------------------------------------------------- 1 | /// Represents a UnitOfMeasure with a multiplier 2 | /// UnitOfMeasureType is used by: Common:SampledValueType 3 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct UnitOfMeasureType { 6 | #[serde(skip_serializing_if = "Option::is_none")] 7 | pub unit: Option, 8 | #[serde(skip_serializing_if = "Option::is_none")] 9 | pub multiplier: Option, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/variable_monitoring_type.rs: -------------------------------------------------------------------------------- 1 | use rust_decimal::Decimal; 2 | 3 | use crate::v2_0_1::enumerations::monitor_enum_type::MonitorEnumType; 4 | 5 | /// A monitoring setting for a variable. 6 | /// VariableMonitoringType is used by: NotifyMonitoringReportRequest.MonitoringDataType 7 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct VariableMonitoringType { 10 | pub id: i32, 11 | pub transaction: bool, 12 | #[serde(with = "rust_decimal::serde::arbitrary_precision")] 13 | pub value: Decimal, 14 | #[serde(rename = "type")] 15 | pub kind: MonitorEnumType, 16 | pub severity: u8, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/datatypes/vpn_type.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::vpn_enum_type::VPNEnumType; 2 | 3 | /// VPN Configuration settings 4 | /// VPNType is used by: SetNetworkProfileRequest.NetworkConnectionProfileType 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct VPNType { 8 | pub server: String, 9 | pub user: String, 10 | #[serde(skip_serializing_if = "Option::is_none")] 11 | pub group: Option, 12 | pub password: String, 13 | pub key: String, 14 | #[serde(rename = "type")] 15 | pub kind: VPNEnumType, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/apn_authentication_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum APNAuthenticationEnumType { 3 | CHAP, 4 | NONE, 5 | PAP, 6 | #[default] 7 | AUTO, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/attribute_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum AttributeEnumType { 3 | #[default] 4 | Actual, 5 | Target, 6 | MinSet, 7 | MaxSet, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/authorization_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum AuthorizationStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Blocked, 6 | ConcurrentTx, 7 | Expired, 8 | Invalid, 9 | NoCredit, 10 | NotAllowedTypeEVSE, 11 | NotAtThisLocation, 12 | NotAtThisTime, 13 | Unknown, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/authorize_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum AuthorizeCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | SignatureError, 6 | CertificateExpired, 7 | NoCertificateAvailable, 8 | CertChainError, 9 | CertificateRevoked, 10 | ContractCancelled, 11 | } 12 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/boot_reason_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum BootReasonEnumType { 3 | ApplicationReset, 4 | FirmwareUpdate, 5 | LocalReset, 6 | #[default] 7 | PowerUp, 8 | RemoteReset, 9 | ScheduledReset, 10 | Triggered, 11 | Unknown, 12 | Watchdog, 13 | } 14 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/cancel_reservation_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum CancelReservationStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/certificate_action_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum CertificateActionEnumType { 3 | #[default] 4 | Install, 5 | Update, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/certificate_signed_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum CertificateSignedStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/certificate_signing_use_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum CertificateSigningUseEnumType { 3 | #[default] 4 | ChargingStationCertificate, 5 | V2GCertificate, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/change_availability_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChangeAvailabilityStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Scheduled, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_limit_source_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingLimitSourceEnumType { 3 | EMS, 4 | #[default] 5 | Other, 6 | SO, 7 | CSO, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_profile_kind_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingProfileKindEnumType { 3 | #[default] 4 | Absolute, 5 | Recurring, 6 | Relative, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_profile_purpose_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingProfilePurposeEnumType { 3 | ChargingStationExternalConstraints, 4 | ChargingStationMaxProfile, 5 | #[default] 6 | TxDefaultProfile, 7 | TxProfile, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_profile_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingProfileStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_rate_unit_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingRateUnitEnumType { 3 | W, 4 | #[default] 5 | A, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/charging_state_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ChargingStateEnumType { 3 | Charging, 4 | EVConnected, 5 | SuspendedEV, 6 | SuspendedEVSE, 7 | #[default] 8 | Idle, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/clear_cache_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ClearCacheStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/clear_charging_profile_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ClearChargingProfileStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Unknown, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/clear_message_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ClearMessageStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Unknown, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/clear_monitoring_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ClearMonitoringStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | NotFound, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/component_criterion_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ComponentCriterionEnumType { 3 | Active, 4 | #[default] 5 | Available, 6 | Enabled, 7 | Problem, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/connector_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 2 | pub enum ConnectorStatusEnumType { 3 | #[default] 4 | Available, 5 | Occupied, 6 | Reserved, 7 | Unavailable, 8 | Faulted, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/cost_kind_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum CostKindEnumType { 3 | #[default] 4 | CarbonDioxideEmission, 5 | RelativePricePercentage, 6 | RenewableGenerationPercentage, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/customer_information_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum CustomerInformationStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Invalid, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/data_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum DataEnumType { 3 | #[default] 4 | #[serde(rename = "string")] 5 | String, 6 | #[serde(rename = "decimal")] 7 | Decimal, 8 | #[serde(rename = "integer")] 9 | Integer, 10 | #[serde(rename = "dateTime")] 11 | Datetime, 12 | #[serde(rename = "boolean")] 13 | Boolean, 14 | OptionList, 15 | SequenceList, 16 | MemberList, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/data_transfer_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum DataTransferStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | UnknownMessageId, 7 | UnknownVendorId, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/delete_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum DeleteCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Failed, 6 | NotFound, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/display_message_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum DisplayMessageStatusEnumType { 3 | #[default] 4 | Accepted, 5 | NotSupportedMessageFormat, 6 | Rejected, 7 | NotSupportedPriority, 8 | NotSupportedState, 9 | UnknownTransaction, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/energy_transfer_mode_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, PartialEq, Debug, Clone, Default)] 2 | pub enum EnergyTransferModeEnumType { 3 | DC, 4 | #[serde(rename = "AC_single_phase")] 5 | #[default] 6 | ACSinglePhase, 7 | #[serde(rename = "AC_two_phase")] 8 | ACTwoPhase, 9 | #[serde(rename = "AC_three_phase")] 10 | ACThreePhase, 11 | } 12 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/event_notification_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum EventNotificationEnumType { 3 | #[default] 4 | HardWiredNotification, 5 | HardWiredMonitor, 6 | PreconfiguredMonitor, 7 | CustomMonitor, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/event_trigger_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum EventTriggerEnumType { 3 | #[default] 4 | Alerting, 5 | Delta, 6 | Periodic, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/firmware_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum FirmwareStatusEnumType { 3 | Downloaded, 4 | DownloadFailed, 5 | Downloading, 6 | DownloadScheduled, 7 | DownloadPaused, 8 | #[default] 9 | Idle, 10 | InstallationFailed, 11 | Installing, 12 | Installed, 13 | InstallRebooting, 14 | InstallScheduled, 15 | InstallVerificationFailed, 16 | InvalidSignature, 17 | SignatureVerified, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/generic_device_model_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GenericDeviceModelStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | NotSupported, 7 | EmptyResultSet, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/generic_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GenericStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_certificate_id_use_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetCertificateIdUseEnumType { 3 | V2GRootCertificate, 4 | MORootCertificate, 5 | #[default] 6 | CSMSRootCertificate, 7 | V2GCertificateChain, 8 | ManufacturerRootCertificate, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Failed, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_charging_profile_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetChargingProfileStatusEnumType { 3 | #[default] 4 | Accepted, 5 | NoProfiles, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_display_messages_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetDisplayMessagesStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Unknown, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_installed_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Default, PartialEq)] 2 | pub enum GetInstalledCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | NotFound, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/get_variable_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetVariableStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | UnknownComponent, 7 | UnknownVariable, 8 | NotSupportedAttributeType, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/hash_algorithm_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum HashAlgorithmEnumType { 3 | #[default] 4 | SHA256, 5 | SHA384, 6 | SHA512, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/id_token_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum IdTokenEnumType { 3 | #[default] 4 | Central, 5 | #[serde(rename = "eMAID")] 6 | EMAID, 7 | ISO14443, 8 | ISO15693, 9 | KeyCode, 10 | Local, 11 | MacAddress, 12 | NoAuthorization, 13 | } 14 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/install_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum InstallCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Failed, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/install_certificate_use_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum InstallCertificateUseEnumType { 3 | V2GRootCertificate, 4 | MORootCertificate, 5 | #[default] 6 | CSMSRootCertificate, 7 | ManufacturerRootCertificate, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/iso15118ev_certificate_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum Iso15118EVCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Failed, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/location_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LocationEnumType { 3 | Body, 4 | Cable, 5 | EV, 6 | Inlet, 7 | #[default] 8 | Outlet, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/log_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LogEnumType { 3 | #[default] 4 | DiagnosticsLog, 5 | SecurityLog, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/log_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LogStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | AcceptedCanceled, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/message_format_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessageFormatEnumType { 3 | ASCII, 4 | HTML, 5 | URI, 6 | #[default] 7 | UTF8, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/message_priority_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessagePriorityEnumType { 3 | AlwaysFront, 4 | InFront, 5 | #[default] 6 | NormalCycle, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/message_state_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessageStateEnumType { 3 | Charging, 4 | Faulted, 5 | #[default] 6 | Idle, 7 | Unavailable, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/message_trigger_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessageTriggerEnumType { 3 | BootNotification, 4 | LogStatusNotification, 5 | FirmwareStatusNotification, 6 | #[default] 7 | Heartbeat, 8 | MeterValues, 9 | SignChargingStationCertificate, 10 | SignV2GCertificate, 11 | StatusNotification, 12 | TransactionEvent, 13 | SignCombinedCertificate, 14 | PublishFirmwareStatusNotification, 15 | } 16 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/monitor_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitorEnumType { 3 | #[default] 4 | UpperThreshold, 5 | LowerThreshold, 6 | Delta, 7 | Periodic, 8 | PeriodicClockAligned, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/monitoring_base_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitoringBaseEnumType { 3 | #[default] 4 | All, 5 | FactoryDefault, 6 | HardWiredOnly, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/monitoring_criterion_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitoringCriterionEnumType { 3 | #[default] 4 | ThresholdMonitoring, 5 | DeltaMonitoring, 6 | PeriodicMonitoring, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/mutability_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MutabilityEnumType { 3 | #[default] 4 | ReadOnly, 5 | WriteOnly, 6 | ReadWrite, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/notify_ev_charging_needs_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum NotifyEVChargingNeedsStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Processing, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/ocpp_interface_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum OCPPInterfaceEnumType { 3 | #[default] 4 | Wired0, 5 | Wired1, 6 | Wired2, 7 | Wired3, 8 | Wireless0, 9 | Wireless1, 10 | Wireless2, 11 | Wireless3, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/ocpp_transport_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum OCPPTransportEnumType { 3 | #[default] 4 | JSON, 5 | SOAP, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/ocpp_version_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum OCPPVersionEnumType { 3 | OCPP12, 4 | OCPP15, 5 | OCPP16, 6 | #[default] 7 | OCPP20, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/operational_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum OperationalStatusEnumType { 3 | Inoperative, 4 | #[default] 5 | Operative, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/phase_enum_type.rs: -------------------------------------------------------------------------------- 1 | // DONE: FIX THIS 2 | #[derive(serde::Serialize, serde::Deserialize, Clone, Debug, PartialEq, Default)] 3 | pub enum PhaseEnumType { 4 | #[default] 5 | L1, 6 | L2, 7 | L3, 8 | N, 9 | #[serde(rename = "L1-N")] 10 | L1N, 11 | #[serde(rename = "L2-N")] 12 | L2N, 13 | #[serde(rename = "L3-N")] 14 | L3N, 15 | #[serde(rename = "L1-L2")] 16 | L1L2, 17 | #[serde(rename = "L2-L3")] 18 | L2L3, 19 | #[serde(rename = "L3-L1")] 20 | L3L1, 21 | } 22 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/publish_firmware_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PublishFirmwareStatusEnumType { 3 | #[default] 4 | Idle, 5 | DownloadScheduled, 6 | Downloading, 7 | Downloaded, 8 | Published, 9 | DownloadFailed, 10 | DownloadPaused, 11 | InvalidChecksum, 12 | ChecksumVerified, 13 | PublishFailed, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reading_context_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReadingContextEnumType { 3 | #[serde(rename = "Interruption.Begin")] 4 | InterruptionBegin, 5 | #[serde(rename = "Interruption.End")] 6 | InterruptionEnd, 7 | #[default] 8 | Other, 9 | #[serde(rename = "Sample.Clock")] 10 | SampleClock, 11 | #[serde(rename = "Sample.Periodic")] 12 | SamplePeriodic, 13 | #[serde(rename = "Transaction.Begin")] 14 | TransactionBegin, 15 | #[serde(rename = "Transaction.End")] 16 | TransactionEnd, 17 | Trigger, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reason_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReasonEnumType { 3 | DeAuthorized, 4 | EmergencyStop, 5 | EnergyLimitReached, 6 | EVDisconnected, 7 | GroundFault, 8 | ImmediateReset, 9 | Local, 10 | LocalOutOfCredit, 11 | MasterPass, 12 | #[default] 13 | Other, 14 | OvercurrentFault, 15 | PowerLoss, 16 | PowerQuality, 17 | Reboot, 18 | Remote, 19 | SOCLimitReached, 20 | StoppedByEV, 21 | TimeLimitReached, 22 | Timeout, 23 | } 24 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/recurrency_kind_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum RecurrencyKindEnumType { 3 | #[default] 4 | Daily, 5 | Weekly, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/registration_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum RegistrationStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Pending, 6 | Rejected, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/report_base_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReportBaseEnumType { 3 | ConfigurationInventory, 4 | #[default] 5 | FullInventory, 6 | SummaryInventory, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/request_start_stop_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum RequestStartStopStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reservation_update_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReservationUpdateStatusEnumType { 3 | #[default] 4 | Expired, 5 | Removed, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reserve_now_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReserveNowStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Faulted, 6 | Occupied, 7 | Rejected, 8 | Unavailable, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reset_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ResetEnumType { 3 | Immediate, 4 | #[default] 5 | OnIdle, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/reset_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ResetStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Scheduled, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/send_local_list_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SendLocalListStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Failed, 6 | VersionMismatch, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/set_monitoring_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetMonitoringStatusEnumType { 3 | #[default] 4 | Accepted, 5 | UnknownComponent, 6 | UnknownVariable, 7 | UnsupportedMonitorType, 8 | Rejected, 9 | Duplicate, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/set_network_profile_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetNetworkProfileStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | Failed, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/set_variable_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetVariableStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | UnknownComponent, 7 | UnknownVariable, 8 | NotSupportedAttributeType, 9 | RebootRequired, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/transaction_event_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TransactionEventEnumType { 3 | Ended, 4 | #[default] 5 | Started, 6 | Updated, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/trigger_message_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TriggerMessageStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | NotImplemented, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/trigger_reason_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TriggerReasonEnumType { 3 | #[default] 4 | Authorized, 5 | CablePluggedIn, 6 | ChargingRateChanged, 7 | ChargingStateChanged, 8 | Deauthorized, 9 | EnergyLimitReached, 10 | EVCommunicationLost, 11 | EVConnectTimeout, 12 | MeterValueClock, 13 | MeterValuePeriodic, 14 | TimeLimitReached, 15 | Trigger, 16 | UnlockCommand, 17 | StopAuthorized, 18 | EVDeparted, 19 | EVDetected, 20 | RemoteStop, 21 | RemoteStart, 22 | AbnormalCondition, 23 | SignedDataReceived, 24 | ResetCommand, 25 | } 26 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/unlock_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UnlockStatusEnumType { 3 | #[default] 4 | Unlocked, 5 | UnlockFailed, 6 | OngoingAuthorizedTransaction, 7 | UnknownConnector, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/unpublish_firmware_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UnpublishFirmwareStatusEnumType { 3 | #[default] 4 | DownloadOngoing, 5 | NoFirmware, 6 | Unpublished, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/update_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UpdateEnumType { 3 | Differential, 4 | #[default] 5 | Full, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/update_firmware_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UpdateFirmwareStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | AcceptedCanceled, 7 | InvalidCertificate, 8 | RevokedCertificate, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/upload_log_status_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UploadLogStatusEnumType { 3 | BadMessage, 4 | #[default] 5 | Idle, 6 | NotSupportedOperation, 7 | PermissionDenied, 8 | Uploaded, 9 | UploadFailure, 10 | Uploading, 11 | AcceptedCanceled, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_0_1/enumerations/vpn_enum_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum VPNEnumType { 3 | #[default] 4 | IKEv2, 5 | IPSec, 6 | L2TP, 7 | PPTP, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_0_1/helpers/datetime_rfc3339.rs: -------------------------------------------------------------------------------- 1 | use chrono::{DateTime, SecondsFormat, Utc}; 2 | use serde::{Deserialize, Deserializer, Serializer}; 3 | pub fn serialize(date: &DateTime, serializer: S) -> Result 4 | where 5 | S: Serializer, 6 | { 7 | serializer.serialize_str(&date.to_rfc3339_opts(SecondsFormat::Millis, true)) 8 | } 9 | 10 | pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> 11 | where 12 | D: Deserializer<'de>, 13 | { 14 | let s: String = Deserialize::deserialize(deserializer)?; 15 | DateTime::parse_from_rfc3339(&s) 16 | .map(|dt| dt.with_timezone(&Utc)) 17 | .map_err(serde::de::Error::custom) 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/helpers/mod.rs: -------------------------------------------------------------------------------- 1 | /// validators 2 | pub mod validator; 3 | 4 | /// serializers 5 | pub mod datetime_rfc3339; 6 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/clear_variable_monitoring.rs: -------------------------------------------------------------------------------- 1 | //! ClearedChargingLimit 2 | use crate::v2_0_1::datatypes::clear_monitoring_result_type::ClearMonitoringResultType; 3 | 4 | /// ClearVariableMonitoringRequest, sent by the CSMS to the Charging Station. 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct ClearVariableMonitoringRequest { 8 | /// List of the monitors to be cleared, identified by there Id. 9 | pub id: Vec, 10 | } 11 | 12 | /// ClearVariableMonitoringResponse, sent by the Charging Station to the CSMS. 13 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 14 | #[serde(rename_all = "camelCase")] 15 | pub struct ClearVariableMonitoringResponse { 16 | /// List of result statuses per monitor. 17 | pub clear_monitoring_result: Vec, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/cleared_charging_limit.rs: -------------------------------------------------------------------------------- 1 | //! ClearedChargingLimit 2 | use crate::v2_0_1::enumerations::charging_limit_source_enum_type::ChargingLimitSourceEnumType; 3 | 4 | /// ClearedChargingLimitRequest, sent by the Charging Station to the CSMS 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct ClearedChargingLimitRequest { 8 | /// Source of the charging limit. 9 | pub charging_limit_source: ChargingLimitSourceEnumType, 10 | /// EVSE Identifier. 11 | #[serde(skip_serializing_if = "Option::is_none")] 12 | pub evse_id: Option, 13 | } 14 | 15 | /// ClearedChargingLimitResponse, sent by the CSMS to the Charging Station. 16 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 17 | #[serde(rename_all = "camelCase")] 18 | pub struct ClearedChargingLimitResponse { 19 | // No fields are defined. 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/get_local_list_version.rs: -------------------------------------------------------------------------------- 1 | //! GetLocalListVersion 2 | 3 | /// GetLocalListVersionRequest, sent by the CSMS to the Charging Station. No fields are defined. 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct GetLocalListVersionRequest {} 7 | 8 | /// GetLocalListVersionResponse, sent by the Charging Station to CSMS in response to a GetLocalListVersionRequest. 9 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 10 | #[serde(rename_all = "camelCase")] 11 | pub struct GetLocalListVersionResponse { 12 | /// This contains the current version number of thelocal authorization list in the Charging Station 13 | pub version_number: i32, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/heartbeat.rs: -------------------------------------------------------------------------------- 1 | //! HeartBeat 2 | 3 | use chrono::DateTime; 4 | use chrono::Utc; 5 | 6 | use crate::v2_0_1::helpers::datetime_rfc3339; 7 | 8 | /// HeartbeatRequest, sent by the Charging Station to the CSMS. No fields are defined. 9 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 10 | #[serde(rename_all = "camelCase")] 11 | pub struct HeartbeatRequest { 12 | // No fields are defined 13 | } 14 | 15 | /// HeartbeatResponse, sent by the CSMS to the Charging Station in response to a HeartbeatRequest. 16 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 17 | #[serde(rename_all = "camelCase")] 18 | pub struct HeartbeatResponse { 19 | /// Contains the current time of the CSMS. 20 | #[serde(with = "datetime_rfc3339 ")] 21 | pub current_time: DateTime, 22 | } 23 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/reservation_status_update.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::reservation_update_status_enum_type::ReservationUpdateStatusEnumType; 2 | 3 | /// This contains the field definition of the ReservationStatusUpdateRequest PDU sent by the Charging Station to the CSMS. 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct ReservationStatusUpdateRequest { 7 | pub reservation_id: i32, 8 | pub reservation_update_status: ReservationUpdateStatusEnumType, 9 | } 10 | 11 | /// This contains the field definition of the ReservationStatusUpdateResponse PDU sent by the CSMS to the Charging Station in response to a ReservationStatusUpdateRequest. No fields are defined. 12 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 13 | #[serde(rename_all = "camelCase")] 14 | pub struct ReservationStatusUpdateResponse {} 15 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/set_variables.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::datatypes::set_variable_data_type::SetVariableDataType; 2 | use crate::v2_0_1::datatypes::set_variable_result_type::SetVariableResultType; 3 | 4 | /// This contains the field definition of the SetVariablesRequest PDU sent by the CSMS to the Charging Station. 5 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 6 | #[serde(rename_all = "camelCase")] 7 | pub struct SetVariablesRequest { 8 | pub set_variable_data: Vec, 9 | } 10 | 11 | /// This contains the field definition of the SetVariablesResponse PDU sent by the Charging Station to the CSMS in response to a SetVariablesRequest. 12 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 13 | #[serde(rename_all = "camelCase")] 14 | pub struct SetVariablesResponse { 15 | pub set_variable_result: Vec, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_0_1/messages/unpublish_firmware.rs: -------------------------------------------------------------------------------- 1 | use crate::v2_0_1::enumerations::unpublish_firmware_status_enum_type::UnpublishFirmwareStatusEnumType; 2 | 3 | /// This contains the field definition of the UnpublishFirmwareRequest PDU sent by the CSMS to the Charging Station. 4 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 5 | #[serde(rename_all = "camelCase")] 6 | pub struct UnpublishFirmwareRequest { 7 | pub checksum: String, 8 | } 9 | 10 | /// This contains the field definition of the UnpublishFirmwareResponse PDU sent by the Charging Station to the CSMS in response to a UnpublishFirmwareRequest. 11 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 12 | #[serde(rename_all = "camelCase")] 13 | pub struct UnpublishFirmwareResponse { 14 | pub status: UnpublishFirmwareStatusEnumType, 15 | } 16 | -------------------------------------------------------------------------------- /src/v2_0_1/mod.rs: -------------------------------------------------------------------------------- 1 | //! # Implementation of the OCPP 2.0.1 Specification 2 | //! 3 | //! ## Messages, Datatypes & Enumerations 4 | //! 5 | //! The following modules implements all messages, datatypes and enumerations 6 | //! of the ocpp 2.0.1 specification 7 | //! 8 | 9 | /// datatypes 10 | pub mod datatypes; 11 | 12 | /// enumerations 13 | pub mod enumerations; 14 | 15 | /// messages 16 | pub mod messages; 17 | 18 | /// helper functions 19 | pub mod helpers; 20 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/apn_authentication.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Authentication method. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum APNAuthenticationEnumType { 6 | #[serde(rename = "PAP")] 7 | PAP, 8 | #[serde(rename = "CHAP")] 9 | CHAP, 10 | #[serde(rename = "NONE")] 11 | NONE, 12 | #[serde(rename = "AUTO")] 13 | AUTO, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/attribute.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Attribute: Actual, Target, MinSet, MaxSet. 4 | /// Defaults to Actual if absent. 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 6 | pub enum AttributeEnumType { 7 | #[serde(rename = "Actual")] 8 | Actual, 9 | #[serde(rename = "Target")] 10 | Target, 11 | #[serde(rename = "MinSet")] 12 | MinSet, 13 | #[serde(rename = "MaxSet")] 14 | MaxSet, 15 | } 16 | 17 | impl Default for AttributeEnumType { 18 | fn default() -> Self { 19 | Self::Actual 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/authorization_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Current status of the ID Token. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum AuthorizationStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Blocked")] 9 | Blocked, 10 | #[serde(rename = "ConcurrentTx")] 11 | ConcurrentTx, 12 | #[serde(rename = "Expired")] 13 | Expired, 14 | #[serde(rename = "Invalid")] 15 | Invalid, 16 | #[serde(rename = "NoCredit")] 17 | NoCredit, 18 | #[serde(rename = "NotAllowedTypeEVSE")] 19 | NotAllowedTypeEVSE, 20 | #[serde(rename = "NotAtThisLocation")] 21 | NotAtThisLocation, 22 | #[serde(rename = "NotAtThisTime")] 23 | NotAtThisTime, 24 | #[serde(rename = "Unknown")] 25 | Unknown, 26 | } 27 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/authorize_certificate_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Certificate status information. 4 | /// - if all certificates are valid: return 'Accepted'. 5 | /// - if one of the certificates was revoked, return 'CertificateRevoked'. 6 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 7 | pub enum AuthorizeCertificateStatusEnumType { 8 | #[serde(rename = "Accepted")] 9 | Accepted, 10 | #[serde(rename = "SignatureError")] 11 | SignatureError, 12 | #[serde(rename = "CertificateExpired")] 13 | CertificateExpired, 14 | #[serde(rename = "CertificateRevoked")] 15 | CertificateRevoked, 16 | #[serde(rename = "NoCertificateAvailable")] 17 | NoCertificateAvailable, 18 | #[serde(rename = "CertChainError")] 19 | CertChainError, 20 | #[serde(rename = "ContractCancelled")] 21 | ContractCancelled, 22 | } 23 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/battery_swap_event.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Battery in/out 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum BatterySwapEventEnumType { 6 | #[serde(rename = "BatteryIn")] 7 | BatteryIn, 8 | #[serde(rename = "BatteryOut")] 9 | BatteryOut, 10 | #[serde(rename = "BatteryOutTimeout")] 11 | BatteryOutTimeout, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/boot_reason.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | pub enum BootReasonEnumType { 5 | #[serde(rename = "ApplicationReset")] 6 | ApplicationReset, 7 | #[serde(rename = "FirmwareUpdate")] 8 | FirmwareUpdate, 9 | #[serde(rename = "LocalReset")] 10 | LocalReset, 11 | #[serde(rename = "PowerUp")] 12 | PowerUp, 13 | #[serde(rename = "RemoteReset")] 14 | RemoteReset, 15 | #[serde(rename = "ScheduledReset")] 16 | ScheduledReset, 17 | #[serde(rename = "Triggered")] 18 | Triggered, 19 | #[serde(rename = "Unknown")] 20 | Unknown, 21 | #[serde(rename = "Watchdog")] 22 | Watchdog, 23 | } 24 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/cancel_reservation_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates the success or failure of the canceling of a reservation by CSMS. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CancelReservationStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/certificate_action.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Defines whether certificate needs to be installed or updated. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CertificateActionEnumType { 6 | #[serde(rename = "Install")] 7 | Install, 8 | #[serde(rename = "Update")] 9 | Update, 10 | } 11 | 12 | impl Default for CertificateActionEnumType { 13 | fn default() -> Self { 14 | Self::Install 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/certificate_signed_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Returns whether certificate signing has been accepted, otherwise rejected. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CertificateSignedStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | } 11 | 12 | impl Default for CertificateSignedStatusEnumType { 13 | fn default() -> Self { 14 | Self::Accepted 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/certificate_signing_use.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates the type of the signed certificate that is returned. When omitted the certificate is used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection. This field is required when a typeOfCertificate was included in the SignCertificateRequest that requested this certificate to be signed AND both the 15118 connection and the Charging Station connection are implemented. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CertificateSigningUseEnumType { 6 | #[serde(rename = "ChargingStationCertificate")] 7 | ChargingStationCertificate, 8 | #[serde(rename = "V2GCertificate")] 9 | V2GCertificate, 10 | #[serde(rename = "V2G20Certificate")] 11 | V2G20Certificate, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/certificate_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Status of certificate: good, revoked or unknown. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CertificateStatusEnumType { 6 | #[serde(rename = "Good")] 7 | Good, 8 | #[serde(rename = "Revoked")] 9 | Revoked, 10 | #[serde(rename = "Unknown")] 11 | Unknown, 12 | #[serde(rename = "Failed")] 13 | Failed, 14 | } 15 | 16 | impl Default for CertificateStatusEnumType { 17 | fn default() -> Self { 18 | Self::Unknown 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/certificate_status_source.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Source of status: OCSP, CRL 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CertificateStatusSourceEnumType { 6 | #[serde(rename = "CRL")] 7 | CRL, 8 | #[serde(rename = "OCSP")] 9 | OCSP, 10 | } 11 | 12 | impl Default for CertificateStatusSourceEnumType { 13 | fn default() -> Self { 14 | Self::OCSP 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/change_availability_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the Charging Station is able to perform the availability change. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ChangeAvailabilityStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "Scheduled")] 11 | Scheduled, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/charging_profile_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates the kind of schedule. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ChargingProfileKindEnumType { 6 | #[serde(rename = "Absolute")] 7 | Absolute, 8 | #[serde(rename = "Recurring")] 9 | Recurring, 10 | #[serde(rename = "Relative")] 11 | Relative, 12 | #[serde(rename = "Dynamic")] 13 | Dynamic, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/charging_profile_purpose.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Defines the purpose of the schedule transferred by this profile 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ChargingProfilePurposeEnumType { 6 | #[serde(rename = "ChargingStationExternalConstraints")] 7 | ChargingStationExternalConstraints, 8 | #[serde(rename = "ChargingStationMaxProfile")] 9 | ChargingStationMaxProfile, 10 | #[serde(rename = "TxDefaultProfile")] 11 | TxDefaultProfile, 12 | #[serde(rename = "TxProfile")] 13 | TxProfile, 14 | #[serde(rename = "PriorityCharging")] 15 | PriorityCharging, 16 | #[serde(rename = "LocalGeneration")] 17 | LocalGeneration, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/charging_profile_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Returns whether the Charging Station has been able to process the message successfully. 4 | /// This does not guarantee the schedule will be followed to the letter. 5 | /// There might be other constraints the Charging Station may need to take into account. 6 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 7 | pub enum ChargingProfileStatusEnumType { 8 | #[serde(rename = "Accepted")] 9 | Accepted, 10 | #[serde(rename = "Rejected")] 11 | Rejected, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/charging_rate_unit.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// The unit of measure in which limits and setpoints are expressed. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ChargingRateUnitEnumType { 6 | #[serde(rename = "W")] 7 | W, 8 | #[serde(rename = "A")] 9 | A, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/charging_state.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Current charging state, is required when state has changed. 4 | /// Omitted when there is no communication between EVSE and EV, because no cable is plugged in. 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 6 | pub enum ChargingStateEnumType { 7 | #[serde(rename = "EVConnected")] 8 | EVConnected, 9 | #[serde(rename = "Charging")] 10 | Charging, 11 | #[serde(rename = "SuspendedEV")] 12 | SuspendedEV, 13 | #[serde(rename = "SuspendedEVSE")] 14 | SuspendedEVSE, 15 | #[serde(rename = "Idle")] 16 | Idle, 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/clear_cache_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Accepted if the Charging Station has executed the request, otherwise rejected. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ClearCacheStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | } 11 | 12 | impl Default for ClearCacheStatusEnumType { 13 | fn default() -> Self { 14 | Self::Accepted 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/clear_charging_profile_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates if the Charging Station was able to execute the request. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ClearChargingProfileStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Unknown")] 9 | Unknown, 10 | } 11 | 12 | impl Default for ClearChargingProfileStatusEnumType { 13 | fn default() -> Self { 14 | Self::Accepted 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/clear_message_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Returns whether the Charging Station has been able to remove the message. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ClearMessageStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Unknown")] 9 | Unknown, 10 | #[serde(rename = "Rejected")] 11 | Rejected, 12 | } 13 | 14 | impl Default for ClearMessageStatusEnumType { 15 | fn default() -> Self { 16 | Self::Unknown 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/clear_monitoring_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Result of the clear request for this monitor, identified by its Id. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ClearMonitoringStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "NotFound")] 11 | NotFound, 12 | } 13 | 14 | impl Default for ClearMonitoringStatusEnumType { 15 | fn default() -> Self { 16 | Self::Accepted 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/component_criterion.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This field contains criteria for components for which a report is requested. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ComponentCriterionEnumType { 6 | #[serde(rename = "Active")] 7 | Active, 8 | #[serde(rename = "Available")] 9 | Available, 10 | #[serde(rename = "Enabled")] 11 | Enabled, 12 | #[serde(rename = "Problem")] 13 | Problem, 14 | } 15 | 16 | impl Default for ComponentCriterionEnumType { 17 | fn default() -> Self { 18 | Self::Available 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/connector_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This contains the current status of the Connector. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ConnectorStatusEnumType { 6 | #[serde(rename = "Available")] 7 | Available, 8 | #[serde(rename = "Occupied")] 9 | Occupied, 10 | #[serde(rename = "Reserved")] 11 | Reserved, 12 | #[serde(rename = "Unavailable")] 13 | Unavailable, 14 | #[serde(rename = "Faulted")] 15 | Faulted, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/control_mode.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates whether EV wants to operate in Dynamic or Scheduled mode. 4 | /// When absent, Scheduled mode is assumed for backwards compatibility. 5 | /// 6 | /// ISO 15118-20: 7 | /// ServiceSelectionReq(SelectedEnergyTransferService) 8 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 9 | pub enum ControlModeEnumType { 10 | #[serde(rename = "ScheduledControl")] 11 | ScheduledControl, 12 | #[serde(rename = "DynamicControl")] 13 | DynamicControl, 14 | } 15 | 16 | impl Default for ControlModeEnumType { 17 | fn default() -> Self { 18 | Self::ScheduledControl 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/cost_dimension.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Type of cost dimension: energy, power, time, etc. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CostDimensionEnumType { 6 | #[serde(rename = "Energy")] 7 | Energy, 8 | #[serde(rename = "MaxCurrent")] 9 | MaxCurrent, 10 | #[serde(rename = "MinCurrent")] 11 | MinCurrent, 12 | #[serde(rename = "MaxPower")] 13 | MaxPower, 14 | #[serde(rename = "MinPower")] 15 | MinPower, 16 | #[serde(rename = "IdleTIme")] 17 | IdleTime, 18 | #[serde(rename = "ChargingTime")] 19 | ChargingTime, 20 | } 21 | 22 | impl Default for CostDimensionEnumType { 23 | fn default() -> Self { 24 | Self::Energy 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/cost_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// The kind of cost referred to in the message element amount 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CostKindEnumType { 6 | #[serde(rename = "CarbonDioxideEmission")] 7 | CarbonDioxideEmission, 8 | #[serde(rename = "RelativePricePercentage")] 9 | RelativePricePercentage, 10 | #[serde(rename = "RenewableGenerationPercentage")] 11 | RenewableGenerationPercentage, 12 | } 13 | 14 | impl Default for CostKindEnumType { 15 | fn default() -> Self { 16 | Self::CarbonDioxideEmission 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/customer_information_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates whether the request was accepted. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum CustomerInformationStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "Invalid")] 11 | Invalid, 12 | } 13 | 14 | impl Default for CustomerInformationStatusEnumType { 15 | fn default() -> Self { 16 | Self::Accepted 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/data_enum.rs: -------------------------------------------------------------------------------- 1 | use serde::{Serialize, Deserialize}; 2 | 3 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | pub enum DataEnumType { 5 | #[serde(rename = "string")] 6 | String, 7 | #[serde(rename = "decimal")] 8 | Decimal, 9 | #[serde(rename = "integer")] 10 | Integer, 11 | #[serde(rename = "dateTime")] 12 | DateTime, 13 | #[serde(rename = "boolean")] 14 | Boolean, 15 | #[serde(rename = "OptionList")] 16 | OptionList, 17 | #[serde(rename = "SequenceList")] 18 | SequenceList, 19 | #[serde(rename = "MemberList")] 20 | MemberList, 21 | } 22 | 23 | impl Default for DataEnumType { 24 | fn default() -> Self { 25 | DataEnumType::String 26 | } 27 | } -------------------------------------------------------------------------------- /src/v2_1/enumerations/data_transfer_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates the success or failure of the data transfer. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum DataTransferStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "UnknownMessageId")] 11 | UnknownMessageId, 12 | #[serde(rename = "UnknownVendorId")] 13 | UnknownVendorId, 14 | } 15 | 16 | impl Default for DataTransferStatusEnumType { 17 | fn default() -> Self { 18 | Self::Accepted 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/day_of_week.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | pub enum DayOfWeekEnumType { 5 | #[serde(rename = "Monday")] 6 | Monday, 7 | #[serde(rename = "Tuesday")] 8 | Tuesday, 9 | #[serde(rename = "Wednesday")] 10 | Wednesday, 11 | #[serde(rename = "Thursday")] 12 | Thursday, 13 | #[serde(rename = "Friday")] 14 | Friday, 15 | #[serde(rename = "Saturday")] 16 | Saturday, 17 | #[serde(rename = "Sunday")] 18 | Sunday, 19 | } 20 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/delete_certificate_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Charging Station indicates if it can process the request. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum DeleteCertificateStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Failed")] 9 | Failed, 10 | #[serde(rename = "NotFound")] 11 | NotFound, 12 | } 13 | 14 | impl Default for DeleteCertificateStatusEnumType { 15 | fn default() -> Self { 16 | Self::Accepted 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/der_control_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Result of operation. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum DERControlStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "NotSupported")] 11 | NotSupported, 12 | #[serde(rename = "NotFound")] 13 | NotFound, 14 | } 15 | 16 | impl Default for DERControlStatusEnumType { 17 | fn default() -> Self { 18 | Self::Accepted 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/der_unit.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Unit of the Y-axis of DER curve 4 | #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] 5 | pub enum DERUnitEnumType { 6 | #[serde(rename = "Not_Applicable")] 7 | NotApplicable, 8 | #[serde(rename = "PctMaxW")] 9 | PctMaxW, 10 | #[serde(rename = "PctMaxVar")] 11 | PctMaxVar, 12 | #[serde(rename = "PctWAvail")] 13 | PctWAvail, 14 | #[serde(rename = "PctVarAvail")] 15 | PctVarAvail, 16 | #[serde(rename = "PctEffectiveV")] 17 | PctEffectiveV, 18 | } 19 | 20 | impl Default for DERUnitEnumType { 21 | fn default() -> Self { 22 | Self::NotApplicable 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/display_message_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the Charging Station is able to display the message. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum DisplayMessageStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "NotSupportedMessageFormat")] 9 | NotSupportedMessageFormat, 10 | #[serde(rename = "Rejected")] 11 | Rejected, 12 | #[serde(rename = "NotSupportedPriority")] 13 | NotSupportedPriority, 14 | #[serde(rename = "NotSupportedState")] 15 | NotSupportedState, 16 | #[serde(rename = "UnknownTransaction")] 17 | UnknownTransaction, 18 | #[serde(rename = "LanguageNotSupported")] 19 | LanguageNotSupported, 20 | } 21 | 22 | impl Default for DisplayMessageStatusEnumType { 23 | fn default() -> Self { 24 | Self::Accepted 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/energy_transfer_mode.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Defines the energy transfer modes that are allowed by the Charging Station. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum EnergyTransferModeEnumType { 6 | #[serde(rename = "AC_single_phase")] 7 | ACSinglePhase, 8 | #[serde(rename = "AC_two_phase")] 9 | ACTwoPhase, 10 | #[serde(rename = "AC_three_phase")] 11 | ACThreePhase, 12 | #[serde(rename = "DC")] 13 | DC, 14 | #[serde(rename = "AC_BPT")] 15 | ACBPT, 16 | #[serde(rename = "AC_BPT_DER")] 17 | ACBPTDER, 18 | #[serde(rename = "AC_DER")] 19 | ACDER, 20 | #[serde(rename = "DC_BPT")] 21 | DCBPT, 22 | #[serde(rename = "DC_ACDP")] 23 | DCACDP, 24 | #[serde(rename = "DC_ACDP_BPT")] 25 | DCACDPBPT, 26 | #[serde(rename = "WPT")] 27 | WPT, 28 | } 29 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/event_notification.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Specifies the event notification type of the message. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum EventNotificationEnumType { 6 | #[serde(rename = "HardWiredNotification")] 7 | HardWiredNotification, 8 | #[serde(rename = "HardWiredMonitor")] 9 | HardWiredMonitor, 10 | #[serde(rename = "PreconfiguredMonitor")] 11 | PreconfiguredMonitor, 12 | #[serde(rename = "CustomMonitor")] 13 | CustomMonitor, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/event_trigger.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Type of trigger for this event, e.g. exceeding a threshold value. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum EventTriggerEnumType { 6 | #[serde(rename = "Alerting")] 7 | Alerting, 8 | #[serde(rename = "Delta")] 9 | Delta, 10 | #[serde(rename = "Periodic")] 11 | Periodic, 12 | } 13 | 14 | impl Default for EventTriggerEnumType { 15 | fn default() -> Self { 16 | Self::Alerting 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/evse_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Type of EVSE (AC, DC) this tariff applies to. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum EvseKindEnumType { 6 | #[serde(rename = "AC")] 7 | AC, 8 | #[serde(rename = "DC")] 9 | DC, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/generic_device_model_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the Charging Station is able to accept this request. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum GenericDeviceModelStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "NotSupported")] 11 | NotSupported, 12 | #[serde(rename = "EmptyResultSet")] 13 | EmptyResultSet, 14 | } 15 | 16 | impl Default for GenericDeviceModelStatusEnumType { 17 | fn default() -> Self { 18 | Self::Accepted 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/generic_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Status of operation. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | #[serde(rename_all = "camelCase")] 6 | pub enum GenericStatusEnumType { 7 | #[serde(rename = "Accepted")] 8 | Accepted, 9 | #[serde(rename = "Rejected")] 10 | Rejected, 11 | } 12 | 13 | impl Default for GenericStatusEnumType { 14 | fn default() -> Self { 15 | Self::Accepted 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_certificate_id_use.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates the type of the requested certificate(s). 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum GetCertificateIdUseEnumType { 6 | #[serde(rename = "V2GRootCertificate")] 7 | V2GRootCertificate, 8 | #[serde(rename = "MORootCertificate")] 9 | MORootCertificate, 10 | #[serde(rename = "CSMSRootCertificate")] 11 | CSMSRootCertificate, 12 | #[serde(rename = "V2GCertificateChain")] 13 | V2GCertificateChain, 14 | #[serde(rename = "ManufacturerRootCertificate")] 15 | ManufacturerRootCertificate, 16 | #[serde(rename = "OEMRootCertificate")] 17 | OEMRootCertificate, 18 | } 19 | 20 | impl Default for GetCertificateIdUseEnumType { 21 | fn default() -> Self { 22 | Self::CSMSRootCertificate 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_certificate_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the charging station was able to retrieve the OCSP certificate status. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum GetCertificateStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Failed")] 9 | Failed, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_charging_profile_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the Charging Station is able to process this request and will send ReportChargingProfilesRequest messages. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum GetChargingProfileStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "NoProfiles")] 9 | NoProfiles, 10 | } 11 | 12 | impl Default for GetChargingProfileStatusEnumType { 13 | fn default() -> Self { 14 | Self::Accepted 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_display_messages_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Indicates if the Charging Station has Display Messages that match the request criteria in the GetDisplayMessagesRequest. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum GetDisplayMessagesStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Unknown")] 9 | Unknown, 10 | } 11 | 12 | impl Default for GetDisplayMessagesStatusEnumType { 13 | fn default() -> Self { 14 | Self::Accepted 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_installed_certificate_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetInstalledCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | NotFound, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/get_variable_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GetVariableStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | UnknownComponent, 7 | UnknownVariable, 8 | NotSupportedAttributeType, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/grid_event_fault.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum GridEventFaultEnumType { 3 | #[default] 4 | CurrentImbalance, 5 | LocalEmergency, 6 | LowInputPower, 7 | OverCurrent, 8 | OverFrequency, 9 | OverVoltage, 10 | PhaseRotation, 11 | RemoteEmergency, 12 | UnderFrequency, 13 | UnderVoltage, 14 | VoltageImbalance, 15 | } 16 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/hash_algorithm.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Used algorithms for the hashes provided. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum HashAlgorithmEnumType { 6 | #[serde(rename = "SHA256")] 7 | SHA256, 8 | #[serde(rename = "SHA384")] 9 | SHA384, 10 | #[serde(rename = "SHA512")] 11 | SHA512, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/install_certificate_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Charging Station indicates if installation was successful. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum InstallCertificateStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "Failed")] 11 | Failed, 12 | } 13 | 14 | impl Default for InstallCertificateStatusEnumType { 15 | fn default() -> Self { 16 | Self::Accepted 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/install_certificate_use.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum InstallCertificateUseEnumType { 3 | V2GRootCertificate, 4 | MORootCertificate, 5 | ManufacturerRootCertificate, 6 | #[default] 7 | CSMSRootCertificate, 8 | OEMRootCertificate, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/islanding_detection.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] 4 | pub enum IslandingDetectionEnumType { 5 | #[default] 6 | NoAntiIslandingSupport, 7 | RoCoF, 8 | #[serde(rename = "UVP_OVP")] 9 | UvpOvp, 10 | #[serde(rename = "UFP_OFP")] 11 | UfpOfp, 12 | VoltageVectorShift, 13 | ZeroCrossingDetection, 14 | OtherPassive, 15 | ImpedanceMeasurement, 16 | ImpedanceAtFrequency, 17 | SlipModeFrequencyShift, 18 | SandiaFrequencyShift, 19 | SandiaVoltageShift, 20 | FrequencyJump, 21 | RCLQFactor, 22 | OtherActive, 23 | } 24 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/iso15118ev_certificate_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum Iso15118EVCertificateStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Failed, 6 | } 7 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/location.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LocationEnumType { 3 | Body, 4 | Cable, 5 | EV, 6 | Inlet, 7 | #[default] 8 | Outlet, 9 | } 10 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/log.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LogEnumType { 3 | #[default] 4 | DiagnosticsLog, 5 | SecurityLog, 6 | DataCollectorLog, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/log_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum LogStatusEnumType { 3 | #[default] 4 | Accepted, 5 | Rejected, 6 | AcceptedCanceled, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/message_format.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Format of the message. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum MessageFormatEnumType { 6 | #[serde(rename = "ASCII")] 7 | ASCII, 8 | #[serde(rename = "HTML")] 9 | HTML, 10 | #[serde(rename = "URI")] 11 | URI, 12 | #[serde(rename = "UTF8")] 13 | UTF8, 14 | #[serde(rename = "QRCODE")] 15 | QRCODE, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/message_priority.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessagePriorityEnumType { 3 | #[serde(rename = "AlwaysFront")] 4 | AlwaysFront, 5 | #[serde(rename = "InFront")] 6 | InFront, 7 | #[default] 8 | #[serde(rename = "NormalCycle")] 9 | NormalCycle, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/message_state.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MessageStateEnumType { 3 | #[serde(rename = "Charging")] 4 | Charging, 5 | #[serde(rename = "Faulted")] 6 | Faulted, 7 | #[default] 8 | #[serde(rename = "Idle")] 9 | Idle, 10 | #[serde(rename = "Unavailable")] 11 | Unavailable, 12 | #[serde(rename = "Suspended")] 13 | Suspended, 14 | #[serde(rename = "Discharging")] 15 | Discharging, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/mobility_needs_mode.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MobilityNeedsModeEnumType { 3 | #[default] 4 | #[serde(rename = "EVCC")] 5 | EVCC, 6 | #[serde(rename = "EVCC_SECC")] 7 | EVCCSECC, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/monitor.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitorEnumType { 3 | #[default] 4 | #[serde(rename = "UpperThreshold")] 5 | UpperThreshold, 6 | #[serde(rename = "LowerThreshold")] 7 | LowerThreshold, 8 | #[serde(rename = "Delta")] 9 | Delta, 10 | #[serde(rename = "Periodic")] 11 | Periodic, 12 | #[serde(rename = "PeriodicClockAligned")] 13 | PeriodicClockAligned, 14 | #[serde(rename = "TargetDelta")] 15 | TargetDelta, 16 | #[serde(rename = "TargetDeltaRelative")] 17 | TargetDeltaRelative, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/monitoring_base.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitoringBaseEnumType { 3 | #[default] 4 | All, 5 | FactoryDefault, 6 | HardWiredOnly, 7 | } 8 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/monitoring_criterion.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MonitoringCriterionEnumType { 3 | #[default] 4 | #[serde(rename = "ThresholdMonitoring")] 5 | ThresholdMonitoring, 6 | #[serde(rename = "DeltaMonitoring")] 7 | DeltaMonitoring, 8 | #[serde(rename = "PeriodicMonitoring")] 9 | PeriodicMonitoring, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/mutability.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum MutabilityEnumType { 3 | #[serde(rename = "ReadOnly")] 4 | ReadOnly, 5 | #[serde(rename = "WriteOnly")] 6 | WriteOnly, 7 | #[default] 8 | #[serde(rename = "ReadWrite")] 9 | ReadWrite, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/notify_allowed_energy_transfer_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum NotifyAllowedEnergyTransferStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/notify_ev_charging_needs_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum NotifyEVChargingNeedsStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "Processing")] 9 | Processing, 10 | #[serde(rename = "NoChargingProfile")] 11 | NoChargingProfile, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/ocpp_interface.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Applicable Network Interface. Charging Station is allowed to use a different network interface 4 | /// to connect if the given one does not work. 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 6 | pub enum OCPPInterfaceEnumType { 7 | #[serde(rename = "Wired0")] 8 | Wired0, 9 | #[serde(rename = "Wired1")] 10 | Wired1, 11 | #[serde(rename = "Wired2")] 12 | Wired2, 13 | #[serde(rename = "Wired3")] 14 | Wired3, 15 | #[serde(rename = "Wireless0")] 16 | Wireless0, 17 | #[serde(rename = "Wireless1")] 18 | Wireless1, 19 | #[serde(rename = "Wireless2")] 20 | Wireless2, 21 | #[serde(rename = "Wireless3")] 22 | Wireless3, 23 | #[serde(rename = "Any")] 24 | Any, 25 | } 26 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/ocpp_transport.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Defines the transport protocol (e.g. SOAP or JSON). 4 | /// Note: SOAP is not supported in OCPP 2.x, but is supported by earlier versions of OCPP. 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 6 | pub enum OCPPTransportEnumType { 7 | #[serde(rename = "SOAP")] 8 | SOAP, 9 | #[serde(rename = "JSON")] 10 | JSON, 11 | } 12 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/ocpp_version.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This field is ignored, since the OCPP version to use is determined during the websocket handshake. 4 | /// The field is only kept for backwards compatibility with the OCPP 2.0.1 JSON schema. 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 6 | pub enum OCPPVersionEnumType { 7 | #[serde(rename = "OCPP12")] 8 | OCPP12, 9 | #[serde(rename = "OCPP15")] 10 | OCPP15, 11 | #[serde(rename = "OCPP16")] 12 | OCPP16, 13 | #[serde(rename = "OCPP20")] 14 | OCPP20, 15 | #[serde(rename = "OCPP201")] 16 | OCPP201, 17 | #[serde(rename = "OCPP21")] 18 | OCPP21, 19 | } 20 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/operation_mode.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Charging operation mode to use during this time interval. When absent defaults to `ChargingOnly`. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum OperationModeEnumType { 6 | #[serde(rename = "Idle")] 7 | Idle, 8 | #[serde(rename = "ChargingOnly")] 9 | ChargingOnly, 10 | #[serde(rename = "CentralSetpoint")] 11 | CentralSetpoint, 12 | #[serde(rename = "ExternalSetpoint")] 13 | ExternalSetpoint, 14 | #[serde(rename = "ExternalLimits")] 15 | ExternalLimits, 16 | #[serde(rename = "CentralFrequency")] 17 | CentralFrequency, 18 | #[serde(rename = "LocalFrequency")] 19 | LocalFrequency, 20 | #[serde(rename = "LocalLoadBalancing")] 21 | LocalLoadBalancing, 22 | } 23 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/operational_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This contains the type of availability change that the Charging Station should perform. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum OperationalStatusEnumType { 6 | #[serde(rename = "Inoperative")] 7 | Inoperative, 8 | #[serde(rename = "Operative")] 9 | Operative, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/payment_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PaymentStatusEnumType { 3 | #[serde(rename = "Settled")] 4 | Settled, 5 | #[serde(rename = "Canceled")] 6 | Canceled, 7 | #[serde(rename = "Rejected")] 8 | Rejected, 9 | #[default] 10 | #[serde(rename = "Failed")] 11 | Failed, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/phase.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PhaseEnumType { 3 | #[default] 4 | #[serde(rename = "L1")] 5 | L1, 6 | #[serde(rename = "L2")] 7 | L2, 8 | #[serde(rename = "L3")] 9 | L3, 10 | #[serde(rename = "N")] 11 | N, 12 | #[serde(rename = "L1-N")] 13 | L1N, 14 | #[serde(rename = "L2-N")] 15 | L2N, 16 | #[serde(rename = "L3-N")] 17 | L3N, 18 | #[serde(rename = "L1-L2")] 19 | L1L2, 20 | #[serde(rename = "L2-L3")] 21 | L2L3, 22 | #[serde(rename = "L3-L1")] 23 | L3L1, 24 | } 25 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/power_during_cessation.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PowerDuringCessationEnumType { 3 | #[default] 4 | #[serde(rename = "Active")] 5 | Active, 6 | #[serde(rename = "Reactive")] 7 | Reactive, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/preconditioning_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PreconditioningStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Unknown")] 5 | Unknown, 6 | #[serde(rename = "Ready")] 7 | Ready, 8 | #[serde(rename = "NotReady")] 9 | NotReady, 10 | #[serde(rename = "Preconditioning")] 11 | Preconditioning, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/priority_charging_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PriorityChargingStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "NoProfile")] 9 | NoProfile, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/publish_firmware_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum PublishFirmwareStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Published")] 5 | Published, 6 | #[serde(rename = "DownloadScheduled")] 7 | DownloadScheduled, 8 | #[serde(rename = "InvalidChecksum")] 9 | InvalidChecksum, 10 | #[serde(rename = "NotDownloaded")] 11 | NotDownloaded, 12 | #[serde(rename = "DownloadFailed")] 13 | DownloadFailed, 14 | #[serde(rename = "Downloaded")] 15 | Downloaded, 16 | #[serde(rename = "Downloading")] 17 | Downloading, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/reading_context.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReadingContextEnumType { 3 | #[serde(rename = "Interruption.Begin")] 4 | InterruptionBegin, 5 | #[serde(rename = "Interruption.End")] 6 | InterruptionEnd, 7 | Other, 8 | #[serde(rename = "Sample.Clock")] 9 | SampleClock, 10 | #[default] 11 | #[serde(rename = "Sample.Periodic")] 12 | SamplePeriodic, 13 | #[serde(rename = "Transaction.Begin")] 14 | TransactionBegin, 15 | #[serde(rename = "Transaction.End")] 16 | TransactionEnd, 17 | Trigger, 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/recurrency_kind.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum RecurrencyKindEnumType { 3 | #[default] 4 | #[serde(rename = "Daily")] 5 | Daily, 6 | #[serde(rename = "Weekly")] 7 | Weekly, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/registration_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | pub enum RegistrationStatusEnumType { 5 | #[serde(rename = "Accepted")] 6 | Accepted, 7 | #[serde(rename = "Pending")] 8 | Pending, 9 | #[serde(rename = "Rejected")] 10 | Rejected, 11 | } 12 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/report_base.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReportBaseEnumType { 3 | #[default] 4 | #[serde(rename = "ConfigurationInventory")] 5 | ConfigurationInventory, 6 | #[serde(rename = "FullInventory")] 7 | FullInventory, 8 | #[serde(rename = "SummaryInventory")] 9 | SummaryInventory, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/request_start_stop_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum RequestStartStopStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/reservation_update_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReservationUpdateStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Failed")] 7 | Failed, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/reserve_now_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ReserveNowStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Faulted")] 7 | Faulted, 8 | #[serde(rename = "Occupied")] 9 | Occupied, 10 | #[serde(rename = "Rejected")] 11 | Rejected, 12 | #[serde(rename = "Unavailable")] 13 | Unavailable, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/reset.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum ResetEnumType { 3 | #[default] 4 | #[serde(rename = "Immediate")] 5 | Immediate, 6 | #[serde(rename = "OnIdle")] 7 | OnIdle, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/reset_status.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// This indicates whether the Charging Station is able to perform the reset. 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum ResetStatusEnumType { 6 | #[serde(rename = "Accepted")] 7 | Accepted, 8 | #[serde(rename = "Rejected")] 9 | Rejected, 10 | #[serde(rename = "Scheduled")] 11 | Scheduled, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/send_local_list_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SendLocalListStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Failed")] 7 | Failed, 8 | #[serde(rename = "VersionMismatch")] 9 | VersionMismatch, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/set_monitoring_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetMonitoringStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "UnknownComponent")] 7 | UnknownComponent, 8 | #[serde(rename = "UnknownVariable")] 9 | UnknownVariable, 10 | #[serde(rename = "UnsupportedMonitorType")] 11 | UnsupportedMonitorType, 12 | #[serde(rename = "Rejected")] 13 | Rejected, 14 | #[serde(rename = "OutOfRange")] 15 | OutOfRange, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/set_network_profile_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetNetworkProfileStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "Failed")] 9 | Failed, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/set_variable_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum SetVariableStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "UnknownComponent")] 9 | UnknownComponent, 10 | #[serde(rename = "UnknownVariable")] 11 | UnknownVariable, 12 | #[serde(rename = "NotSupportedAttributeType")] 13 | NotSupportedAttributeType, 14 | #[serde(rename = "RebootRequired")] 15 | RebootRequired, 16 | } 17 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_change_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TariffChangeStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "InvalidId")] 9 | InvalidId, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_clear_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TariffClearStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "InvalidId")] 9 | InvalidId, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_cost.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Type of cost: normal or the minimum or maximum cost. 4 | #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] 5 | pub enum TariffCostEnumType { 6 | #[serde(rename = "NormalCost")] 7 | NormalCost, 8 | #[serde(rename = "MinCost")] 9 | MinCost, 10 | #[serde(rename = "MaxCost")] 11 | MaxCost, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_get_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TariffGetStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "InvalidId")] 9 | InvalidId, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_kind.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TariffKindEnumType { 3 | #[default] 4 | #[serde(rename = "Charging")] 5 | Charging, 6 | #[serde(rename = "Parking")] 7 | Parking, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/tariff_set_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TariffSetStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "InvalidId")] 9 | InvalidId, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/transaction_event.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TransactionEventEnumType { 3 | #[default] 4 | #[serde(rename = "Ended")] 5 | Ended, 6 | #[serde(rename = "Started")] 7 | Started, 8 | #[serde(rename = "Updated")] 9 | Updated, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/trigger_message_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum TriggerMessageStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "NotImplemented")] 9 | NotImplemented, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/unlock_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UnlockStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Unlocked")] 5 | Unlocked, 6 | #[serde(rename = "UnlockFailed")] 7 | UnlockFailed, 8 | #[serde(rename = "OngoingAuthorizedTransaction")] 9 | OngoingAuthorizedTransaction, 10 | #[serde(rename = "UnknownConnector")] 11 | UnknownConnector, 12 | } 13 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/unpublish_firmware_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UnpublishFirmwareStatusEnumType { 3 | #[default] 4 | #[serde(rename = "DownloadOngoing")] 5 | DownloadOngoing, 6 | #[serde(rename = "NoFirmware")] 7 | NoFirmware, 8 | #[serde(rename = "Unpublished")] 9 | Unpublished, 10 | } 11 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/update.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UpdateEnumType { 3 | #[default] 4 | #[serde(rename = "Differential")] 5 | Differential, 6 | #[serde(rename = "Full")] 7 | Full, 8 | } 9 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/update_firmware_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UpdateFirmwareStatusEnumType { 3 | #[default] 4 | #[serde(rename = "Accepted")] 5 | Accepted, 6 | #[serde(rename = "Rejected")] 7 | Rejected, 8 | #[serde(rename = "AcceptedCanceled")] 9 | AcceptedCanceled, 10 | #[serde(rename = "InvalidCertificate")] 11 | InvalidCertificate, 12 | #[serde(rename = "RevokedCertificate")] 13 | RevokedCertificate, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/upload_log_status.rs: -------------------------------------------------------------------------------- 1 | #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)] 2 | pub enum UploadLogStatusEnumType { 3 | #[default] 4 | #[serde(rename = "BadMessage")] 5 | BadMessage, 6 | #[serde(rename = "Idle")] 7 | Idle, 8 | #[serde(rename = "NotSupportedOperation")] 9 | NotSupportedOperation, 10 | #[serde(rename = "PermissionDenied")] 11 | PermissionDenied, 12 | #[serde(rename = "Uploaded")] 13 | Uploaded, 14 | #[serde(rename = "UploadFailure")] 15 | UploadFailure, 16 | #[serde(rename = "Uploading")] 17 | Uploading, 18 | #[serde(rename = "AcceptedCanceled")] 19 | AcceptedCanceled, 20 | } 21 | -------------------------------------------------------------------------------- /src/v2_1/enumerations/vpn.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Type of VPN 4 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 5 | pub enum VPNEnumType { 6 | #[serde(rename = "IKEv2")] 7 | IKEv2, 8 | #[serde(rename = "IPSec")] 9 | IPSec, 10 | #[serde(rename = "L2TP")] 11 | L2TP, 12 | #[serde(rename = "PPTP")] 13 | PPTP, 14 | } 15 | -------------------------------------------------------------------------------- /src/v2_1/helpers/datetime_rfc3339.rs: -------------------------------------------------------------------------------- 1 | use chrono::{DateTime, SecondsFormat, Utc}; 2 | use serde::{Deserialize, Deserializer, Serializer}; 3 | pub fn serialize(date: &DateTime, serializer: S) -> Result 4 | where 5 | S: Serializer, 6 | { 7 | serializer.serialize_str(&date.to_rfc3339_opts(SecondsFormat::Millis, true)) 8 | } 9 | 10 | pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> 11 | where 12 | D: Deserializer<'de>, 13 | { 14 | let s: String = Deserialize::deserialize(deserializer)?; 15 | DateTime::parse_from_rfc3339(&s) 16 | .map(|dt| dt.with_timezone(&Utc)) 17 | .map_err(serde::de::Error::custom) 18 | } 19 | -------------------------------------------------------------------------------- /src/v2_1/helpers/mod.rs: -------------------------------------------------------------------------------- 1 | /// validators 2 | pub mod validator; 3 | 4 | /// serializers 5 | pub mod datetime_rfc3339; 6 | -------------------------------------------------------------------------------- /src/v2_1/messages/notify_report.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/v2_1/mod.rs: -------------------------------------------------------------------------------- 1 | //! # Implementation of the OCPP 2.0.1 Specification 2 | //! 3 | //! ## Messages, Datatypes & Enumerations 4 | //! 5 | //! The following modules implements all messages, datatypes and enumerations 6 | //! of the ocpp 2.1 specification 7 | //! 8 | 9 | /// datatypes 10 | pub mod datatypes; 11 | 12 | /// enumerations 13 | pub mod enumerations; 14 | 15 | /// messages 16 | pub mod messages; 17 | 18 | /// helper functions 19 | pub mod helpers; 20 | --------------------------------------------------------------------------------