Openzwave库中对Zwave产品配置文件的使用
在openzwave库中通过配置文件定义一些可配置参数,对于每一个zwave命令类来说,我们都可以通过配置文件定义这些参数;在openzwave中通过CommandClass::ReadXML从配置文件中将相关参数读取出来;
一、
首先manufacturer_specific.xml 这个文件给出了目前支持的所有产品,该文件的样例如下所示:
<Manufacturer id="0040" name="2B Electronics"> </Manufacturer> <Manufacturer id="0098" name="2GIG Technologies"> <Product type="1e12" id="015c" name="CT30 Thermostat" config="2gig/ct30.xml"/> <Product type="1e12" id="015e" name="CT30 Thermostat" config="2gig/ct30.xml"/> <Product type="6401" id="0105" name="CT100 Thermostat" config="2gig/ct100.xml"/> <Product type="6401" id="0107" name="CT100 Thermostat USA" config="2gig/ct100.xml"/> <Product type="6501" id="000c" name="CT101 Thermostat (Iris)" config="2gig/ct101.xml"/> </Manufacturer> <Manufacturer id="002a" name="3e Technologies"> </Manufacturer> <Manufacturer id="0022" name="A-1 Components"> </Manufacturer> <Manufacturer id="0001" name="ACT"> <Product type="4349" id="3130" name="ZCS101 Serial Interface"/> <Product type="4952" id="3030" name="ZIR000 PIR Motion Sensor" config="act/zir010.xml"/> <Product type="4952" id="3330" name="ZIR010 PIR Motion Sensor" config="act/zir010.xml"/> <Product type="4952" id="3130" name="ZIR010 PIR Motion Sensor" config="act/zir010.xml"/> <Product type="4450" id="3030" name="ZDP100 Plugin Lamp Module"/> <Product type="4457" id="3033" name="ZDW103 Wall Dimmer Module" config="act/zdw103.xml"/> <Product type="4457" id="3330" name="ZDW230 Wall Dimmer Module"/> <Product type="4457" id="3332" name="ZDW232 Wall Dimmer Module" config="act/zdw232.xml"/> <Product type="444d" id="3330" name="ZDM230 Wall Dimmer Module" config="act/zdm230.xml"/> <Product type="5250" id="3030" name="ZRP100 Plugin Appliance Module"/> <Product type="5250" id="3130" name="ZRP110 Exterior Appliance Module" config="act/zrp110.xml"/> <Product type="5257" id="3330" name="ZRW230 Wall Appliance Module"/> <Product type="5246" id="3133" name="LFM-20 Relay Fixture Module" config="a |

本文详细介绍了OpenZwave库中如何使用Zwave产品配置文件,包括如何读取参数,产品配置文件的结构,以及COMMAND_CLASS_CONFIGURATION中定义的厂商自定义参数。通过对manufacturer_specific.xml文件的解析,展示了如何获取制造商信息和产品详情。同时,讨论了产品私有可配置参数的描述,如Value的类型、ID、标签等,并举例说明了COMMAND_CLASS_BASIC和COMMAND_CLASS_ASSOCIATION的相关配置参数。
最低0.47元/天 解锁文章
1521

被折叠的 条评论
为什么被折叠?



