pub struct ReprogControlsV4 { /* private fields */ }Expand description
ReprogControlsV4 accessor bound to one device + resolved feature index.
Construct with the feature index obtained from the device’s root feature
(get_feature(FEATURE_ID)), then call the functions below. Cheap to
clone (an Arc plus the feature index).
Implementations§
Source§impl ReprogControlsV4
impl ReprogControlsV4
Sourcepub fn new(chan: Arc<HidppChannel>, device_index: u8, feature_index: u8) -> Self
pub fn new(chan: Arc<HidppChannel>, device_index: u8, feature_index: u8) -> Self
Bind the feature to (device_index, feature_index) on chan.
Sourcepub fn feature_index(&self) -> u8
pub fn feature_index(&self) -> u8
The feature index this accessor talks to — used to match unsolicited
events in decode_event.
Sourcepub async fn get_count(&self) -> Result<u8, Hidpp20Error>
pub async fn get_count(&self) -> Result<u8, Hidpp20Error>
Number of reprogrammable controls the device exposes.
Sourcepub async fn get_cid_info(&self, index: u8) -> Result<CidInfo, Hidpp20Error>
pub async fn get_cid_info(&self, index: u8) -> Result<CidInfo, Hidpp20Error>
Identity + capabilities of the control at index (0..get_count).
Sourcepub async fn get_ctrl_id_info(
&self,
index: u8,
) -> Result<CtrlIdInfo, Hidpp20Error>
pub async fn get_ctrl_id_info( &self, index: u8, ) -> Result<CtrlIdInfo, Hidpp20Error>
Compatibility projection of Self::get_cid_info.
Sourcepub async fn get_cid_reporting(
&self,
cid: u16,
) -> Result<CidReporting, Hidpp20Error>
pub async fn get_cid_reporting( &self, cid: u16, ) -> Result<CidReporting, Hidpp20Error>
Current reporting/remapping state for cid.
Sourcepub async fn set_cid_reporting_full(
&self,
cid: u16,
change: CidReportingChange,
) -> Result<CidReportingChangeEcho, Hidpp20Error>
pub async fn set_cid_reporting_full( &self, cid: u16, change: CidReportingChange, ) -> Result<CidReportingChangeEcho, Hidpp20Error>
Apply the full setCidReporting packet.
Sourcepub async fn divert_cid(&self, cid: u16) -> Result<(), Hidpp20Error>
pub async fn divert_cid(&self, cid: u16) -> Result<(), Hidpp20Error>
Divert cid’s reports to software. Raw XY stays off and remapping is
left untouched; the device then emits RawControlEvents on this
feature index.