pub struct EventJournal {
logical_name: ObisCode,
entries: Vec<(Vec<u8>, u16)>,
}Expand description
An ИВКЭ event journal (§10.13), following ГОСТ Р 58940-2020: each entry is a timestamp and an event code, captured by a Clock and an event register.
Fields§
§logical_name: ObisCode§entries: Vec<(Vec<u8>, u16)>Implementations§
Source§impl EventJournal
impl EventJournal
Sourcepub fn new(logical_name: ObisCode) -> Self
pub fn new(logical_name: ObisCode) -> Self
Creates an empty event journal with the given OBIS (one of the §10.13
codes, e.g. obis::access_control_log).
Sourcepub fn log(&mut self, timestamp: Vec<u8>, code: u16)
pub fn log(&mut self, timestamp: Vec<u8>, code: u16)
Logs an event: timestamp (date-time octets) and its code.
Sourcepub fn build(&self) -> ProfileGeneric
pub fn build(&self) -> ProfileGeneric
Builds the COSEM ProfileGeneric (IC 7, v1) journal object.
Trait Implementations§
Source§impl Clone for EventJournal
impl Clone for EventJournal
Source§fn clone(&self) -> EventJournal
fn clone(&self) -> EventJournal
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 moreAuto Trait Implementations§
impl Freeze for EventJournal
impl RefUnwindSafe for EventJournal
impl Send for EventJournal
impl Sync for EventJournal
impl Unpin for EventJournal
impl UnsafeUnpin for EventJournal
impl UnwindSafe for EventJournal
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