blob: 0fcb3b5273f68a3fae91dfb1eb105cf935f0e1cf [file] [log] [blame]
<!--
~ Copyright (c) 2017 CEA.
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ which accompanies this distribution, and is available at
~ http://www.eclipse.org/legal/epl-v10.html
~
~ Contributors:
~ CEA - initial API and implementation
-->
<resourceInfos xmlns="http://org.eclipse.sensinact/resource"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://org.eclipse.sensinact/resource ../../../../../platform/sensinact-generic/src/main/resources/sensinact-resource.xsd">
<resourceInfo xsi:type="resourceInfoVariable" name="STATUS" target="switch">
<identifier xsi:type="stringContent">STATUS</identifier>
<attributes>
<attribute name="value" type="string" modifiable="UPDATABLE">
<value>OFF</value>
<constraints>
<pattern value="((ON)|(OFF))"/>
</constraints>
</attribute>
</attributes>
</resourceInfo>
<resourceInfo xsi:type="resourceInfoVariable" name="SPEED" target="switch">
<identifier xsi:type="stringContent">SPEED</identifier>
<attributes>
<attribute name="value" type="int" modifiable="UPDATABLE">
<value>10</value>
<constraints>
<maxInclusive value="10"/>
<minInclusive value="0"/>
</constraints>
</attribute>
</attributes>
</resourceInfo>
<resourceInfo xsi:type="resourceInfoAction" name="TURN_ON" target="switch">
<identifier xsi:type="stringContent">ON</identifier>
<methods>
<method type="ACT">
<references>
<reference reference="STATUS" passOn="true" xsi:type="constantReference">
<constant type="string">
<value>ON</value>
</constant>
</reference>
</references>
</method>
</methods>
</resourceInfo>
<resourceInfo xsi:type="resourceInfoAction" name="TURN_OFF" target="switch">
<identifier xsi:type="stringContent">OFF</identifier>
<methods>
<method type="ACT">
<references>
<reference reference="STATUS" passOn="true" xsi:type="constantReference">
<constant type="string">
<value>OFF</value>
</constant>
</reference>
</references>
</method>
</methods>
</resourceInfo>
<resourceInfo xsi:type="resourceInfoAction" name="DIM" target="switch">
<identifier xsi:type="stringContent">DIM</identifier>
<methods>
<method type="ACT">
<parameter name="speed" type="int">
<contraints>
<minInclusive value="0"/>
<maxInclusive value="10"/>
</contraints>
</parameter>
<references>
<reference reference="SPEED" passOn="true" xsi:type="copyReference" index="0"/>
</references>
</method>
</methods>
</resourceInfo>
<devices>
<device identifier="fan">
<service name="switch"/>
</device>
</devices>
</resourceInfos>