Skip to main content

ReasonCode

Enum ReasonCode 

Source
pub enum ReasonCode {
Show 62 variants DuplicateProfile, InvalidProfile, InvalidProfileId, InvalidSchedule, InvalidStackLevel, InvalidOperationMode, NoFreqWattCurve, NoPhaseForDC, PhaseConflict, NoSignalWattCurve, RateLimitExceeded, UnsupportedKind, UnsupportedPurpose, UnsupportedRateUnit, CSNotAccepted, FixedCable, NoCable, UnknownConnectorId, UnknownConnectorType, UnknownEvse, BatterySoHLow, BatterySoC, BatteryDamaged, BatteryUnknown, BatteryType, NoBatteryAvailable, PriorityNetworkConf, InvalidConfSlot, InvalidNetworkConf, NoSecurityDowngrade, DuplicateRequestId, InvalidMessageSeq, MissingDevModelInfo, NoError, NotFound, Unspecified, UnsupportedRequest, FwUpdateInProgress, NotEnabled, ReadOnly, WriteOnly, InvalidCSR, InvalidCertificate, InvalidURL, RedirectNotAllowed, InternalError, OutOfMemory, OutOfStorage, InvalidIdToken, TxInProgress, TxNotFound, TxStarted, InvalidValue, MissingParam, TooLargeElement, TooManyElements, UnsupportedParam, ValueOutOfRange, ValuePositiveOnly, ValueTooHigh, ValueTooLow, ValueZeroNotAllowed,
}
Expand description

Standardized StatusInfo.reasonCode values.

A closed set: it holds only the values the specification defines. The wire field is a string, so a deployment can still send something else – from_wire returns None for that, which is not by itself a protocol error.

Variants§

§

DuplicateProfile

A charging profile with same stackLevel - chargingProfilePurpose combination already exists on the Charging Station and has an overlapping validity period.

Spec group: Charging Profiles.

§

InvalidProfile

Provided chargingProfile contains invalid elements.

Spec group: Charging Profiles.

§

InvalidProfileId

Provided chargingProfile has an id that is within an invalid range.

Spec group: Charging Profiles.

§

InvalidSchedule

Provided chargingSchedule contains invalid elements.

Spec group: Charging Profiles.

§

InvalidStackLevel

Provided value for stackLevel is invalid.

Spec group: Charging Profiles.

§

InvalidOperationMode

Provided operationMode is invalid for this chargingProfilePurpose

Spec group: Charging Profiles.

§

NoFreqWattCurve

A frequency-watt curve is missing in a charging schedule period with operation mode = LocalFrequency.

Spec group: Charging Profiles.

§

NoPhaseForDC

Phase selection for a DC EVSE is not supported

Spec group: Charging Profiles.

§

PhaseConflict

Phase conflict between applicable charging profiles

Spec group: Charging Profiles.

§

NoSignalWattCurve

A signal-watt curve is missing in a charging schedule period when an AFRRSignalRequest is received.

Spec group: Charging Profiles.

§

RateLimitExceeded

A charging profile of the same purpose is submitted too frequently

Spec group: Charging Profiles.

§

UnsupportedKind

The requested charging profile kind is not supported

Spec group: Charging Profiles.

§

UnsupportedPurpose

The requested charging profile purpose is not supported

Spec group: Charging Profiles.

§

UnsupportedRateUnit

A chargingRateUnit is provided that is not supported.

Spec group: Charging Profiles.

§

CSNotAccepted

BootNotification of Charging Station has not (yet) been accepted by CSMS.

Spec group: Charging Station.

§

FixedCable

The connector has its own fixed cable that cannot be unlocked.

Spec group: Charging Station.

§

NoCable

No cable is connected at this time.

Spec group: Charging Station.

§

UnknownConnectorId

Connector Id is not known on EVSE

Spec group: Charging Station.

§

UnknownConnectorType

Connector type is not known on EVSE

Spec group: Charging Station.

§

UnknownEvse

EVSE is not known on Charging Stations

Spec group: Charging Station.

§

BatterySoHLow

Battery State of Health is too low

Spec group: Swap Station.

§

BatterySoC

Battery State of Charge has unacceptable value

Spec group: Swap Station.

§

BatteryDamaged

Battery is damaged

Spec group: Swap Station.

§

BatteryUnknown

Battery has unknown serial number

Spec group: Swap Station.

§

BatteryType

Battery type not accepted

Spec group: Swap Station.

§

NoBatteryAvailable

No battery available for swapping

Spec group: Swap Station.

§

PriorityNetworkConf

A network configuration variable of an NetworkConfiguration instance present in NetworkConfigurationPriority is not allowed to be changed

Spec group: Network Configuration.

§

InvalidConfSlot

A value for configurationSlot is used that is not present in NetworkConfigurationPriority.valuesList

Spec group: Network Configuration.

§

InvalidNetworkConf

Some values in NetworkConfiguration instance are invalid

Spec group: Network Configuration.

§

NoSecurityDowngrade

Security profile downgrade is not allowed

Spec group: Network Configuration.

§

DuplicateRequestId

A requestId is provided, that has already been used for this type of request.

Spec group: Miscellaneous.

§

InvalidMessageSeq

Message should not be sent at this moment in current scenario.

Spec group: Miscellaneous.

§

MissingDevModelInfo

Information needed for operation is missing from Device Model

Spec group: Miscellaneous.

§

NoError

No error has occurred, but some extra information is in additionalInfo .

Spec group: Miscellaneous.

§

NotFound

No object(s) found that match a provided ID or criteria.

Spec group: Miscellaneous.

§

Unspecified

No reason is specified, but some extra information is in additionalInfo

Spec group: Miscellaneous.

§

UnsupportedRequest

This request is not supported.

Spec group: Miscellaneous.

§

FwUpdateInProgress

Operation is not possible, because a firmware update is in progress.

Spec group: Operations and Permissions.

§

NotEnabled

Feature is not enabled.

Spec group: Operations and Permissions.

§

ReadOnly

Targeted variable is read-only and cannot be set.

Spec group: Operations and Permissions.

§

WriteOnly

Targeted variable is write-only and cannot be read.

Spec group: Operations and Permissions.

§

InvalidCSR

Provided CSR is invalid

Spec group: Security.

§

InvalidCertificate

Provided certificate is invalid.

Spec group: Security.

§

InvalidURL

Provided URL is invalid.

Spec group: Security.

§

RedirectNotAllowed

HTTP Redirection is not allowed

Spec group: Security.

§

InternalError

Operation cannot be completed due to an internal error.

Spec group: System Errors.

§

OutOfMemory

Operation not possible, because system does not have enough memory.

Spec group: System Errors.

§

OutOfStorage

Operation not possible, because system does not have enough storage.

Spec group: System Errors.

§

InvalidIdToken

Provided idToken is not valid.

Spec group: Transactions.

§

TxInProgress

A transaction is in progress.

Spec group: Transactions.

§

TxNotFound

There is no such transaction.

Spec group: Transactions.

§

TxStarted

A transaction had already started (e.g. due to cable being plugged in).

Spec group: Transactions.

§

InvalidValue

An invalid value has been provided.

Spec group: Values and Ranges.

§

MissingParam

A parameter that is required for the request is missing.

Spec group: Values and Ranges.

§

TooLargeElement

Provided element is too large to handle.

Spec group: Values and Ranges.

§

TooManyElements

Too many elements have been provided.

Spec group: Values and Ranges.

§

UnsupportedParam

A parameter was provided that is not supported.

Spec group: Values and Ranges.

§

ValueOutOfRange

Provided value is out of range.

Spec group: Values and Ranges.

§

ValuePositiveOnly

Provided value is not greater than zero.

Spec group: Values and Ranges.

§

ValueTooHigh

Provided value is too high.

Spec group: Values and Ranges.

§

ValueTooLow

Provided value is too low.

Spec group: Values and Ranges.

§

ValueZeroNotAllowed

Provided value cannot be zero.

Spec group: Values and Ranges.

Implementations§

Source§

impl ReasonCode

Source

pub const ALL: &'static [Self]

Every value this version’s specification defines (62), in spec order.

Source

pub const fn as_str(&self) -> &'static str

This value as it appears on the wire.

Source

pub fn from_wire(value: &str) -> Option<Self>

Parses a wire value, returning None for values the specification doesn’t define (e.g. a vendor’s own).

Source

pub const fn typically_used_for(&self) -> Option<&'static str>

The message(s) the spec expects this reason code on.

Trait Implementations§

Source§

impl Clone for ReasonCode

Source§

fn clone(&self) -> ReasonCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ReasonCode

Source§

impl Debug for ReasonCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReasonCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ReasonCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ReasonCode

Source§

impl FromStr for ReasonCode

Source§

type Err = UnknownValue

The associated error which can be returned from parsing.
Source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for ReasonCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ReasonCode

Source§

fn cmp(&self, other: &ReasonCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ReasonCode

Source§

fn eq(&self, other: &ReasonCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ReasonCode

Source§

fn partial_cmp(&self, other: &ReasonCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for ReasonCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ReasonCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.