Skip to main content

ReadDeviceIdentificationResponse

Struct ReadDeviceIdentificationResponse 

Source
pub struct ReadDeviceIdentificationResponse<'buf> {
    pub device_id_code: DeviceIdCode,
    pub conformity_level: u8,
    pub more_follows: bool,
    pub next_object_id: u8,
    pub num_objects: u8,
    pub object_data: &'buf [u8],
}
Expand description

FC 0x2B / MEI 0x0E — Read Device Identification response.

Spec V1.1b3 §6.21. Object data is borrowed from the source buffer. Use objects to iterate over individual entries.

Fields§

§device_id_code: DeviceIdCode

The access code that was requested.

§conformity_level: u8

Conformity level of the device.

§more_follows: bool

If true, more objects follow — send another request with next_object_id.

§next_object_id: u8

Next object ID to request if more_follows is true.

§num_objects: u8

Number of object entries in this response.

§object_data: &'buf [u8]

Raw object data bytes (packed: [obj_id, obj_len, value...] repeated).

Implementations§

Source§

impl<'buf> ReadDeviceIdentificationResponse<'buf>

Source

pub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>

Decode from the data bytes following the function code.

§Errors

Returns DecodeError if the data is malformed.

Source

pub fn objects(&self) -> DeviceIdObjectIter<'buf>

Iterate over the identification objects in this response.

Trait Implementations§

Source§

impl<'buf> Debug for ReadDeviceIdentificationResponse<'buf>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.