Skip to main content

TupelEntry

Struct TupelEntry 

Source
pub struct TupelEntry<'a> {
    pub server_id: ServerId<'a>,
    pub sec_index: Time,
    pub status: u64,
    pub a_plus: Register,
    pub r1: Register,
    pub r4: Register,
    pub signature_a_plus: &'a [u8],
    pub a_minus: Register,
    pub r2: Register,
    pub r3: Register,
    pub signature_a_minus: &'a [u8],
}
Expand description

SML_TupelEntry: a signed set of registers (A+, R1, R4 and A−, R2, R3). 23 fields on the wire.

Fields§

§server_id: ServerId<'a>

The device.

§sec_index: Time

When the registers were captured.

§status: u64

Device status bits.

§a_plus: Register

Active energy import (A+).

§r1: Register

Reactive energy, quadrant I (R1).

§r4: Register

Reactive energy, quadrant IV (R4).

§signature_a_plus: &'a [u8]

Signature over A+, R1 and R4. Not verified by this crate.

§a_minus: Register

Active energy export (A−).

§r2: Register

Reactive energy, quadrant II (R2).

§r3: Register

Reactive energy, quadrant III (R3).

§signature_a_minus: &'a [u8]

Signature over A−, R2 and R3. Not verified by this crate.

Implementations§

Source§

impl<'a> TupelEntry<'a>

Source

pub fn write(&self, w: &mut Writer<'_>) -> Result<()>

Write the entry, every register in its fixed wire width.

Trait Implementations§

Source§

impl<'a> Clone for TupelEntry<'a>

Source§

fn clone(&self) -> Self

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<'a> Copy for TupelEntry<'a>

Source§

impl<'a> Debug for TupelEntry<'a>

Source§

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

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

impl<'a> Eq for TupelEntry<'a>

Source§

impl<'a> Hash for TupelEntry<'a>

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<'a> PartialEq for TupelEntry<'a>

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for TupelEntry<'a>

Auto Trait Implementations§

§

impl<'a> Forget for TupelEntry<'a>

§

impl<'a> Freeze for TupelEntry<'a>
where &'a [u8]: Freeze,

§

impl<'a> Move for TupelEntry<'a>

§

impl<'a> RefUnwindSafe for TupelEntry<'a>

§

impl<'a> Send for TupelEntry<'a>
where &'a [u8]: Send,

§

impl<'a> Sync for TupelEntry<'a>

§

impl<'a> Unpin for TupelEntry<'a>
where &'a [u8]: Unpin,

§

impl<'a> UnsafeUnpin for TupelEntry<'a>
where &'a [u8]: UnsafeUnpin,

§

impl<'a> UnwindSafe for TupelEntry<'a>
where &'a [u8]: UnwindSafe,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.