mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-14 10:21:57 -04:00
manager: Fix method/property capitalization consistency
This commit is contained in:
parent
1df02e776f
commit
1e39dce571
2 changed files with 41 additions and 41 deletions
|
@ -76,7 +76,7 @@
|
||||||
<property name="HardwareCurrentlySupported" type="u" access="read"/>
|
<property name="HardwareCurrentlySupported" type="u" access="read"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
ALSCalibrationGain:
|
AlsCalibrationGain:
|
||||||
|
|
||||||
Provides the ALS calibration value.
|
Provides the ALS calibration value.
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="ALSCalibrationGain" type="d" access="read"/>
|
<property name="AlsCalibrationGain" type="d" access="read"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
GetAlsIntegrationTimeFileDescriptor:
|
GetAlsIntegrationTimeFileDescriptor:
|
||||||
|
@ -101,13 +101,13 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
UpdateBIOS:
|
UpdateBios:
|
||||||
|
|
||||||
Perform a BIOS update.
|
Perform a BIOS update.
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<method name="UpdateBIOS" />
|
<method name="UpdateBios" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
UpdateDock:
|
UpdateDock:
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
GPUPerformanceLevel:
|
GpuPerformanceLevel:
|
||||||
|
|
||||||
The current GPU performance level.
|
The current GPU performance level.
|
||||||
|
|
||||||
|
@ -155,64 +155,64 @@
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="GPUPerformanceLevel" type="u" access="readwrite"/>
|
<property name="GpuPerformanceLevel" type="u" access="readwrite"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
ManualGPUClock:
|
ManualGpuClock:
|
||||||
|
|
||||||
Controls the GPU clock frequency in MHz when GPUPerformanceLevel is set to Manual
|
Controls the GPU clock frequency in MHz when GPUPerformanceLevel is set to Manual
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="ManualGPUClock" type="u" access="readwrite"/>
|
<property name="ManualGpuClock" type="u" access="readwrite"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
ManualGPUClockMin:
|
ManualGpuClockMin:
|
||||||
|
|
||||||
Minimum frequency allowed for GPU clocks.
|
Minimum frequency allowed for GPU clocks.
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="ManualGPUClockMin" type="u" access="read"/>
|
<property name="ManualGpuClockMin" type="u" access="read"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
ManualGPUClockMax:
|
ManualGpuClockMax:
|
||||||
|
|
||||||
Maximum frequency allowed for GPU clocks.
|
Maximum frequency allowed for GPU clocks.
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="ManualGPUClockMax" type="u" access="read"/>
|
<property name="ManualGpuClockMax" type="u" access="read"/>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TDPLimit:
|
TdpLimit:
|
||||||
|
|
||||||
Controls the system TDP limit.
|
Controls the system TDP limit.
|
||||||
|
|
||||||
Valid states: In range of [ TDPLimitMin, TDPLimitMax ]
|
Valid states: In range of [ TdpLimitMin, TdpLimitMax ]
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="TDPLimit" type="u" access="readwrite"/>
|
<property name="TdpLimit" type="u" access="readwrite"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TDPLimitMin:
|
TdpLimitMin:
|
||||||
|
|
||||||
Minimum allowed TDP Limit
|
Minimum allowed TDP Limit
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="TDPLimitMin" type="u" access="read"/>
|
<property name="TdpLimitMin" type="u" access="read"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TDPLimitMax:
|
TdpLimitMax:
|
||||||
|
|
||||||
Maximum allowed TDP Limit
|
Maximum allowed TDP Limit
|
||||||
|
|
||||||
Version available: 7
|
Version available: 7
|
||||||
-->
|
-->
|
||||||
<property name="TDPLimitMax" type="u" access="read"/>
|
<property name="TdpLimitMax" type="u" access="read"/>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -187,7 +187,7 @@ impl SteamOSManager {
|
||||||
.map_err(anyhow_to_zbus_fdo)
|
.map_err(anyhow_to_zbus_fdo)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "false"), name = "GPUPerformanceLevel")]
|
#[zbus(property(emits_changed_signal = "false"))]
|
||||||
async fn gpu_performance_level(&self) -> zbus::fdo::Result<u32> {
|
async fn gpu_performance_level(&self) -> zbus::fdo::Result<u32> {
|
||||||
match get_gpu_performance_level().await {
|
match get_gpu_performance_level().await {
|
||||||
Ok(level) => Ok(level as u32),
|
Ok(level) => Ok(level as u32),
|
||||||
|
@ -198,7 +198,7 @@ impl SteamOSManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
#[zbus(property)]
|
||||||
async fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()> {
|
async fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()> {
|
||||||
let level = match GPUPerformanceLevel::try_from(level) {
|
let level = match GPUPerformanceLevel::try_from(level) {
|
||||||
Ok(level) => level,
|
Ok(level) => level,
|
||||||
|
@ -210,7 +210,7 @@ impl SteamOSManager {
|
||||||
.map_err(anyhow_to_zbus)
|
.map_err(anyhow_to_zbus)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "false"), name = "ManualGPUClock")]
|
#[zbus(property(emits_changed_signal = "false"))]
|
||||||
async fn manual_gpu_clock(&self) -> zbus::fdo::Result<u32> {
|
async fn manual_gpu_clock(&self) -> zbus::fdo::Result<u32> {
|
||||||
get_gpu_clocks()
|
get_gpu_clocks()
|
||||||
.await
|
.await
|
||||||
|
@ -218,7 +218,7 @@ impl SteamOSManager {
|
||||||
.map_err(anyhow_to_zbus_fdo)
|
.map_err(anyhow_to_zbus_fdo)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property, name = "ManualGPUClock")]
|
#[zbus(property)]
|
||||||
async fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()> {
|
async fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()> {
|
||||||
set_gpu_clocks(clocks)
|
set_gpu_clocks(clocks)
|
||||||
.await
|
.await
|
||||||
|
@ -226,35 +226,35 @@ impl SteamOSManager {
|
||||||
.map_err(anyhow_to_zbus)
|
.map_err(anyhow_to_zbus)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "const"), name = "ManualGPUClockMin")]
|
#[zbus(property(emits_changed_signal = "const"))]
|
||||||
async fn manual_gpu_clock_min(&self) -> u32 {
|
async fn manual_gpu_clock_min(&self) -> u32 {
|
||||||
// TODO: Can this be queried from somewhere?
|
// TODO: Can this be queried from somewhere?
|
||||||
200
|
200
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "const"), name = "ManualGPUClockMax")]
|
#[zbus(property(emits_changed_signal = "const"))]
|
||||||
async fn manual_gpu_clock_max(&self) -> u32 {
|
async fn manual_gpu_clock_max(&self) -> u32 {
|
||||||
// TODO: Can this be queried from somewhere?
|
// TODO: Can this be queried from somewhere?
|
||||||
1600
|
1600
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "false"), name = "TDPLimit")]
|
#[zbus(property(emits_changed_signal = "false"))]
|
||||||
async fn tdp_limit(&self) -> zbus::fdo::Result<u32> {
|
async fn tdp_limit(&self) -> zbus::fdo::Result<u32> {
|
||||||
get_tdp_limit().await.map_err(anyhow_to_zbus_fdo)
|
get_tdp_limit().await.map_err(anyhow_to_zbus_fdo)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property, name = "TDPLimit")]
|
#[zbus(property)]
|
||||||
async fn set_tdp_limit(&self, limit: u32) -> zbus::Result<()> {
|
async fn set_tdp_limit(&self, limit: u32) -> zbus::Result<()> {
|
||||||
set_tdp_limit(limit).await.map_err(anyhow_to_zbus)
|
set_tdp_limit(limit).await.map_err(anyhow_to_zbus)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "const"), name = "TDPLimitMin")]
|
#[zbus(property(emits_changed_signal = "const"))]
|
||||||
async fn tdp_limit_min(&self) -> u32 {
|
async fn tdp_limit_min(&self) -> u32 {
|
||||||
// TODO: Can this be queried from somewhere?
|
// TODO: Can this be queried from somewhere?
|
||||||
3
|
3
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zbus(property(emits_changed_signal = "const"), name = "TDPLimitMax")]
|
#[zbus(property(emits_changed_signal = "const"))]
|
||||||
async fn tdp_limit_max(&self) -> u32 {
|
async fn tdp_limit_max(&self) -> u32 {
|
||||||
// TODO: Can this be queried from somewhere?
|
// TODO: Can this be queried from somewhere?
|
||||||
15
|
15
|
||||||
|
@ -387,23 +387,23 @@ mod test {
|
||||||
|
|
||||||
#[zbus::proxy(
|
#[zbus::proxy(
|
||||||
interface = "com.steampowered.SteamOSManager1.Manager",
|
interface = "com.steampowered.SteamOSManager1.Manager",
|
||||||
default_service = "com.steampowered.SteamOSManager1.Test.GPUPerformanceLevel",
|
default_service = "com.steampowered.SteamOSManager1.Test.GpuPerformanceLevel",
|
||||||
default_path = "/com/steampowered/SteamOSManager1"
|
default_path = "/com/steampowered/SteamOSManager1"
|
||||||
)]
|
)]
|
||||||
trait GPUPerformanceLevel {
|
trait GpuPerformanceLevel {
|
||||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
#[zbus(property)]
|
||||||
fn gpu_performance_level(&self) -> zbus::Result<u32>;
|
fn gpu_performance_level(&self) -> zbus::Result<u32>;
|
||||||
|
|
||||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
#[zbus(property)]
|
||||||
fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()>;
|
fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn gpu_performance_level() {
|
async fn gpu_performance_level() {
|
||||||
let test = start("GPUPerformanceLevel").await;
|
let test = start("GpuPerformanceLevel").await;
|
||||||
power::test::setup().await;
|
power::test::setup().await;
|
||||||
|
|
||||||
let proxy = GPUPerformanceLevelProxy::new(&test.connection)
|
let proxy = GpuPerformanceLevelProxy::new(&test.connection)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
set_gpu_performance_level(GPUPerformanceLevel::Auto)
|
set_gpu_performance_level(GPUPerformanceLevel::Auto)
|
||||||
|
@ -426,22 +426,22 @@ mod test {
|
||||||
|
|
||||||
#[zbus::proxy(
|
#[zbus::proxy(
|
||||||
interface = "com.steampowered.SteamOSManager1.Manager",
|
interface = "com.steampowered.SteamOSManager1.Manager",
|
||||||
default_service = "com.steampowered.SteamOSManager1.Test.ManualGPUClock",
|
default_service = "com.steampowered.SteamOSManager1.Test.ManualGpuClock",
|
||||||
default_path = "/com/steampowered/SteamOSManager1"
|
default_path = "/com/steampowered/SteamOSManager1"
|
||||||
)]
|
)]
|
||||||
trait ManualGPUClock {
|
trait ManualGpuClock {
|
||||||
#[zbus(property, name = "ManualGPUClock")]
|
#[zbus(property)]
|
||||||
fn manual_gpu_clock(&self) -> zbus::Result<u32>;
|
fn manual_gpu_clock(&self) -> zbus::Result<u32>;
|
||||||
|
|
||||||
#[zbus(property, name = "ManualGPUClock")]
|
#[zbus(property)]
|
||||||
fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()>;
|
fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn manual_gpu_clock() {
|
async fn manual_gpu_clock() {
|
||||||
let test = start("ManualGPUClock").await;
|
let test = start("ManualGpuClock").await;
|
||||||
|
|
||||||
let proxy = ManualGPUClockProxy::new(&test.connection).await.unwrap();
|
let proxy = ManualGpuClockProxy::new(&test.connection).await.unwrap();
|
||||||
|
|
||||||
assert!(proxy.manual_gpu_clock().await.is_err());
|
assert!(proxy.manual_gpu_clock().await.is_err());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue