ipmi_rs/storage/sdr/
mod.rs1mod get_dev_sdr_info;
2pub use get_dev_sdr_info::*;
3
4mod get_sdr;
5pub use get_sdr::{GetDeviceSdr, RecordInfo as SdrRecordInfo, *};
6
7pub mod record;
8pub use record::{ParseError as RecordParseError, Record};
9
10mod get_info;
11pub use get_info::{
12 FreeSpace as SdrFreeSpace, GetRepositoryInfo as GetSdrRepositoryInfo,
13 Operation as SdrOperation, RepositoryInfo as SdrRepositoryInfo,
14};
15
16mod get_alloc_info;
17pub use get_alloc_info::{AllocInfo, GetAllocInfo as GetSdrAllocInfo};
18
19pub mod event_reading_type_code;
20
21mod sensor_type;
22pub use sensor_type::SensorType;
23
24mod units;
25pub use units::Unit;
26
27#[derive(Debug, Copy, Clone, PartialEq)]
28pub struct RecordId(u16);
29
30impl RecordId {
31 pub const FIRST: Self = Self(0);
32 pub const LAST: Self = Self(0xFFFF);
33
34 pub fn new_raw(value: u16) -> Self {
35 Self(value)
36 }
37
38 pub fn is_first(&self) -> bool {
39 self.0 == Self::FIRST.0
40 }
41
42 pub fn is_last(&self) -> bool {
43 self.0 == Self::LAST.0
44 }
45
46 pub fn value(&self) -> u16 {
47 self.0
48 }
49}