| <!-- |
| ~ Copyright (c) 2020 Kentyou. |
| ~ 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: |
| * Kentyou - 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"> |
| <builder type="EMPTY"> |
| <argument type="string"> |
| <value>ON</value> |
| </argument> |
| </builder> |
| </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"> |
| <builder type="EMPTY"> |
| <argument type="string"> |
| <value>OFF</value> |
| </argument> |
| </builder> |
| </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"> |
| <constraints> |
| <minInclusive value="0"/> |
| <maxInclusive value="10"/> |
| </constraints> |
| </parameter> |
| <references> |
| <reference reference="SPEED" passOn="true" xsi:type="copyReference"> |
| <builder type="PARAMETER"> |
| <argument type="int"> |
| <value>0</value> |
| </argument> |
| </builder> |
| </reference> |
| </references> |
| </method> |
| </methods> |
| </resourceInfo> |
| <devices> |
| <device identifier="fan"> |
| <service name="switch"/> |
| </device> |
| </devices> |
| </resourceInfos> |