Skip to content

Commit 49e3545

Browse files
committed
2 parents d362903 + d041b81 commit 49e3545

File tree

3 files changed

+342
-342
lines changed

3 files changed

+342
-342
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<dhc:dogHomeConfiguration xmlns:dhc="http://elite.polito.it/dogHomeConfiguration">
3-
<dhc:controllables>
4-
<dhc:device domoticSystem="ZWave" id="$name"
5-
class="LevelControllableOutput" gateway="$gateway">
6-
<dhc:description>$description</dhc:description>
7-
<dhc:isIn>$location</dhc:isIn>
8-
<dhc:param value="$nodeId" name="NodeID" type="network" />
9-
#foreach( $instanceId in $instanceIds )
10-
<dhc:param value="$instanceId" name="InstanceID" type="network" />
11-
#end
12-
<!-- <dhc:hasMeter>$meter</dhc:hasMeter> -->
13-
<dhc:controlFunctionality class="OnOffFunctionality">
14-
<dhc:commands>
15-
<dhc:command id="OffCommand_$name" name="OffCommand_$name"
16-
class="OffCommand">
17-
<dhc:param value="off" name="realCommandName" />
18-
</dhc:command>
19-
<dhc:command id="OnCommand_$name" name="OnCommand_$name"
20-
class="OnCommand">
21-
<dhc:param value="on" name="realCommandName" />
22-
</dhc:command>
23-
</dhc:commands>
24-
</dhc:controlFunctionality>
25-
<dhc:controlFunctionality class="LevelControlFunctionality">
26-
<dhc:commands>
27-
<dhc:command id="SetCommand_$name" name="OffCommand_$name"
28-
class="SetCommand">
29-
<dhc:param value="set" name="realCommandName" />
30-
<dhc:param value="1" name="nParams" />
31-
<dhc:param value="value" name="commandParamName" type="Object" />
32-
</dhc:command>
33-
<dhc:command id="StepUpCommand_$name" name="OnCommand_$name"
34-
class="StepUpCommand">
35-
<dhc:param value="stepDown" name="realCommandName" />
36-
</dhc:command>
37-
<dhc:command id="StepDownCommand_$name" name="OnCommand_$name"
38-
class="StepDownCommand">
39-
<dhc:param value="stepDown" name="realCommandName" />
40-
</dhc:command>
41-
</dhc:commands>
42-
</dhc:controlFunctionality>
43-
<dhc:notificationFunctionality class="StateChangeNotificationFunctionality">
44-
<dhc:notifications>
45-
<dhc:notification
46-
id="StateChangeNotification_$name" class="StateChangeNotification">
47-
<dhc:param value="1" name="nParams" />
48-
<dhc:param value="stateChanged" name="notificationName" />
49-
<dhc:param type="State" value="newState" name="notificationParamName" />
50-
</dhc:notification>
51-
</dhc:notifications>
52-
</dhc:notificationFunctionality>
53-
<dhc:state class="OnOffState">
54-
<dhc:statevalues>
55-
<dhc:statevalue name="off" class="OffStateValue" />
56-
<dhc:statevalue name="on" class="OnStateValue" />
57-
</dhc:statevalues>
58-
</dhc:state>
59-
<dhc:state class="LevelState">
60-
<dhc:statevalue name="level" class="LevelStateValue" />
61-
</dhc:state>
62-
</dhc:device>
63-
</dhc:controllables>
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<dhc:dogHomeConfiguration xmlns:dhc="http://elite.polito.it/dogHomeConfiguration">
3+
<dhc:controllables>
4+
<dhc:device domoticSystem="ZWave" id="$name"
5+
class="LevelControllableOutput" gateway="$gateway">
6+
<dhc:description>$description</dhc:description>
7+
<dhc:isIn>$location</dhc:isIn>
8+
<dhc:param value="$nodeId" name="NodeID" type="network" />
9+
#foreach( $instanceId in $instanceIds )
10+
<dhc:param value="$instanceId" name="InstanceID" type="network" />
11+
#end
12+
<!-- <dhc:hasMeter>$meter</dhc:hasMeter> -->
13+
<dhc:controlFunctionality class="OnOffFunctionality">
14+
<dhc:commands>
15+
<dhc:command id="OffCommand_$name" name="OffCommand_$name"
16+
class="OffCommand">
17+
<dhc:param value="off" name="realCommandName" />
18+
</dhc:command>
19+
<dhc:command id="OnCommand_$name" name="OnCommand_$name"
20+
class="OnCommand">
21+
<dhc:param value="on" name="realCommandName" />
22+
</dhc:command>
23+
</dhc:commands>
24+
</dhc:controlFunctionality>
25+
<dhc:controlFunctionality class="LevelControlFunctionality">
26+
<dhc:commands>
27+
<dhc:command id="SetCommand_$name" name="OffCommand_$name"
28+
class="SetCommand">
29+
<dhc:param value="set" name="realCommandName" />
30+
<dhc:param value="1" name="nParams" />
31+
<dhc:param value="value" name="commandParamName" type="Object" />
32+
</dhc:command>
33+
<dhc:command id="StepUpCommand_$name" name="OnCommand_$name"
34+
class="StepUpCommand">
35+
<dhc:param value="stepDown" name="realCommandName" />
36+
</dhc:command>
37+
<dhc:command id="StepDownCommand_$name" name="OnCommand_$name"
38+
class="StepDownCommand">
39+
<dhc:param value="stepDown" name="realCommandName" />
40+
</dhc:command>
41+
</dhc:commands>
42+
</dhc:controlFunctionality>
43+
<dhc:notificationFunctionality class="StateChangeNotificationFunctionality">
44+
<dhc:notifications>
45+
<dhc:notification
46+
id="StateChangeNotification_$name" class="StateChangeNotification">
47+
<dhc:param value="1" name="nParams" />
48+
<dhc:param value="stateChanged" name="notificationName" />
49+
<dhc:param type="State" value="newState" name="notificationParamName" />
50+
</dhc:notification>
51+
</dhc:notifications>
52+
</dhc:notificationFunctionality>
53+
<dhc:state class="OnOffState">
54+
<dhc:statevalues>
55+
<dhc:statevalue name="off" class="OffStateValue" />
56+
<dhc:statevalue name="on" class="OnStateValue" />
57+
</dhc:statevalues>
58+
</dhc:state>
59+
<dhc:state class="LevelState">
60+
<dhc:statevalue name="level" class="LevelStateValue" />
61+
</dhc:state>
62+
</dhc:device>
63+
</dhc:controllables>
6464
</dhc:dogHomeConfiguration>
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
/*
2-
* Dog - Z-Wave
3-
*
4-
* Copyright 2013 Davide Aimone and Dario Bonino
5-
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License
17-
*/
18-
package it.polito.elite.dog.drivers.zwave.onoffdevice;
19-
20-
import it.polito.elite.dog.core.library.model.ControllableDevice;
21-
import it.polito.elite.dog.drivers.zwave.device.ZWaveDeviceDriver;
22-
import it.polito.elite.dog.drivers.zwave.network.ZWaveDriverInstance;
23-
import it.polito.elite.dog.drivers.zwave.network.interfaces.ZWaveNetwork;
24-
25-
import java.util.HashSet;
26-
27-
import org.osgi.framework.BundleContext;
28-
29-
public class ZWaveOnOffDeviceDriver extends ZWaveDeviceDriver
30-
{
31-
32-
/**
33-
*
34-
*/
35-
public ZWaveOnOffDeviceDriver()
36-
{
37-
super();
38-
this.driverInstanceClass = ZWaveOnOffDeviceDriverInstance.class;
39-
}
40-
41-
@Override
42-
public ZWaveDriverInstance createZWaveDriverInstance(
43-
ZWaveNetwork zWaveNetwork, ControllableDevice device, int nodeId,
44-
HashSet<Integer> instancesId, int gatewayNodeId,
45-
int updateTimeMillis, BundleContext context)
46-
{
47-
return new ZWaveOnOffDeviceDriverInstance(zWaveNetwork, device, nodeId, instancesId, gatewayNodeId, updateTimeMillis, context);
48-
}
49-
}
1+
/*
2+
* Dog - Z-Wave
3+
*
4+
* Copyright 2013 Davide Aimone and Dario Bonino
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License
17+
*/
18+
package it.polito.elite.dog.drivers.zwave.onoffdevice;
19+
20+
import it.polito.elite.dog.core.library.model.ControllableDevice;
21+
import it.polito.elite.dog.drivers.zwave.device.ZWaveDeviceDriver;
22+
import it.polito.elite.dog.drivers.zwave.network.ZWaveDriverInstance;
23+
import it.polito.elite.dog.drivers.zwave.network.interfaces.ZWaveNetwork;
24+
25+
import java.util.HashSet;
26+
27+
import org.osgi.framework.BundleContext;
28+
29+
public class ZWaveOnOffDeviceDriver extends ZWaveDeviceDriver
30+
{
31+
32+
/**
33+
*
34+
*/
35+
public ZWaveOnOffDeviceDriver()
36+
{
37+
super();
38+
this.driverInstanceClass = ZWaveOnOffDeviceDriverInstance.class;
39+
}
40+
41+
@Override
42+
public ZWaveDriverInstance createZWaveDriverInstance(
43+
ZWaveNetwork zWaveNetwork, ControllableDevice device, int nodeId,
44+
HashSet<Integer> instancesId, int gatewayNodeId,
45+
int updateTimeMillis, BundleContext context)
46+
{
47+
return new ZWaveOnOffDeviceDriverInstance(zWaveNetwork, device, nodeId, instancesId, gatewayNodeId, updateTimeMillis, context);
48+
}
49+
}

0 commit comments

Comments
 (0)