|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.device.Control
org.eclipse.soda.dk.device.Container
org.eclipse.soda.dk.device.Device
public class Device
The Device class implements the DeviceService interface.
Container,
Control,
ControlService,
ErrorListener,
Hashtable,
MessageHandler,
TransportListener| Field Summary | |
|---|---|
static java.lang.String |
POLL_COMMAND_NAME
Define the poll command name (String) constant. |
static java.lang.String |
START_COMMAND_NAME
Define the start command name (String) constant. |
protected static int |
STARTED_MASK
Define the started (int) constant. |
static java.lang.String |
STOP_COMMAND_NAME
Define the stop command name (String) constant. |
| Fields inherited from class org.eclipse.soda.dk.device.Control |
|---|
EXCEPTION_READ_FAILED_RESOURCE, SETVALUEEXCEPTION_RESOURCE |
| Fields inherited from class org.eclipse.soda.dk.core.EscObject |
|---|
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE |
| Constructor Summary | |
|---|---|
Device()
Constructs a Device object. |
|
| Method Summary | |
|---|---|
void |
addDeviceListener(DeviceListener deviceListener)
Add device listener with the specified device listener parameter. |
void |
controlAdded(Container container,
java.lang.Object currentTimestamp,
ControlService control)
Control added with the specified container, current timestamp and control parameters. |
void |
controlRemoved(Container container,
java.lang.Object timestamp,
ControlService control)
Control removed with the specified container, timestamp and control parameters. |
protected void |
finalize()
Perform the finalize action method. |
void |
fireContainerChanged(java.lang.Object timestamp,
int newState,
int oldState)
Fire container changed with the specified timestamp, new state and old state parameters. |
void |
fireErrorOccurred(java.lang.Object timestamp,
java.lang.Object data)
Perform the fireErrorOccurred action method. |
MeasurementService |
getCapabilities()
Defines the Capabilities measurement. |
MeasurementService |
getConfiguration()
Defines the Configuration measurement. |
java.lang.String |
getDefaultKey()
Method getDefaultKey. |
DeviceListener |
getDeviceListener()
Gets the device listener value. |
int |
getMessageCapacity()
Gets the message capacity. |
java.lang.Object |
getMessageKey(MessageService message)
Gets the message key. |
int |
getPriority()
Gets the int priority property value. |
long |
getReadTimeout()
Gets the read timeout (long) value. |
MeasurementService |
getStatus()
Defines the Status measurement. |
java.lang.Thread |
getThread()
Gets the thread value. |
boolean |
hasListeners()
Gets the listeners (boolean) value. |
boolean |
isAutoStart()
Gets the boolean autoStart property value. |
boolean |
isBlockProcessing()
Gets the block processing (boolean) value. |
boolean |
isEvenProcessing()
Gets the even processing (boolean) value. |
boolean |
isRunning()
Gets the running (boolean) value. |
boolean |
isStarted()
Gets the started (boolean) value. |
boolean |
isThreadNeeded()
Gets the thread needed (boolean) value. |
protected void |
load(ControlService control)
Perform the load action method. |
void |
put(java.lang.String key,
ControlService control)
Put with the specified key and control parameters. |
void |
remove(java.lang.String key)
Remove with the specified key parameter. |
void |
removeDeviceListener(DeviceListener deviceListener)
Remove device listener with the specified device listener parameter. |
void |
restart()
Restart. |
void |
run()
Run. |
void |
setDeviceListener(DeviceListener deviceListener)
Sets the device listener value. |
void |
setReadTimeout(long readTimeout)
Sets the read timeout value. |
void |
setRunning(boolean running)
Set the running status. |
void |
setStarted(boolean started)
Sets the started property. |
void |
setThread(java.lang.Thread thread)
Sets the thread value. |
void |
start()
Perform the start action method. |
void |
startup(boolean output)
Startup with the specified output parameter. |
void |
stop()
Perform the stop action method. |
| Methods inherited from class org.eclipse.soda.dk.device.Control |
|---|
equalsValue, getCodeKey, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.soda.dk.device.service.DeviceService |
|---|
elements, exit, get, getCommand, getConfigurationInformation, getMeasurement, getNotificationService, getSignal, getState, getTransport, send, setConfigurationInformation, setNotificationService, setTransport |
| Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService |
|---|
getKey |
| Field Detail |
|---|
public static final java.lang.String START_COMMAND_NAME
public static final java.lang.String STOP_COMMAND_NAME
public static final java.lang.String POLL_COMMAND_NAME
protected static final int STARTED_MASK
| Constructor Detail |
|---|
public Device()
Device object.
| Method Detail |
|---|
public void addDeviceListener(DeviceListener deviceListener)
DeviceListener)
parameter.
addDeviceListener in interface DeviceServicedeviceListener - The device listener (DeviceListener) parameter.getDeviceListener(),
removeDeviceListener(DeviceListener),
setDeviceListener(DeviceListener)
public void controlAdded(Container container,
java.lang.Object currentTimestamp,
ControlService control)
Container) parameter.
The current timestamp (Object) parameter.
The control (ControlService) parameter.
container - The container (Container) parameter.currentTimestamp - The current timestamp (Object) parameter.control - The control (ControlService) parameter.
public void controlRemoved(Container container,
java.lang.Object timestamp,
ControlService control)
Container) parameter.
The timestamp (Object) parameter.
The control (ControlService) parameter.
container - The container (Container) parameter.timestamp - The timestamp (Object) parameter.control - The control (ControlService) parameter.
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.ObjectThrowable.
java.lang.Throwable
public void fireContainerChanged(java.lang.Object timestamp,
int newState,
int oldState)
Object) parameter.
The new state (int) parameter.
The old state (int) parameter.
fireContainerChanged in class Containertimestamp - The timestamp (Object) parameter.newState - The new state (int) parameter.oldState - The old state (int) parameter.
public void fireErrorOccurred(java.lang.Object timestamp,
java.lang.Object data)
java.lang.Object
java.lang.Object
The timestamp (Object) parameter.
The data (Object) parameter.
fireErrorOccurred in class Containertimestamp - The timestamp (Object) parameter.data - The data (Object) parameter.public MeasurementService getCapabilities()
getCapabilities in class ContainerMeasurementService)
value.public MeasurementService getConfiguration()
getConfiguration in class ContainerMeasurementService)
value.public java.lang.String getDefaultKey()
Container
getDefaultKey in class ContainerString) value.Container.getDefaultKey()public DeviceListener getDeviceListener()
DeviceListener) value.addDeviceListener(DeviceListener),
removeDeviceListener(DeviceListener),
setDeviceListener(DeviceListener)public int getMessageCapacity()
public java.lang.Object getMessageKey(MessageService message)
MessageService)
parameter.
message - The message (MessageService) parameter.
Object) value.
The message (MessageService) parameter.public int getPriority()
int priority property value.
Return the priority of the thread.
public long getReadTimeout()
getReadTimeout in class Containerlong) value.setReadTimeout(long)public MeasurementService getStatus()
getStatus in class ContainerMeasurementService)
value.Container.broadcastStatus(),
Container.broadcastStatus(Object,int,int)public java.lang.Thread getThread()
Thread) value.setThread(Thread)public boolean hasListeners()
boolean) value.public boolean isAutoStart()
boolean autoStart property value.
boolean) value.public boolean isBlockProcessing()
boolean) value.public boolean isEvenProcessing()
boolean) value.public boolean isRunning()
isRunning in class Containerboolean) value.setRunning(boolean)public boolean isStarted()
isStarted in interface DeviceServiceboolean) value.setStarted(boolean)public boolean isThreadNeeded()
boolean) value.protected void load(ControlService control)
org.eclipse.soda.dk.device.service.ControlService
The control (ControlService) parameter.
load in class Containercontrol - The control (ControlService) parameter.
public void put(java.lang.String key,
ControlService control)
String) parameter.
The control (ControlService) parameter.
put in interface DeviceServiceput in class Containerkey - The key (String) parameter.control - The control (ControlService) parameter.Container.put(ControlService)public void remove(java.lang.String key)
String) parameter.
remove in interface DeviceServiceremove in class Containerkey - The key (String) parameter.public void removeDeviceListener(DeviceListener deviceListener)
DeviceListener)
parameter.
removeDeviceListener in interface DeviceServicedeviceListener - The device listener (DeviceListener) parameter.addDeviceListener(DeviceListener),
getDeviceListener(),
setDeviceListener(DeviceListener)public void restart()
public void run()
run in interface java.lang.Runnablepublic void setDeviceListener(DeviceListener deviceListener)
DeviceListener)
parameter.
deviceListener - The device listener (DeviceListener) parameter.addDeviceListener(DeviceListener),
getDeviceListener(),
removeDeviceListener(DeviceListener)public void setReadTimeout(long readTimeout)
long)
parameter.
The read timeout (long) parameter.
readTimeout - The read timeout (long) parameter.getReadTimeout()public void setRunning(boolean running)
boolean) parameter.
The running (boolean) parameter.
running - The running (boolean) parameter.isRunning()public void setStarted(boolean started)
boolean).
The started (boolean) parameter.
started - The started (boolean) parameter.isStarted()public void setThread(java.lang.Thread thread)
Thread) parameter.
The thread (Thread) parameter.
thread - The thread (Thread) parameter.getThread()public void start()
start in interface DeviceServicestart in class ContainerDeviceService.start()public void startup(boolean output)
boolean)
parameter.
The output (boolean) parameter.
output - The output (boolean) parameter.public void stop()
stop in interface DeviceServicestop in class ContainerDeviceService.stop()
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||