pub struct StateResidency {
pub entity_index: Option<i32>,
pub state_index: Option<i32>,
pub total_time_in_state_ms: Option<u64>,
pub total_state_entry_count: Option<u64>,
pub last_entry_timestamp_ms: Option<u64>,
}
Fields§
§entity_index: Option<i32>
Index corresponding to PowerEntityState.entity_index
state_index: Option<i32>
Index corresponding to PowerEntityState.state_index
total_time_in_state_ms: Option<u64>
Time since boot that this entity has been in this state
total_state_entry_count: Option<u64>
Total number of times since boot that the entity has entered this state
last_entry_timestamp_ms: Option<u64>
Timestamp of the last time the entity entered this state
Implementations§
Source§impl StateResidency
impl StateResidency
Sourcepub fn entity_index(&self) -> i32
pub fn entity_index(&self) -> i32
Returns the value of entity_index
, or the default value if entity_index
is unset.
Sourcepub fn state_index(&self) -> i32
pub fn state_index(&self) -> i32
Returns the value of state_index
, or the default value if state_index
is unset.
Sourcepub fn total_time_in_state_ms(&self) -> u64
pub fn total_time_in_state_ms(&self) -> u64
Returns the value of total_time_in_state_ms
, or the default value if total_time_in_state_ms
is unset.
Sourcepub fn total_state_entry_count(&self) -> u64
pub fn total_state_entry_count(&self) -> u64
Returns the value of total_state_entry_count
, or the default value if total_state_entry_count
is unset.
Sourcepub fn last_entry_timestamp_ms(&self) -> u64
pub fn last_entry_timestamp_ms(&self) -> u64
Returns the value of last_entry_timestamp_ms
, or the default value if last_entry_timestamp_ms
is unset.
Trait Implementations§
Source§impl Clone for StateResidency
impl Clone for StateResidency
Source§fn clone(&self) -> StateResidency
fn clone(&self) -> StateResidency
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StateResidency
impl Debug for StateResidency
Source§impl Default for StateResidency
impl Default for StateResidency
Source§impl Message for StateResidency
impl Message for StateResidency
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.