| // Copyright 2025 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| //! # DBus interface proxy for: `xyz.openbmc_project.Sensor.Value` |
| //! |
| //! This code was generated by `zbus-xmlgen` `4.0.0` from DBus introspection data. |
| //! Source: `SensorProperties.xml`. |
| //! |
| //! You may prefer to adapt it, instead of using it verbatim. |
| //! |
| //! More information can be found in the |
| //! [Writing a client proxy](https://dbus2.github.io/zbus/client.html) |
| //! section of the zbus documentation. |
| //! |
| //! This DBus object implements |
| //! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), |
| //! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: |
| //! |
| //! * [`zbus::fdo::PeerProxy`] |
| //! * [`zbus::fdo::IntrospectableProxy`] |
| //! * [`zbus::fdo::PropertiesProxy`] |
| //! |
| //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. |
| |
| use zbus::dbus_proxy; |
| |
| #[dbus_proxy(interface = "xyz.openbmc_project.Sensor.Value", assume_defaults = true)] |
| trait Value { |
| /// MaxValue property |
| #[dbus_proxy(property)] |
| fn max_value(&self) -> zbus::Result<f64>; |
| |
| /// MinValue property |
| #[dbus_proxy(property)] |
| fn min_value(&self) -> zbus::Result<f64>; |
| |
| /// Unit property |
| #[dbus_proxy(property)] |
| fn unit(&self) -> zbus::Result<String>; |
| |
| /// Value property |
| #[dbus_proxy(property)] |
| fn value(&self) -> zbus::Result<f64>; |
| #[dbus_proxy(property)] |
| fn set_value(&self, value: f64) -> zbus::Result<()>; |
| } |