AllJoyn界面设计指南v1.1中关于"Do not use custom signals to distribute property change information."
About "Do not use custom signals to distribute property change information." in the AllJoyn Interface Design Guidelines v1.1
AllJoyn "Interface Design Guidelines v1.1"
提到"Do not use custom signals to distribute property change information."
所以,如果我定义一个接口如下:
接口名称:org.example.Fan
特性:
已打开
...
方法:
...
和Set 'org.freedesktop.DBus.Property.EmitsChangedSignal' annotation value to true.
那么,我不能为这个'IsOpened' property
定义一个'IsOpenedChanged'
信号。
我应该使用 'org.freedesktop.DBus.Properties.PropertiesChanged'
信号来通知感兴趣的观察者。
我说得对吗?
是的,您不需要定义一个名为 IsOpenedChanged
的新信号。 属性 changed 信号由 AJ 库在后台处理。你应该只使用
- PropertyChangedEmitter (Java) https://allseenalliance.org/docs/api/java/org/alljoyn/bus/PropertyChangedEmitter.html 或
- 总线对象上的 EmitPropChanged (C++) https://allseenalliance.org/docs/api/cpp/classajn_1_1_bus_object.html#a840c67af2c4e9a07566b71491c67cbc5
AllJoyn "Interface Design Guidelines v1.1"
提到"Do not use custom signals to distribute property change information."
所以,如果我定义一个接口如下:
接口名称:org.example.Fan 特性: 已打开 ... 方法: ...
和Set 'org.freedesktop.DBus.Property.EmitsChangedSignal' annotation value to true.
那么,我不能为这个'IsOpened' property
定义一个'IsOpenedChanged'
信号。
我应该使用 'org.freedesktop.DBus.Properties.PropertiesChanged'
信号来通知感兴趣的观察者。
我说得对吗?
是的,您不需要定义一个名为 IsOpenedChanged
的新信号。 属性 changed 信号由 AJ 库在后台处理。你应该只使用
- PropertyChangedEmitter (Java) https://allseenalliance.org/docs/api/java/org/alljoyn/bus/PropertyChangedEmitter.html 或
- 总线对象上的 EmitPropChanged (C++) https://allseenalliance.org/docs/api/cpp/classajn_1_1_bus_object.html#a840c67af2c4e9a07566b71491c67cbc5