|
2009-01-09 1.2.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 | |
|---|---|
protected Signal |
channelChanged
Define the channel changed (Signal) field. |
protected Measurement |
channels
Define the channels (Measurement) field. |
protected Command |
closeChannel
Define the close channel (Command) field. |
protected Command |
openChannel
Define the open channel (Command) field. |
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, SET_VALUE_EXCEPTION_RESOURCE |
| Constructor Summary | |
|---|---|
|
Device()
Constructs a Device object. |
protected |
Device(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics)
Constructs an instance of this class from the specified capabilities, status, configuration and metrics parameters. |
protected |
Device(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics,
java.lang.String channels,
java.lang.String channelChanged,
java.lang.String openChannel,
java.lang.String closeChannel)
Constructs an instance of this class from the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters. |
| Method Summary | |
|---|---|
void |
addDeviceListener(DeviceListener deviceListener)
Add device listener with the specified device listener parameter. |
protected void |
channelChanged(java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
Channel changed with the specified timestamp, channel, new state and old state parameters. |
void |
channelChanged(TransportService source,
java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
Channel changed with the specified source, timestamp, channel, new state and old state parameters. |
void |
closeChannel(ChannelService channel)
Close channel with the specified channel parameter. |
void |
controlAdded(EscObject container,
java.lang.Object currentTimestamp,
ControlService control)
Control added with the specified container, current timestamp and control parameters. |
void |
controlRemoved(EscObject 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 |
fireChannelChanged(java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
Fire channel changed with the specified timestamp, channel, new state and old state parameters. |
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. |
ChannelService |
getChannel(java.lang.String channelId)
Get channel with the specified channel id parameter and return the ChannelService result. |
Signal |
getChannelChanged()
Gets the channel changed (Signal) value. |
Measurement |
getChannels()
Gets the channels (Measurement) value. |
Command |
getCloseChannel()
Gets the close channel (Command) value. |
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 (int) value. |
java.lang.Object |
getMessageKey(MessageService message)
Get message key with the specified message parameter and return the Object result. |
MultiplexDeviceListener |
getMultiplexDeviceListener()
Gets the multiplex device listener value. |
int |
getNotificationPriorityDefault()
Gets the notification priority default (int) value. |
Command |
getOpenChannel()
Gets the open channel (Command) value. |
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. |
java.lang.Object |
handleMethodChannels(int code,
Measurement measurement,
ChannelService channel,
java.lang.Object data)
Handle method channels with the specified code, measurement, channel and data parameters and return the Object result. |
java.lang.Object |
handleMethodCloseChannel(int code,
Command command,
ChannelService channel,
java.lang.Object data)
Handle method close channel with the specified code, command, channel and data parameters and return the Object result. |
java.lang.Object |
handleMethodMetrics(int code,
Measurement measurement,
ChannelService channel,
java.lang.Object data)
Handle method metrics with the specified code, measurement, channel and data parameters and return the Object result. |
java.lang.Object |
handleMethodOpenChannel(int code,
Command command,
ChannelService channel,
java.lang.Object data)
Handle method open channel with the specified code, command, channel and data parameters and return the Object result. |
boolean |
hasListeners()
Gets the listeners (boolean) value. |
protected void |
initialize(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics)
Initialize with the specified capabilities, status, configuration and metrics parameters. |
protected void |
initialize(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics,
java.lang.String channels,
java.lang.String channelChanged,
java.lang.String openChannel,
java.lang.String closeChannel)
Initialize with the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters. |
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. |
ChannelService |
openChannel(java.util.Map parameters)
Open channel with the specified parameters parameter and return the ChannelService result. |
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)
Sets the running value. |
void |
setStarted(boolean started)
Sets the started value. |
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, findMethod, 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, send, send, 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
protected Measurement channels
protected Signal channelChanged
protected Command openChannel
protected Command closeChannel
| Constructor Detail |
|---|
public Device()
Device object.
Device(String,String,String,String),
Device(String,String,String,String,String,String,String,String)
protected Device(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics)
capabilities - The capabilities (String) parameter.status - The status (String) parameter.configuration - The configuration (String) parameter.metrics - The metrics (String) parameter.Device(),
Device(String,String,String,String,String,String,String,String)
protected Device(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics,
java.lang.String channels,
java.lang.String channelChanged,
java.lang.String openChannel,
java.lang.String closeChannel)
capabilities - The capabilities (String) parameter.status - The status (String) parameter.configuration - The configuration (String) parameter.metrics - The metrics (String) parameter.channels - The channels (String) parameter.channelChanged - The channel changed (String) parameter.openChannel - The open channel (String) parameter.closeChannel - The close channel (String) parameter.Device(),
Device(String,String,String,String)| Method Detail |
|---|
public void addDeviceListener(DeviceListener deviceListener)
addDeviceListener in interface DeviceServicedeviceListener - The device listener (DeviceListener) parameter.getDeviceListener(),
getMultiplexDeviceListener(),
removeDeviceListener(DeviceListener),
setDeviceListener(DeviceListener)
protected void channelChanged(java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
timestamp - The time stamp (Object) parameter.channel - The channel (ChannelService) parameter.newState - The new state (int) parameter.oldState - The old state (int) parameter.channelChanged(TransportService,Object,ChannelService,int,int),
fireChannelChanged(Object,ChannelService,int,int),
fireContainerChanged(Object,int,int),
getChannelChanged()
public void channelChanged(TransportService source,
java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
source - The source (TransportService) parameter.timestamp - The time stamp (Object) parameter.channel - The channel (ChannelService) parameter.newState - The new state (int) parameter.oldState - The old state (int) parameter.channelChanged(Object,ChannelService,int,int),
fireChannelChanged(Object,ChannelService,int,int),
fireContainerChanged(Object,int,int),
getChannelChanged()public void closeChannel(ChannelService channel)
closeChannel in interface DeviceServicechannel - The channel (ChannelService) parameter.getChannel(String),
getCloseChannel(),
getOpenChannel(),
handleMethodCloseChannel(int,Command,ChannelService,Object),
handleMethodOpenChannel(int,Command,ChannelService,Object),
openChannel(Map)
public void controlAdded(EscObject container,
java.lang.Object currentTimestamp,
ControlService control)
container - The container (EscObject) parameter.currentTimestamp - The current time stamp (Object) parameter.control - The control (ControlService) parameter.
public void controlRemoved(EscObject container,
java.lang.Object timestamp,
ControlService control)
container - The container (EscObject) parameter.timestamp - The time stamp (Object) parameter.control - The control (ControlService) parameter.
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - Throwable.
public void fireChannelChanged(java.lang.Object timestamp,
ChannelService channel,
int newState,
int oldState)
timestamp - The time stamp (Object) parameter.channel - The channel (ChannelService) parameter.newState - The new state (int) parameter.oldState - The old state (int) parameter.getChannelChanged()
public void fireContainerChanged(java.lang.Object timestamp,
int newState,
int oldState)
fireContainerChanged in class Containertimestamp - The time stamp (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)
fireErrorOccurred in class Containertimestamp - The time stamp (Object) parameter.data - The data (Object) parameter.public MeasurementService getCapabilities()
getCapabilities in class ContainerMeasurementService)public ChannelService getChannel(java.lang.String channelId)
getChannel in interface DeviceServicechannelId - The channel ID (String) parameter.
ChannelService) value.closeChannel(ChannelService),
getCloseChannel(),
getOpenChannel(),
handleMethodCloseChannel(int,Command,ChannelService,Object),
handleMethodOpenChannel(int,Command,ChannelService,Object),
openChannel(Map)public Signal getChannelChanged()
Signal) value.fireChannelChanged(Object,ChannelService,int,int)public Measurement getChannels()
Measurement) value.handleMethodChannels(int,Measurement,ChannelService,Object)public Command getCloseChannel()
Command) value.handleMethodCloseChannel(int,Command,ChannelService,Object)public MeasurementService getConfiguration()
getConfiguration in class ContainerMeasurementService)public java.lang.String getDefaultKey()
Container
getDefaultKey in class ContainerString) value.Container.getDefaultKey()public DeviceListener getDeviceListener()
DeviceListener) value.addDeviceListener(DeviceListener),
getMultiplexDeviceListener(),
removeDeviceListener(DeviceListener),
setDeviceListener(DeviceListener)public int getMessageCapacity()
public java.lang.Object getMessageKey(MessageService message)
message - The message (MessageService) parameter.
Object) value.public MultiplexDeviceListener getMultiplexDeviceListener()
MultiplexDeviceListener) value.public int getNotificationPriorityDefault()
getNotificationPriorityDefault in class Containerint) value.public Command getOpenChannel()
Command) value.handleMethodOpenChannel(int,Command,ChannelService,Object)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)Container.broadcastStatus(),
Container.broadcastStatus(Object,int,int)public java.lang.Thread getThread()
Thread) value.setThread(Thread)
public java.lang.Object handleMethodChannels(int code,
Measurement measurement,
ChannelService channel,
java.lang.Object data)
code - The code (int) parameter.measurement - The measurement (Measurement) parameter.channel - The channel (ChannelService) parameter.data - The data (Object) parameter.
Object) value.
public java.lang.Object handleMethodCloseChannel(int code,
Command command,
ChannelService channel,
java.lang.Object data)
throws java.io.IOException
code - The code (int) parameter.command - The command (Command) parameter.channel - The channel (ChannelService) parameter.data - The data (Object) parameter.
Object) value.
java.io.IOException - IOException.
public java.lang.Object handleMethodMetrics(int code,
Measurement measurement,
ChannelService channel,
java.lang.Object data)
code - The code (int) parameter.measurement - The measurement (Measurement) parameter.channel - The channel (ChannelService) parameter.data - The data (Object) parameter.
Object) value.
public java.lang.Object handleMethodOpenChannel(int code,
Command command,
ChannelService channel,
java.lang.Object data)
throws java.io.IOException
code - The code (int) parameter.command - The command (Command) parameter.channel - The channel (ChannelService) parameter.data - The data (Object) parameter.
Object) value.
java.io.IOException - IOException.public boolean hasListeners()
boolean) value.
protected void initialize(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics)
capabilities - The capabilities (String) parameter.status - The status (String) parameter.configuration - The configuration (String) parameter.metrics - The metrics (String) parameter.initialize(String,String,String,String,String,String,String,String)
protected void initialize(java.lang.String capabilities,
java.lang.String status,
java.lang.String configuration,
java.lang.String metrics,
java.lang.String channels,
java.lang.String channelChanged,
java.lang.String openChannel,
java.lang.String closeChannel)
capabilities - The capabilities (String) parameter.status - The status (String) parameter.configuration - The configuration (String) parameter.metrics - The metrics (String) parameter.channels - The channels (String) parameter.channelChanged - The channel changed (String) parameter.openChannel - The open channel (String) parameter.closeChannel - The close channel (String) parameter.initialize(String,String,String,String)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
load in class Containercontrol - The control (ControlService) parameter.
public ChannelService openChannel(java.util.Map parameters)
throws java.io.IOException
openChannel in interface DeviceServiceparameters - The parameters (Map) parameter.
ChannelService) value.
java.io.IOException - IOException.closeChannel(ChannelService),
getChannel(String),
getCloseChannel(),
getOpenChannel(),
handleMethodCloseChannel(int,Command,ChannelService,Object),
handleMethodOpenChannel(int,Command,ChannelService,Object)
public void put(java.lang.String key,
ControlService control)
String)
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)
remove in interface DeviceServiceremove in class Containerkey - The key (String) parameter.public void removeDeviceListener(DeviceListener deviceListener)
removeDeviceListener in interface DeviceServicedeviceListener - The device listener (DeviceListener) parameter.addDeviceListener(DeviceListener),
getDeviceListener(),
getMultiplexDeviceListener(),
setDeviceListener(DeviceListener)public void restart()
public void run()
run in interface java.lang.Runnablepublic void setDeviceListener(DeviceListener deviceListener)
deviceListener - The device listener (DeviceListener) parameter.addDeviceListener(DeviceListener),
getDeviceListener(),
getMultiplexDeviceListener(),
removeDeviceListener(DeviceListener)public void setReadTimeout(long readTimeout)
readTimeout - The read timeout (long) parameter.getReadTimeout()public void setRunning(boolean running)
running - The running (boolean) parameter.isRunning()public void setStarted(boolean started)
started - The started (boolean) parameter.isStarted()public void setThread(java.lang.Thread thread)
thread - The thread (Thread) parameter.getThread()public void start()
start in interface DeviceServicestart in class ContainerDeviceService.start()public void startup(boolean output)
boolean)
output - The output (boolean) parameter.public void stop()
stop in interface DeviceServicestop in class ContainerDeviceService.stop()
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||