pub struct GenericDeviceLocator {
pub record_key: GenericDeviceRecordKey,
pub address_span: u8,
pub device_type: u8,
pub device_type_modifier: u8,
pub entity_id: u8,
pub entity_instance: u8,
pub oem_reserved: u8,
pub id_string: SensorId,
}Expand description
Generic Device Locator Record (SDR Type 10h).
This record is used to store the location and type information for devices on the IPMB or management controller private busses that are neither IPMI FRU devices nor IPMI management controllers.
Reference: IPMI 2.0 Specification, Section 43.7 and Table 43-6
Fields§
§record_key: GenericDeviceRecordKeyRecord key data.
address_span: u8Address span (number of addresses device occupies - 1).
device_type: u8Device Type code per IPMI Device Type Codes table.
Reference: IPMI 2.0 Specification, Table 43-12 “Device Type Codes”
device_type_modifier: u8Device Type Modifier.
Reference: IPMI 2.0 Specification, Table 43-6
entity_id: u8Entity ID for the device.
Reference: IPMI 2.0 Specification, Table 43-13 “Entity ID Codes”
entity_instance: u8Entity Instance.
Note: The IPMI spec only labels this as “Entity Instance” (Table 43-6)
without the sensor SDR bit layout, so we keep it as a raw u8.
oem_reserved: u8OEM reserved field.
id_string: SensorIdDevice ID string.
Implementations§
Source§impl GenericDeviceLocator
impl GenericDeviceLocator
Sourcepub fn parse(record_data: &[u8]) -> Result<GenericDeviceLocator, ParseError>
pub fn parse(record_data: &[u8]) -> Result<GenericDeviceLocator, ParseError>
Parse a Generic Device Locator Record from raw SDR record data.
The record data layout is defined in IPMI 2.0 Specification, Table 43-6. Offsets below are relative to the record data payload (table bytes 6+).
| Offset | Field |
|---|---|
| 0 | Device Access Address [7:1], [0] reserved |
| 1 | Device Slave Address, channel ms-bit in [0] |
| 2 | [7:5] Channel Number (ls-3 bits), [4:3] Access LUN, [2:0] Private Bus ID |
| 3 | [7:3] reserved, [2:0] Address Span |
| 4 | Reserved |
| 5 | Device Type (Table 43-12) |
| 6 | Device Type Modifier (Table 43-12) |
| 7 | Entity ID (Table 43-13) |
| 8 | Entity Instance |
| 9 | OEM |
| 10 | Device ID String Type/Length |
| 11+ | Device ID String bytes |
pub fn id_string(&self) -> &SensorId
Trait Implementations§
Source§impl Clone for GenericDeviceLocator
impl Clone for GenericDeviceLocator
Source§fn clone(&self) -> GenericDeviceLocator
fn clone(&self) -> GenericDeviceLocator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more