pub struct EnumerateResponse {
    pub uid: String,
    pub connected_uid: String,
    pub position: char,
    pub hardware_version: [u8; 3],
    pub firmware_version: [u8; 3],
    pub device_identifier: u16,
    pub enumeration_type: EnumerationType,
}
Expand description

Devices send EnumerateResponses when they are connected, disconnected or when an enumeration was triggered by the user using the Enumerate method.

Fields

uid: String

The UID of the device.

connected_uid: String

UID where the device is connected to. For a Bricklet this will be a UID of the Brick where it is connected to. For a Brick it will be the UID of the bottom Master Brick in the stack. For the bottom Master Brick in a stack this will be “0”. With this information it is possible to reconstruct the complete network topology.

position: char

For Bricks: ‘0’ - ‘8’ (position in stack). For Bricklets: ‘a’ - ‘d’ (position on Brick).

hardware_version: [u8; 3]

Major, minor and release number for hardware version.

firmware_version: [u8; 3]

Major, minor and release number for firmware version.

device_identifier: u16

A number that represents the device. The device identifier numbers can be found here. There are also constants for these numbers named following this pattern:

.DEVICE_IDENTIFIER

For example: MasterBrick.DEVICE_IDENTIFIER or AmbientLightBricklet.DEVICE_IDENTIFIER.

enumeration_type: EnumerationType

Type of enumeration. See EnumerationType

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize the implementing type from a byte slice.
Returns how many bytes are expected to deserialize a instance of the implementing type. Currently this method is only used for strings.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.