pub struct ReadDeviceIdentificationRequest {
pub device_id_code: DeviceIdCode,
pub object_id: u8,
}Expand description
FC 0x2B / MEI 0x0E — Read Device Identification request.
Spec V1.1b3 §6.21. Wire format: FC(1) + MEI(1) + DevIdCode(1) + ObjectId(1).
Fields§
§device_id_code: DeviceIdCodeAccess code: basic (0x01), regular (0x02), extended (0x03), or individual (0x04).
object_id: u8First object ID to read (0x00 for stream access from the beginning).
Implementations§
Source§impl ReadDeviceIdentificationRequest
impl ReadDeviceIdentificationRequest
Sourcepub fn decode(data: &[u8]) -> Result<Self, DecodeError>
pub fn decode(data: &[u8]) -> Result<Self, DecodeError>
Decode from the data bytes following the function code.
The data slice starts at the MEI type byte (FC byte already consumed).
§Errors
Returns DecodeError::Truncated if data is too short.
Returns DecodeError::LengthMismatch if data has extra bytes.
Returns DecodeError::UnknownMeiType if MEI type is not 0x0E.
Returns DecodeError::InvalidDeviceIdCode if the access code is unrecognized.
Trait Implementations§
Source§impl Clone for ReadDeviceIdentificationRequest
impl Clone for ReadDeviceIdentificationRequest
Source§fn clone(&self) -> ReadDeviceIdentificationRequest
fn clone(&self) -> ReadDeviceIdentificationRequest
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 moreimpl Copy for ReadDeviceIdentificationRequest
Source§impl Encode for ReadDeviceIdentificationRequest
impl Encode for ReadDeviceIdentificationRequest
Source§fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Write the full PDU (function code + data) into
buf. Read moreSource§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Total encoded length in bytes (including the function code byte).
impl Eq for ReadDeviceIdentificationRequest
Source§impl PartialEq for ReadDeviceIdentificationRequest
impl PartialEq for ReadDeviceIdentificationRequest
Source§fn eq(&self, other: &ReadDeviceIdentificationRequest) -> bool
fn eq(&self, other: &ReadDeviceIdentificationRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReadDeviceIdentificationRequest
Auto Trait Implementations§
impl Freeze for ReadDeviceIdentificationRequest
impl RefUnwindSafe for ReadDeviceIdentificationRequest
impl Send for ReadDeviceIdentificationRequest
impl Sync for ReadDeviceIdentificationRequest
impl Unpin for ReadDeviceIdentificationRequest
impl UnsafeUnpin for ReadDeviceIdentificationRequest
impl UnwindSafe for ReadDeviceIdentificationRequest
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