Struct echonet_lite::ElPacket [−][src]
pub struct ElPacket { pub seoj: EchonetObject, pub deoj: EchonetObject, pub esv: ServiceCode, pub props: Properties, // some fields omitted }
Expand description
An ECHONET Lite packet representation.
ECHONET Lite SPEC shows an ECHONET Lite packet contains
- EHD1: ECHONET Lite message header1 (1-byte)
- EHD2: ECHONET Lite message header2 (1-byte)
- SEOJ: Source ECHONET Lite object specification (3-byte)
- DEOJ: Destination ECHONET Lite object specification (3-byte)
- ESV: ECHONET Lite service
- OPC: Number of processing properties
- (EPC, PDC, EDT) * OPC
Fields
seoj: EchonetObject
deoj: EchonetObject
esv: ServiceCode
props: Properties
Implementations
Serializes an ECHONET Lite packet into byte array.
Deserializes an ECHONET Lite packet from byte array.
Returns whether self
is a response for the req
.
Creates a new response for itself.
esv
must be one of response service code.
props
contains all response properties.
The created response packet has the same transaction ID as original packet. The source and the destination are reversed.
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for ElPacket
impl UnwindSafe for ElPacket
Blanket Implementations
Mutably borrows from an owned value. Read more