#[non_exhaustive]pub enum MessageKind {
Show 36 variants
Handshake,
HandshakeResponse,
ResourceManagerDetails,
SelectControlType,
SessionRequest,
ReceptionStatus,
InstructionStatusUpdate,
PowerMeasurement,
PowerForecast,
RevokeObject,
PebcPowerConstraints,
PebcEnergyConstraint,
PebcInstruction,
PpbcPowerProfileDefinition,
PpbcPowerProfileStatus,
PpbcScheduleInstruction,
PpbcStartInterruptionInstruction,
PpbcEndInterruptionInstruction,
OmbcSystemDescription,
OmbcStatus,
OmbcTimerStatus,
OmbcInstruction,
FrbcSystemDescription,
FrbcStorageStatus,
FrbcActuatorStatus,
FrbcTimerStatus,
FrbcLeakageBehaviour,
FrbcUsageForecast,
FrbcFillLevelTargetProfile,
FrbcInstruction,
DdbcSystemDescription,
DdbcActuatorStatus,
DdbcTimerStatus,
DdbcAverageDemandRateForecast,
DdbcPresentDemandStatus,
DdbcInstruction,
}Expand description
Every S2 message type, without the payload.
MessageKind is Copy and fieldless, which is what makes the session’s
allowed-message table a lookup rather than a match over 36 arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Handshake
HandshakeResponse
ResourceManagerDetails
SelectControlType
SessionRequest
ReceptionStatus
InstructionStatusUpdate
PowerMeasurement
PowerForecast
RevokeObject
PebcPowerConstraints
PebcEnergyConstraint
PebcInstruction
PpbcPowerProfileDefinition
PpbcPowerProfileStatus
PpbcScheduleInstruction
PpbcStartInterruptionInstruction
PpbcEndInterruptionInstruction
OmbcSystemDescription
OmbcStatus
OmbcTimerStatus
OmbcInstruction
FrbcSystemDescription
FrbcStorageStatus
FrbcActuatorStatus
FrbcTimerStatus
FrbcLeakageBehaviour
FrbcUsageForecast
FrbcFillLevelTargetProfile
FrbcInstruction
DdbcSystemDescription
DdbcActuatorStatus
DdbcTimerStatus
DdbcAverageDemandRateForecast
DdbcPresentDemandStatus
DdbcInstruction
Implementations§
Source§impl MessageKind
impl MessageKind
Sourcepub const ALL: &'static [MessageKind]
pub const ALL: &'static [MessageKind]
Every message type this crate knows, in declaration order.
Source§impl MessageKind
impl MessageKind
Sourcepub const fn control_type(self) -> Option<ControlType>
pub const fn control_type(self) -> Option<ControlType>
The control type this message belongs to, if any.
Sourcepub const fn is_instruction(self) -> bool
pub const fn is_instruction(self) -> bool
Whether this message asks a Resource Manager to do something, and therefore earns
an InstructionStatusUpdate as well as a ReceptionStatus.
Sourcepub const fn sender(self) -> Option<EnergyManagementRole>
pub const fn sender(self) -> Option<EnergyManagementRole>
Which role sends this message.
SessionRequest and ReceptionStatus are sent by both, and so answer None.
Sourcepub const fn exists_in(self, profile: WireProfile) -> bool
pub const fn exists_in(self, profile: WireProfile) -> bool
Whether the message exists in a given wire profile.
Only DDBC.PresentDemandStatus answers false for anything: it is new in
v1.0.0.
Trait Implementations§
Source§impl Clone for MessageKind
impl Clone for MessageKind
impl Copy for MessageKind
Source§impl Debug for MessageKind
impl Debug for MessageKind
Source§impl Display for MessageKind
impl Display for MessageKind
impl Eq for MessageKind
Source§impl Hash for MessageKind
impl Hash for MessageKind
Source§impl Ord for MessageKind
impl Ord for MessageKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MessageKind
impl PartialEq for MessageKind
Source§impl PartialOrd for MessageKind
impl PartialOrd for MessageKind
impl StructuralPartialEq for MessageKind
Auto Trait Implementations§
impl Forget for MessageKind
impl Freeze for MessageKind
impl Move for MessageKind
impl RefUnwindSafe for MessageKind
impl Send for MessageKind
impl Sync for MessageKind
impl Unpin for MessageKind
impl UnsafeUnpin for MessageKind
impl UnwindSafe for MessageKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.