Struct resol_vbus::PacketFieldSpec
[−]
[src]
pub struct PacketFieldSpec { pub field_id: String, pub packet_field_id: String, pub name: String, pub unit_id: UnitId, pub unit_family: UnitFamily, pub unit_code: String, pub unit_text: String, pub precision: i32, pub typ: Type, pub parts: Vec<PacketTemplateFieldPart>, }
Contains information about a VBus packet field.
Fields
field_id: String
A field identifier.
packet_field_id: String
A packet-field identifier.
name: String
The name of the field.
unit_id: UnitId
The UnitId
of the field.
unit_family: UnitFamily
The UnitFamily
of the field.
unit_code: String
The unit code of the field.
unit_text: String
The unit text of the field.
precision: i32
The precision of the field.
typ: Type
The Type
of the field.
parts: Vec<PacketTemplateFieldPart>
The parts the field consists of.
Methods
impl PacketFieldSpec
[src]
fn get_raw_value_i64(&self, buf: &[u8]) -> Option<i64>
Construct an i64
raw value from a slice of bytes.
fn get_raw_value_f64(&self, buf: &[u8]) -> Option<f64>
Construct a f64
raw value from a slice of bytes.
fn fmt_raw_value<'a>(
&'a self,
raw_value: Option<f64>,
append_unit: bool
) -> PacketFieldFormatter<'a>
&'a self,
raw_value: Option<f64>,
append_unit: bool
) -> PacketFieldFormatter<'a>
Format a raw value into its textual representation.
Trait Implementations
impl Debug for PacketFieldSpec
[src]
impl PartialEq for PacketFieldSpec
[src]
fn eq(&self, __arg_0: &PacketFieldSpec) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PacketFieldSpec) -> bool
This method tests for !=
.