On Di, 21.04.20 19:54, www (ouyangxua...@163.com) wrote:

> hi Lennart,
>
>
> I mean the DBUS property.
>
> root@demoboard:/# busctl set-property org.freedesktop.DBus 
> /org/freedesktop/DBus org.freedesktop.DBus Features as 1 x
>
> Cannot set read-only property         -- the default
>
>
>
>
> root@demoboard:/# busctl set-property com.sugon.sensors.DISCRETE 
> /com/sugon/sensors/HDD/HDD4_Status xyz.openbmc_project.Sensor.DiscreteAll 
> FanDeviceInserted b true              -- new add
>
> root@demoboard:/#
>
>
>
> I want the property on Dbus is read only. Just can modify by the
> special method and cannot  modify the property directly. How can I
> change it like this?

Is "com.sugon.sensors.DISCRETE" a service you implemented yourself?
With the sd-bus API?

In sd-bus you define a writable property in a vtable with the
SD_BUS_WRITABLE_PROPERTY() macro, and a read-only one with
SD_BUS_PROPERTY().

But not sure I grok your question properly.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to