pub struct ActivityCalendar {
logical_name: ObisCode,
calendar_name_active: Vec<u8>,
season_profile_active: Vec<SeasonProfile>,
week_profile_table_active: Vec<WeekProfile>,
day_profile_table_active: Vec<DayProfile>,
calendar_name_passive: Vec<u8>,
season_profile_passive: Vec<SeasonProfile>,
week_profile_table_passive: Vec<WeekProfile>,
day_profile_table_passive: Vec<DayProfile>,
activate_passive_calendar_time: Vec<u8>,
}Expand description
Activity calendar interface class (class_id = 20, version = 0) per
IEC 62056-6-2 §4.5.5. Defines the tariff schedule as an active calendar and a
passive calendar that replaces it when activated.
Fields§
§logical_name: ObisCode§calendar_name_active: Vec<u8>§season_profile_active: Vec<SeasonProfile>§week_profile_table_active: Vec<WeekProfile>§day_profile_table_active: Vec<DayProfile>§calendar_name_passive: Vec<u8>§season_profile_passive: Vec<SeasonProfile>§week_profile_table_passive: Vec<WeekProfile>§day_profile_table_passive: Vec<DayProfile>§activate_passive_calendar_time: Vec<u8>Implementations§
Source§impl ActivityCalendar
impl ActivityCalendar
Sourcepub fn new(config: ActivityCalendarConfig) -> Self
pub fn new(config: ActivityCalendarConfig) -> Self
Builds a new ActivityCalendar from its configuration.
Sourcefn activate_passive_calendar(&mut self) -> CosemDataType
fn activate_passive_calendar(&mut self) -> CosemDataType
Method 1: activate_passive_calendar — copies the passive calendar over
the active one, making it effective immediately (IEC 62056-6-2 §4.5.5.3).
Trait Implementations§
Source§impl Clone for ActivityCalendar
impl Clone for ActivityCalendar
Source§fn clone(&self) -> ActivityCalendar
fn clone(&self) -> ActivityCalendar
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActivityCalendar
impl Debug for ActivityCalendar
Source§impl<'de> Deserialize<'de> for ActivityCalendar
impl<'de> Deserialize<'de> for ActivityCalendar
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 InterfaceClass for ActivityCalendar
impl InterfaceClass for ActivityCalendar
Source§fn logical_name(&self) -> &ObisCode
fn logical_name(&self) -> &ObisCode
Returns the object’s logical name (OBIS code).
Source§fn attributes(&self) -> Vec<(u8, CosemDataType)>
fn attributes(&self) -> Vec<(u8, CosemDataType)>
Returns the class attributes as
(attribute_id, value) pairs.Source§fn serialize_ber(&self, buf: &mut Vec<u8>) -> Result<(), BerError>
fn serialize_ber(&self, buf: &mut Vec<u8>) -> Result<(), BerError>
Serializes the object into BER. Read more
Source§fn deserialize_ber(&mut self, data: &[u8]) -> Result<(), BerError>
fn deserialize_ber(&mut self, data: &[u8]) -> Result<(), BerError>
Deserializes the object from BER data. Read more
Source§fn set_attribute(
&mut self,
attribute_id: u8,
value: CosemDataType,
) -> Result<(), String>
fn set_attribute( &mut self, attribute_id: u8, value: CosemDataType, ) -> Result<(), String>
Writes the value of a writable attribute. The default implementation
rejects the write; classes with writable attributes override it. Read more
Source§fn invoke_method(
&mut self,
method_id: u8,
_params: Option<CosemDataType>,
) -> Result<CosemDataType, String>
fn invoke_method( &mut self, method_id: u8, _params: Option<CosemDataType>, ) -> Result<CosemDataType, String>
Invokes the object method with the given id. Read more
Auto Trait Implementations§
impl Freeze for ActivityCalendar
impl RefUnwindSafe for ActivityCalendar
impl Send for ActivityCalendar
impl Sync for ActivityCalendar
impl Unpin for ActivityCalendar
impl UnsafeUnpin for ActivityCalendar
impl UnwindSafe for ActivityCalendar
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