pub struct V2ipDeviceSettings {
pub valid: V2ipDeviceSetting,
pub flags: V2ipDeviceSetting,
pub ir_profiles: u32,
pub ir_profile: i8,
pub ir_profile_sink: i8,
}Expand description
The device settings of a V2IP unit, as it reports them and as its controller changes them.
Each setting is carried only behind its bit in valid, so a
frame changes one setting without restating the others, and a device
reports only the settings it has. Read a setting through the accessors,
which answer None for one the device has not reported.
Fields§
§valid: V2ipDeviceSettingThe settings reported so far.
flags: V2ipDeviceSettingThe values of the on/off settings among valid.
ir_profiles: u32The infrared profiles stored on the device, bit n for profile n.
ir_profile: i8The infrared profile of the global infrared port.
ir_profile_sink: i8The infrared profile of the output’s infrared port, or
V2IP_IR_PROFILE_NOT_SET when it follows the global one.
Implementations§
Source§impl V2ipDeviceSettings
impl V2ipDeviceSettings
Sourcepub const fn get(&self, setting: V2ipDeviceSetting) -> Option<bool>
pub const fn get(&self, setting: V2ipDeviceSetting) -> Option<bool>
Whether an on/off setting is on, None while the device has not
reported it.
Sourcepub const fn ir_profile(&self) -> Option<i8>
pub const fn ir_profile(&self) -> Option<i8>
The global infrared port’s profile, None while it is not reported.
Sourcepub const fn ir_profile_sink(&self) -> Option<i8>
pub const fn ir_profile_sink(&self) -> Option<i8>
The output infrared port’s profile, None while it is not reported.
V2IP_IR_PROFILE_NOT_SET means the port follows the global one.
Sourcepub const fn stored_ir_profiles(&self) -> Option<u32>
pub const fn stored_ir_profiles(&self) -> Option<u32>
The infrared profiles stored on the device, bit n for profile n, None
while it is not reported.