livespace.services.entities
Class LightEntity
java.lang.Object
dsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.SimpleDataObject
dsto.dfc.databeans.FancyDataObject
livespace.services.Entity
livespace.services.entities.LightEntity
- All Implemented Interfaces:
- IDataObject, IDataObjectChildListener, Cloneable
public class LightEntity
- extends Entity
Entity to represent a light in the room.
They have a level
property to represent the strength of the
light, and its value range is [0,100] and represents a percentage of on-ness.
For fluro lights (CBusService.TYPE_FLUORO), the value is 0 or 100. For
spotlights that can dim (CBusService.TYPE_DIMMER), the value can be anything
in the valid range.
Spotlights also have a rampTime
property. If the
rampTime
property of a dimmer is non-zero, then when the
level
property of the light is changed, the light is ramped to
that level over rampTime seconds.
The type of light (dimmer or fluro) is described in property
implType
.
- Version:
- $Revision$
- Author:
- WeberD
Method Summary |
String |
getType()
The type of the object (eg "room", "light", "volume", etc). |
Methods inherited from class livespace.services.Entity |
create, createId, getElvin, getType, getTypeInfo, mutex, sameEntity, shallowClone, waitForProperty, waitForProperty, waitForProperty, waitForProperty |
Methods inherited from class dsto.dfc.databeans.AbstractDataObject |
addFirstPropertyListener, addPropertyListener, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, getBeanValue, getBooleanValue, getBooleanValue, getCharValue, getCharValue, getDoubleValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getObjectValue, getPropertyListeners, getShortValue, getStringValue, registerValue, removePropertyListener, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, unregisterValue |
ENTITY_TYPE
public static final String ENTITY_TYPE
- See Also:
- Constant Field Values
DIMMER_DEVICE
public static final String DIMMER_DEVICE
- See Also:
- Constant Field Values
FLUORO_DEVICE
public static final String FLUORO_DEVICE
- See Also:
- Constant Field Values
MIN_LEVEL
public static final int MIN_LEVEL
- See Also:
- Constant Field Values
MAX_LEVEL
public static final int MAX_LEVEL
- See Also:
- Constant Field Values
level
public int level
rampTime
public int rampTime
deviceAddress
public String deviceAddress
implType
public String implType
deviceType
public String deviceType
LightEntity
public LightEntity()
LightEntity
public LightEntity(String id,
String name)
getType
public String getType()
- Description copied from class:
Entity
- The type of the object (eg "room", "light", "volume", etc). This must be
unique to the entity class.
NOTE: it is also a good practice to provide a static field that defines the
entity type on the class: eg
public static final String ENTITY_TYPE = "room";
- Specified by:
getType
in class Entity
Copyright © 2008 Commonwealth of Australia