1.0.0

org.eclipse.soda.dk.wire
Class Wire

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.device.Control
          extended by org.eclipse.soda.dk.wire.Wire
All Implemented Interfaces:
CommandListener, ControlService, MeasurementListener, SignalListener, ErrorListener

public class Wire
extends Control
implements MeasurementListener, CommandListener, SignalListener

The Wire class implements the MeasurementListener interface.

Version:
1.0.0
See Also:
Control, CommandListener, ControlService, ErrorListener, MeasurementListener, MessageHandler, SignalListener, TransformService

Field Summary
 
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
Wire(java.lang.String key, ControlService source, ControlService target, TransformService transform)
          Constructs an Wire object using the input parameter(s).
 
Method Summary
 void addSourceListener(ControlService source)
          Adds the specified listener to receive listener notification.
 void commandExecuted(CommandService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the command is executed.
 void execute(java.lang.Object data)
          Perform the execute action method.
 ControlService getSource()
          Gets the ControlService source property value.
 ControlService getTarget()
          Gets the ControlService target property value.
 TransformService getTransform()
          Gets the transform (TransformService) value.
 void measurementChanged(MeasurementService source, java.lang.Object timestamp, java.lang.Object newValue, java.lang.Object oldValue)
          This method is fired to all Listeners each time the value of the measurement changes.
protected  void setSource(ControlService source)
          Sets the source property.
protected  void setTarget(ControlService target)
          Sets the target property.
 void setTransform(TransformService transform)
          Sets the transform value.
 void signalOccurred(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the signal triggerred.
 
Methods inherited from class org.eclipse.soda.dk.device.Control
attemptRecoveryFromError, equalsValue, errorOccurred, getCodeKey, getErrorSeverity, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey, toString
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleStaticError, handleStaticException, isDebug, isTrace, loadService, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toStringConfigurationKeys, toStringInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 

Constructor Detail

Wire

public Wire(java.lang.String key,
            ControlService source,
            ControlService target,
            TransformService transform)
Constructs an Wire object using the input parameter(s).

Parameters:
key - java.lang.String
source - org.eclipse.soda.dk.device.service.ControlService
target - org.eclipse.soda.dk.device.service.ControlService
transform - org.eclipse.soda.dk.transform.service.TransformService
Method Detail

addSourceListener

public void addSourceListener(ControlService source)
Adds the specified listener to receive listener notification.

Parameters:
source - The org.eclipse.soda.dk.device.service.ControlService listener to be added.

commandExecuted

public void commandExecuted(CommandService source,
                            java.lang.Object timestamp,
                            java.lang.Object data)
This method is fired to all Listeners each time the command is executed. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
commandExecuted in interface CommandListener
Parameters:
source - CommandService which was executed.
timestamp - The time at which the command execution was detected.
data - Any data which was contained within the command.

execute

public void execute(java.lang.Object data)
Perform the execute action method.

Parameters:
data - java.lang.Object

getSource

public ControlService getSource()
Gets the ControlService source property value.

Returns:
Results of the get source (ControlService) value.
See Also:
setSource(ControlService)

getTarget

public ControlService getTarget()
Gets the ControlService target property value.

Returns:
Results of the get target (ControlService) value.
See Also:
setTarget(ControlService)

getTransform

public TransformService getTransform()
Gets the transform (TransformService) value.

Returns:
The transform (TransformService) value.
See Also:
setTransform(TransformService)

measurementChanged

public void measurementChanged(MeasurementService source,
                               java.lang.Object timestamp,
                               java.lang.Object newValue,
                               java.lang.Object oldValue)
This method is fired to all Listeners each time the value of the measurement changes. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
measurementChanged in interface MeasurementListener
Parameters:
source - MeasurementService which changed.
timestamp - The time at which the value change was detected.
newValue - The new value of the MeasurementService.
oldValue - The old value of the MeasurementService.

setSource

protected void setSource(ControlService source)
Sets the source property.

Parameters:
source - The new property value (org.eclipse.soda.dk.device.service.ControlService).
See Also:
getSource()

setTarget

protected void setTarget(ControlService target)
Sets the target property.

Parameters:
target - The new property value (org.eclipse.soda.dk.device.service.ControlService).
See Also:
getTarget()

setTransform

public void setTransform(TransformService transform)
Sets the transform value.

Parameters:
transform - The transform (TransformService) parameter.
See Also:
getTransform()

signalOccurred

public void signalOccurred(SignalService source,
                           java.lang.Object timestamp,
                           java.lang.Object data)
This method is fired to all Listeners each time the signal triggerred. The signal can be triggered when a message is recevied from the hardware or when the trigger method is invoked by the application. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
signalOccurred in interface SignalListener
Parameters:
source - The SignalService which fired.
timestamp - The time at which the signal was detected.
data - Contains any data which was contained within the signal.

1.0.0

Copyright (c) 1999, 2007 IBM