Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dbonino committed Feb 11, 2014
2 parents d362903 + d041b81 commit 49e3545
Show file tree
Hide file tree
Showing 3 changed files with 342 additions and 342 deletions.
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dhc:dogHomeConfiguration xmlns:dhc="http://elite.polito.it/dogHomeConfiguration">
<dhc:controllables>
<dhc:device domoticSystem="ZWave" id="$name"
class="LevelControllableOutput" gateway="$gateway">
<dhc:description>$description</dhc:description>
<dhc:isIn>$location</dhc:isIn>
<dhc:param value="$nodeId" name="NodeID" type="network" />
#foreach( $instanceId in $instanceIds )
<dhc:param value="$instanceId" name="InstanceID" type="network" />
#end
<!-- <dhc:hasMeter>$meter</dhc:hasMeter> -->
<dhc:controlFunctionality class="OnOffFunctionality">
<dhc:commands>
<dhc:command id="OffCommand_$name" name="OffCommand_$name"
class="OffCommand">
<dhc:param value="off" name="realCommandName" />
</dhc:command>
<dhc:command id="OnCommand_$name" name="OnCommand_$name"
class="OnCommand">
<dhc:param value="on" name="realCommandName" />
</dhc:command>
</dhc:commands>
</dhc:controlFunctionality>
<dhc:controlFunctionality class="LevelControlFunctionality">
<dhc:commands>
<dhc:command id="SetCommand_$name" name="OffCommand_$name"
class="SetCommand">
<dhc:param value="set" name="realCommandName" />
<dhc:param value="1" name="nParams" />
<dhc:param value="value" name="commandParamName" type="Object" />
</dhc:command>
<dhc:command id="StepUpCommand_$name" name="OnCommand_$name"
class="StepUpCommand">
<dhc:param value="stepDown" name="realCommandName" />
</dhc:command>
<dhc:command id="StepDownCommand_$name" name="OnCommand_$name"
class="StepDownCommand">
<dhc:param value="stepDown" name="realCommandName" />
</dhc:command>
</dhc:commands>
</dhc:controlFunctionality>
<dhc:notificationFunctionality class="StateChangeNotificationFunctionality">
<dhc:notifications>
<dhc:notification
id="StateChangeNotification_$name" class="StateChangeNotification">
<dhc:param value="1" name="nParams" />
<dhc:param value="stateChanged" name="notificationName" />
<dhc:param type="State" value="newState" name="notificationParamName" />
</dhc:notification>
</dhc:notifications>
</dhc:notificationFunctionality>
<dhc:state class="OnOffState">
<dhc:statevalues>
<dhc:statevalue name="off" class="OffStateValue" />
<dhc:statevalue name="on" class="OnStateValue" />
</dhc:statevalues>
</dhc:state>
<dhc:state class="LevelState">
<dhc:statevalue name="level" class="LevelStateValue" />
</dhc:state>
</dhc:device>
</dhc:controllables>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dhc:dogHomeConfiguration xmlns:dhc="http://elite.polito.it/dogHomeConfiguration">
<dhc:controllables>
<dhc:device domoticSystem="ZWave" id="$name"
class="LevelControllableOutput" gateway="$gateway">
<dhc:description>$description</dhc:description>
<dhc:isIn>$location</dhc:isIn>
<dhc:param value="$nodeId" name="NodeID" type="network" />
#foreach( $instanceId in $instanceIds )
<dhc:param value="$instanceId" name="InstanceID" type="network" />
#end
<!-- <dhc:hasMeter>$meter</dhc:hasMeter> -->
<dhc:controlFunctionality class="OnOffFunctionality">
<dhc:commands>
<dhc:command id="OffCommand_$name" name="OffCommand_$name"
class="OffCommand">
<dhc:param value="off" name="realCommandName" />
</dhc:command>
<dhc:command id="OnCommand_$name" name="OnCommand_$name"
class="OnCommand">
<dhc:param value="on" name="realCommandName" />
</dhc:command>
</dhc:commands>
</dhc:controlFunctionality>
<dhc:controlFunctionality class="LevelControlFunctionality">
<dhc:commands>
<dhc:command id="SetCommand_$name" name="OffCommand_$name"
class="SetCommand">
<dhc:param value="set" name="realCommandName" />
<dhc:param value="1" name="nParams" />
<dhc:param value="value" name="commandParamName" type="Object" />
</dhc:command>
<dhc:command id="StepUpCommand_$name" name="OnCommand_$name"
class="StepUpCommand">
<dhc:param value="stepDown" name="realCommandName" />
</dhc:command>
<dhc:command id="StepDownCommand_$name" name="OnCommand_$name"
class="StepDownCommand">
<dhc:param value="stepDown" name="realCommandName" />
</dhc:command>
</dhc:commands>
</dhc:controlFunctionality>
<dhc:notificationFunctionality class="StateChangeNotificationFunctionality">
<dhc:notifications>
<dhc:notification
id="StateChangeNotification_$name" class="StateChangeNotification">
<dhc:param value="1" name="nParams" />
<dhc:param value="stateChanged" name="notificationName" />
<dhc:param type="State" value="newState" name="notificationParamName" />
</dhc:notification>
</dhc:notifications>
</dhc:notificationFunctionality>
<dhc:state class="OnOffState">
<dhc:statevalues>
<dhc:statevalue name="off" class="OffStateValue" />
<dhc:statevalue name="on" class="OnStateValue" />
</dhc:statevalues>
</dhc:state>
<dhc:state class="LevelState">
<dhc:statevalue name="level" class="LevelStateValue" />
</dhc:state>
</dhc:device>
</dhc:controllables>
</dhc:dogHomeConfiguration>
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
/*
* Dog - Z-Wave
*
* Copyright 2013 Davide Aimone and Dario Bonino
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package it.polito.elite.dog.drivers.zwave.onoffdevice;

import it.polito.elite.dog.core.library.model.ControllableDevice;
import it.polito.elite.dog.drivers.zwave.device.ZWaveDeviceDriver;
import it.polito.elite.dog.drivers.zwave.network.ZWaveDriverInstance;
import it.polito.elite.dog.drivers.zwave.network.interfaces.ZWaveNetwork;

import java.util.HashSet;

import org.osgi.framework.BundleContext;

public class ZWaveOnOffDeviceDriver extends ZWaveDeviceDriver
{

/**
*
*/
public ZWaveOnOffDeviceDriver()
{
super();
this.driverInstanceClass = ZWaveOnOffDeviceDriverInstance.class;
}

@Override
public ZWaveDriverInstance createZWaveDriverInstance(
ZWaveNetwork zWaveNetwork, ControllableDevice device, int nodeId,
HashSet<Integer> instancesId, int gatewayNodeId,
int updateTimeMillis, BundleContext context)
{
return new ZWaveOnOffDeviceDriverInstance(zWaveNetwork, device, nodeId, instancesId, gatewayNodeId, updateTimeMillis, context);
}
}
/*
* Dog - Z-Wave
*
* Copyright 2013 Davide Aimone and Dario Bonino
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package it.polito.elite.dog.drivers.zwave.onoffdevice;

import it.polito.elite.dog.core.library.model.ControllableDevice;
import it.polito.elite.dog.drivers.zwave.device.ZWaveDeviceDriver;
import it.polito.elite.dog.drivers.zwave.network.ZWaveDriverInstance;
import it.polito.elite.dog.drivers.zwave.network.interfaces.ZWaveNetwork;

import java.util.HashSet;

import org.osgi.framework.BundleContext;

public class ZWaveOnOffDeviceDriver extends ZWaveDeviceDriver
{

/**
*
*/
public ZWaveOnOffDeviceDriver()
{
super();
this.driverInstanceClass = ZWaveOnOffDeviceDriverInstance.class;
}

@Override
public ZWaveDriverInstance createZWaveDriverInstance(
ZWaveNetwork zWaveNetwork, ControllableDevice device, int nodeId,
HashSet<Integer> instancesId, int gatewayNodeId,
int updateTimeMillis, BundleContext context)
{
return new ZWaveOnOffDeviceDriverInstance(zWaveNetwork, device, nodeId, instancesId, gatewayNodeId, updateTimeMillis, context);
}
}
Loading

0 comments on commit 49e3545

Please sign in to comment.