public abstract class AbstractHobsonDeviceProxy extends java.lang.Object implements HobsonDeviceProxy
| Constructor and Description |
|---|
AbstractHobsonDeviceProxy(HobsonPlugin plugin,
java.lang.String id,
java.lang.String defaultName,
DeviceType type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTag(java.lang.String tag) |
protected DeviceProxyVariable |
createDeviceVariable(java.lang.String name,
VariableMask mask) |
protected DeviceProxyVariable |
createDeviceVariable(java.lang.String name,
VariableMask mask,
java.lang.Object value,
java.lang.Long lastUpdate) |
protected DeviceProxyVariable |
createDeviceVariable(java.lang.String name,
VariableMask mask,
VariableMediaType mediaType) |
protected DeviceProxyVariable |
createDeviceVariable(java.lang.String name,
VariableMask mask,
VariableMediaType mediaType,
java.lang.Object value,
java.lang.Long lastUpdate) |
PropertyContainerClass |
getConfigurationClass() |
protected java.lang.Object |
getConfigurationProperty(java.lang.String name) |
protected abstract TypedProperty[] |
getConfigurationPropertyTypes()
Returns an array of configuration properties the device supports.
|
DeviceContext |
getContext() |
java.lang.String |
getDefaultName() |
HobsonDeviceDescriptor |
getDescriptor() |
DeviceError |
getError() |
java.lang.Long |
getLastCheckin() |
java.lang.String |
getName() |
protected HobsonPlugin |
getPlugin()
Returns this device's plugin.
|
DeviceType |
getType() |
DeviceVariableState |
getVariableState(java.lang.String name) |
boolean |
hasError() |
boolean |
hasVariable(java.lang.String name) |
boolean |
isStarted() |
protected void |
postEvent(HobsonEvent event) |
protected void |
publishActionProvider(ActionProvider actionProvider) |
protected void |
publishVariables(java.util.Collection<DeviceProxyVariable> vars) |
protected void |
publishVariables(DeviceProxyVariable... vars) |
protected void |
setConfigurationProperty(java.lang.String name,
java.lang.Object value) |
protected void |
setError(DeviceError deviceError)
Sets the error information for this device and puts the device into an error state.
|
void |
setLastCheckin(java.lang.Long lastCheckin) |
protected void |
setVariableValue(java.lang.String name,
java.lang.Object value,
java.lang.Long updateTime) |
protected void |
setVariableValues(java.util.Map<java.lang.String,java.lang.Object> values) |
void |
start(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> config) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetManufacturerName, getManufacturerVersion, getModelName, getPreferredVariableName, onDeviceConfigurationUpdate, onSetVariables, onShutdown, onStartuppublic AbstractHobsonDeviceProxy(HobsonPlugin plugin, java.lang.String id, java.lang.String defaultName, DeviceType type)
plugin - the HobsonPlugin that created this deviceid - the device IDdefaultName - the default name of the device (used when a user-defined name does not exist)type - the type of devicepublic PropertyContainerClass getConfigurationClass()
getConfigurationClass in interface HobsonDeviceProxypublic DeviceContext getContext()
getContext in interface HobsonDeviceProxypublic java.lang.String getDefaultName()
getDefaultName in interface HobsonDeviceProxypublic HobsonDeviceDescriptor getDescriptor()
getDescriptor in interface HobsonDeviceProxypublic DeviceError getError()
getError in interface HobsonDeviceProxypublic java.lang.Long getLastCheckin()
getLastCheckin in interface HobsonDeviceProxypublic java.lang.String getName()
getName in interface HobsonDeviceProxypublic DeviceType getType()
getType in interface HobsonDeviceProxypublic DeviceVariableState getVariableState(java.lang.String name)
getVariableState in interface HobsonDeviceProxypublic boolean hasError()
hasError in interface HobsonDeviceProxypublic boolean hasVariable(java.lang.String name)
hasVariable in interface HobsonDeviceProxypublic boolean isStarted()
isStarted in interface HobsonDeviceProxypublic void setLastCheckin(java.lang.Long lastCheckin)
setLastCheckin in interface HobsonDeviceProxypublic void start(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> config)
start in interface HobsonDeviceProxyprotected void addTag(java.lang.String tag)
protected DeviceProxyVariable createDeviceVariable(java.lang.String name, VariableMask mask)
protected DeviceProxyVariable createDeviceVariable(java.lang.String name, VariableMask mask, VariableMediaType mediaType)
protected DeviceProxyVariable createDeviceVariable(java.lang.String name, VariableMask mask, VariableMediaType mediaType, java.lang.Object value, java.lang.Long lastUpdate)
protected DeviceProxyVariable createDeviceVariable(java.lang.String name, VariableMask mask, java.lang.Object value, java.lang.Long lastUpdate)
protected abstract TypedProperty[] getConfigurationPropertyTypes()
protected java.lang.Object getConfigurationProperty(java.lang.String name)
protected HobsonPlugin getPlugin()
protected void postEvent(HobsonEvent event)
protected void publishActionProvider(ActionProvider actionProvider)
protected void publishVariables(DeviceProxyVariable... vars)
protected void publishVariables(java.util.Collection<DeviceProxyVariable> vars)
protected void setConfigurationProperty(java.lang.String name,
java.lang.Object value)
protected void setError(DeviceError deviceError)
deviceError - the device error informationprotected void setVariableValue(java.lang.String name,
java.lang.Object value,
java.lang.Long updateTime)
protected void setVariableValues(java.util.Map<java.lang.String,java.lang.Object> values)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2015 Whizzo Software LLC. All rights reserved.