Struct Model1

Source
pub struct Model1 {
    pub mn: String,
    pub md: String,
    pub opt: Option<String>,
    pub vr: Option<String>,
    pub sn: String,
    pub da: Option<u16>,
}
Expand description

Common

All SunSpec compliant devices must include this as the first model

Fields§

§mn: String

Manufacturer

Well known value registered with SunSpec for compliance

§md: String

Model

Manufacturer specific value (32 chars)

§opt: Option<String>

Options

Manufacturer specific value (16 chars)

§vr: Option<String>

Version

Manufacturer specific value (16 chars)

§sn: String

Serial Number

Manufacturer specific value (32 chars)

§da: Option<u16>

Device Address

Modbus device address

Detail: This point is mandatory for all SunSpec RTU devices and, for those devices, they must support values from 1-247.

Implementations§

Source§

impl Model1

Source

pub const MN: Point<Self, String>

Source

pub const MD: Point<Self, String>

Source

pub const OPT: Point<Self, Option<String>>

Source

pub const VR: Point<Self, Option<String>>

Source

pub const SN: Point<Self, String>

Source

pub const DA: Point<Self, Option<u16>>

Trait Implementations§

Source§

impl Debug for Model1

Source§

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

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

impl Model for Model1

Source§

const ID: u16 = 1u16

Model ID
Source§

fn from_data(data: &[u16]) -> Result<Self, DecodeError>

Parse model points from a given u16 slice
Source§

fn addr(models: &Models) -> ModelAddr<Self>

Get model address from discovered models struct

Auto Trait Implementations§

§

impl Freeze for Model1

§

impl RefUnwindSafe for Model1

§

impl Send for Model1

§

impl Sync for Model1

§

impl Unpin for Model1

§

impl UnwindSafe for Model1

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.