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="act/lfm20.xml"/> |