Class Switch
- java.lang.Object
-
- com.dalsemi.onewire.application.tag.TaggedDevice
-
- com.dalsemi.onewire.application.tag.Switch
-
- All Implemented Interfaces:
TaggedActuator
public class Switch extends TaggedDevice implements TaggedActuator
This class provides a default object for the Switch type of a tagged 1-Wire device.
-
-
Field Summary
-
Fields inherited from class com.dalsemi.onewire.application.tag.TaggedDevice
branchVector, channel, clusterName, DeviceContainer, DeviceType, init, label, max, min, state
-
-
Constructor Summary
Constructors Constructor Description Switch()
Creates an object for the device.Switch(DSPortAdapter adapter, java.lang.String netAddress)
Creates an object for the device with the supplied address connected to the supplied port adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Vector<java.lang.String>
getSelections()
Get the possible selection states of this actuatorvoid
initActuator()
Initializes the actuatorvoid
setSelection(java.lang.String selection)
Set the selection of this actuator-
Methods inherited from class com.dalsemi.onewire.application.tag.TaggedDevice
equals, getBranches, getChannel, getChannelAsString, getClusterName, getDeviceContainer, getDeviceType, getInit, getLabel, getMax, getMin, getOWPath, hashCode, setBranches, setChannel, setChannelFromString, setClusterName, setDeviceContainer, setDeviceType, setInit, setLabel, setOWPath, setOWPath, toString
-
-
-
-
Constructor Detail
-
Switch
public Switch()
Creates an object for the device.
-
Switch
public Switch(DSPortAdapter adapter, java.lang.String netAddress)
Creates an object for the device with the supplied address connected to the supplied port adapter.- Parameters:
adapter
- The adapter serving the actuator.netAddress
- The 1-Wire network address of the actuator.
-
-
Method Detail
-
getSelections
public java.util.Vector<java.lang.String> getSelections()
Get the possible selection states of this actuator- Specified by:
getSelections
in interfaceTaggedActuator
- Returns:
- Vector of Strings representing selection states.
-
setSelection
public void setSelection(java.lang.String selection) throws OneWireException
Set the selection of this actuator- Specified by:
setSelection
in interfaceTaggedActuator
- Throws:
OneWireException
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from a 1-Wire device. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
-
initActuator
public void initActuator() throws OneWireException
Initializes the actuator- Specified by:
initActuator
in interfaceTaggedActuator
- Throws:
OneWireException
OneWireIOException
- on a 1-Wire communication error such as reading an incorrect CRC from a 1-Wire device. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
-
-