1.0.0

org.eclipse.soda.dk.device.test
Class DeviceTest

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.notification.client.NotificationClient
          extended by org.eclipse.soda.dk.device.test.DeviceTest
All Implemented Interfaces:
java.lang.Runnable, CommandListener, DeviceListener, DeviceTestService, MeasurementListener, SignalListener, ErrorListener

public class DeviceTest
extends NotificationClient
implements DeviceTestService, java.lang.Runnable, CommandListener, SignalListener, MeasurementListener, DeviceListener

Version:
1.0.0
See Also:
org.eclipse.soda.dk.command.service, org.eclipse.soda.dk.connection.service, org.eclipse.soda.dk.core, org.eclipse.soda.dk.core.service, org.eclipse.soda.dk.device.service, org.eclipse.soda.dk.device.test, org.eclipse.soda.dk.device.test.service, org.eclipse.soda.dk.measurement.service, org.eclipse.soda.dk.nls, org.eclipse.soda.dk.signal.service, org.eclipse.soda.dk.transport, org.eclipse.soda.dk.transport.service, org.eclipse.soda.dk.command.service, org.eclipse.soda.dk.connection.service, org.eclipse.soda.dk.core, org.eclipse.soda.dk.core.service, org.eclipse.soda.dk.device.service, org.eclipse.soda.dk.device.test, org.eclipse.soda.dk.device.test.service, org.eclipse.soda.dk.measurement.service, org.eclipse.soda.dk.nls, org.eclipse.soda.dk.signal.service, org.eclipse.soda.dk.transport, org.eclipse.soda.dk.transport.service, org.eclipse.soda.dk.command.service, org.eclipse.soda.dk.connection.service, org.eclipse.soda.dk.core, org.eclipse.soda.dk.core.service, org.eclipse.soda.dk.device.service, org.eclipse.soda.dk.device.test, org.eclipse.soda.dk.device.test.service, org.eclipse.soda.dk.measurement.service, org.eclipse.soda.dk.nls, org.eclipse.soda.dk.signal.service, org.eclipse.soda.dk.transport, org.eclipse.soda.dk.transport.service

Field Summary
static java.lang.String CLASS_NAME
          Defines the class name.
protected  boolean configurationSave
          Define the configuration save (boolean) field.
static int DEFAULT_PRIORITY
          Define the default priority (int) constant.
static long DEFAULT_READ_TIMEOUT
          Define the default read timeout (long) constant.
static int DEFAULT_TEST_COUNT
          Define the default test count (int) constant.
static long DEFAULT_TEST_DELAY
          Define the default test delay (long) constant.
static boolean DEFAULT_TEST_EXECUTE
          Define the default test execute (boolean) constant.
static boolean DEFAULT_TEST_EXECUTE_READ
          Define the default test execute read (boolean) constant.
static boolean DEFAULT_TEST_EXECUTE_WRITE
          Define the default test execute write (boolean) constant.
static boolean DEFAULT_TEST_READ
          Define the default test read (boolean) constant.
static boolean DEFAULT_TEST_TRIGGER
          Define the default test trigger (boolean) constant.
static long DEFAULT_TOTAL_TEST_TIME
          Define the default total test time (long) constant.
protected static int DEVICE_TEST_ACTIVE_STATE_RESOURCE
          Define the device test active state resource (int) constant.
protected static int DEVICE_TEST_ALIVE_STATE_RESOURCE
          Define the device test alive state resource (int) constant.
protected static int DEVICE_TEST_COMMAND_DATA_NOTIFICATION_RESOURCE
          Define the device test command data notification resource (int) constant.
protected static int DEVICE_TEST_COMMAND_EXCEPTION_RESOURCE
          Define the device test command exception resource (int) constant.
protected static int DEVICE_TEST_COMMAND_NOT_FOUND_RESOURCE
          Define the device test command not found resource (int) constant.
protected static int DEVICE_TEST_COMMAND_NOTIFICATION_RESOURCE
          Define the device test command notification resource (int) constant.
protected static int DEVICE_TEST_CONNECTED_STATE_RESOURCE
          Define the device test connected state resource (int) constant.
protected static int DEVICE_TEST_CONTROL_NOTIFICATION_RESOURCE
          Define the device test control notification resource (int) constant.
protected static int DEVICE_TEST_CREATED_STATE_RESOURCE
          Define the device test created state resource (int) constant.
protected static int DEVICE_TEST_DATA_NOTIFICATION_RESOURCE
          Define the device test data notification resource (int) constant.
protected static int DEVICE_TEST_DEAD_STATE_RESOURCE
          Define the device test dead state resource (int) constant.
protected static int DEVICE_TEST_DEVICE_CONFIGURATION_MISCOMPARE_RESOURCE
          Define the device test device configuration miscompare resource (int) constant.
protected static int DEVICE_TEST_ERROR_NOTIFICATION_RESOURCE
          Define the device test error notification resource (int) constant.
protected static int DEVICE_TEST_EXIT_RESOURCE
          Define the device test exit resource (int) constant.
protected static int DEVICE_TEST_MEASUREMENT_EXCEPTION_RESOURCE
          Define the device test measurement exception resource (int) constant.
protected static int DEVICE_TEST_MEASUREMENT_NOT_FOUND_RESOURCE
          Define the device test measurement not found resource (int) constant.
protected static int DEVICE_TEST_MEASUREMENT_NOTIFICATION_RESOURCE
          Define the device test measurement notification resource (int) constant.
protected static int DEVICE_TEST_MEASUREMENT_VALUE_NOTIFICATION_RESOURCE
          Define the device test measurement value notification resource (int) constant.
protected static int DEVICE_TEST_SEND_EXCEPTION_RESOURCE
          Define the device test send exception resource (int) constant.
protected static int DEVICE_TEST_SIGNAL_DATA_NOTIFICATION_RESOURCE
          Define the device test signal data notification resource (int) constant.
protected static int DEVICE_TEST_SIGNAL_EXCEPTION_RESOURCE
          Define the device test signal exception resource (int) constant.
protected static int DEVICE_TEST_SIGNAL_NOT_FOUND_RESOURCE
          Define the device test signal not found resource (int) constant.
protected static int DEVICE_TEST_SIGNAL_NOTIFICATION_RESOURCE
          Define the device test signal notification resource (int) constant.
protected static int DEVICE_TEST_START_EXECUTION_RESOURCE
          Define the device test start execution resource (int) constant.
protected static int DEVICE_TEST_START_RESOURCE
          Define the device test start resource (int) constant.
protected static int DEVICE_TEST_STARTED_STATE_RESOURCE
          Define the device test started state resource (int) constant.
protected static int[] DEVICE_TEST_STATE_RESOURCE_TABLE
          Define the device test state resource table (int[]) constant.
protected static int DEVICE_TEST_STOP_EXECUTION_RESOURCE
          Define the device test stop execution resource (int) constant.
protected static int DEVICE_TEST_STOP_RESOURCE
          Define the device test stop resource (int) constant.
protected static int DEVICE_TEST_WAITING_RESOURCE
          Define the device test waiting resource (int) constant.
protected  java.util.Dictionary deviceConfigurationInformation
          Define the device configuration information (Dictionary) field.
 
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
 
Fields inherited from interface org.eclipse.soda.dk.device.test.service.DeviceTestService
SERVICE_NAME
 
Fields inherited from interface org.eclipse.soda.dk.device.service.DeviceListener
ADDED, CHANGED, REMOVED
 
Constructor Summary
DeviceTest()
          Constructs a new instance of the RfidAsystSecsDeviceTest class.
 
Method Summary
 void checkNotification()
          Check 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 controlChanged(DeviceService container, java.lang.Object timestamp, ControlService control, int code)
          The controlChanged method is called when a control was changed.
 void deviceChanged(DeviceService deviceService, java.lang.Object timestamp, int newState, int oldState)
          This method will be called when the state of the DeviceService changes.
 void deviceConfigurationCompare()
          Transport configuration compare.
 void deviceConfigurationSave()
          Transport configuration save.
 void endTests()
          End tests.
 void errorOccurred(java.lang.Object source, java.lang.Object timestamp, java.lang.Object data)
          The errorOccurred method is called when an error has occurred.
 void exit()
          Exit.
 java.lang.String formatData(java.lang.Object data)
          The formatData will format the data values to a nice string.
 java.util.Dictionary getConfigurationInformation()
          Return the property table.
 java.lang.Object getConfigurationInformation(java.lang.String propertyName)
          Return the property value.
 ConfigurationService getConfigurationService()
          Gets the configuration service value.
 java.lang.String getCopyright()
          Gets the copyright (String) value.
 DeviceService getDefaultDevice()
          Gets the default device (DeviceService) value.
 DeviceService getDevice()
          Gets the device to be tested.
 java.util.Dictionary getDeviceConfigurationInformation()
          Gets the device configuration information (Dictionary) value.
protected  int getErrorSeverity(int errorNumber, java.lang.Throwable error)
          Get error severity with the specified error number and error parameters and return the int result.
 java.lang.Object getLogDetails4()
          Gets the log details4 (Object) value.
 java.lang.Object getLogDetails5()
          Gets the log details5 (Object) value.
 java.lang.Object getLogDetails6()
          Gets the log details6 (Object) value.
 int getPriority()
          Gets the priority (int) value.
 long getReadTimeout()
          Gets the read timeout (long) value.
 java.lang.String getResource(int resourceId)
          Gets the string resource using the supplied resourceId.
 int getTestCount()
          Gets the test count (int) value.
 long getTestDelay()
          Gets the test delay (long) value.
 boolean getTestExecute()
          Gets the testExecute property value.
 boolean getTestExecuteRead()
          Gets the testExecuteRead property value.
 boolean getTestExecuteWrite()
          Gets the testExecuteWrite property value.
 boolean getTestRead()
          Gets the testRead property value.
 boolean getTestTrigger()
          Gets the testTrigger property value.
 java.lang.Thread getThread()
          Gets the thread to be used in testing.
 long getTotalTestTime()
          Gets the total test time (long) value.
 TransportService getTransport()
          Gets the transport (TransportService) value.
 java.lang.String getVendor()
          Gets the vendor (String) value.
 boolean isActive()
          Gets the active status.
 boolean isConfigurationSave()
          Gets the configuration save (boolean) 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.
 void notificationReceived(java.lang.String externalKey, java.lang.Object data)
          Notification received with the specified external key and data parameters.
 void putConfigurationInformation(java.lang.String propertyName, java.lang.Object value)
          Set the specified property value.
 void run()
          Run tests for the device.
 void run(java.lang.String[] args)
          Run with the specified args parameter.
 void runTests()
          Run tests.
 void setActive(boolean active)
          Sets the active status.
 void setConfigurationInformation(java.util.Dictionary configurationInformation)
          Sets the configuration information value.
 void setConfigurationSave(boolean configurationSave)
          Sets the configuration save value.
 void setDevice(DeviceService device)
          Sets the device to be tested.
 void setDeviceConfigurationInformation(java.util.Dictionary deviceConfigurationInformation)
          Sets the device configuration information value.
 void setPriority(int priority)
          Sets the priority value.
 void setReadTimeout(long readTimeout)
          Sets the read timeout value.
 void setTestCount(int testCount)
          Sets the test count value.
 void setTestDelay(long testDelay)
          Sets the test delay value.
 void setTestExecute(boolean testExecute)
          Sets the testExecute property value.
 void setTestExecuteRead(boolean testExecuteRead)
          Sets the testExecuteRead property value.
 void setTestExecuteWrite(boolean testExecuteWrite)
          Sets the testExecuteWrite property value.
 void setTestRead(boolean testRead)
          Sets the testRead property value.
 void setTestTrigger(boolean testTrigger)
          Sets the testTrigger property value.
 void setThread(java.lang.Thread thread)
          Sets the thread.
 void setTotalTestTime(long totalTestTime)
          Sets the total test time value.
 void setup()
          Setup.
 void signalOccurred(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the signal triggerred.
 void start()
          Start the test case.
 void startTests()
          Start tests.
 void stop()
          Stops the test case.
 void test()
          Tests the device.
 void testCommand(java.lang.String commandName)
          Test command with the specified command name parameter.
 void testMeasurement(java.lang.String measurementName)
          Test measurement with the specified measurement name parameter.
 void testSignal(java.lang.String signalName)
          Test signal with the specified signal name parameter.
 java.lang.String toString()
          Returns the string value.
 void waitForStarted()
          Wait for started.
 
Methods inherited from class org.eclipse.soda.dk.notification.client.NotificationClient
broadcast, getNotificationController, getNotificationService, register, register, setNotificationController, setNotificationService, unregister
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
attemptRecoveryFromError, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, 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.device.test.service.DeviceTestService
getNotificationService, setNotificationService
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the class name.


DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
Define the default priority (int) constant.

See Also:
Constant Field Values

DEFAULT_TEST_COUNT

public static final int DEFAULT_TEST_COUNT
Define the default test count (int) constant.

See Also:
Constant Field Values

DEFAULT_TEST_DELAY

public static final long DEFAULT_TEST_DELAY
Define the default test delay (long) constant.

See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE

public static final boolean DEFAULT_TEST_EXECUTE
Define the default test execute (boolean) constant.

See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE_READ

public static final boolean DEFAULT_TEST_EXECUTE_READ
Define the default test execute read (boolean) constant.

See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE_WRITE

public static final boolean DEFAULT_TEST_EXECUTE_WRITE
Define the default test execute write (boolean) constant.

See Also:
Constant Field Values

DEFAULT_TEST_READ

public static final boolean DEFAULT_TEST_READ
Define the default test read (boolean) constant.

See Also:
Constant Field Values

DEFAULT_TEST_TRIGGER

public static final boolean DEFAULT_TEST_TRIGGER
Define the default test trigger (boolean) constant.

See Also:
Constant Field Values

DEFAULT_TOTAL_TEST_TIME

public static final long DEFAULT_TOTAL_TEST_TIME
Define the default total test time (long) constant.

See Also:
Constant Field Values

DEFAULT_READ_TIMEOUT

public static final long DEFAULT_READ_TIMEOUT
Define the default read timeout (long) constant.

See Also:
Constant Field Values

DEVICE_TEST_DEAD_STATE_RESOURCE

protected static final int DEVICE_TEST_DEAD_STATE_RESOURCE
Define the device test dead state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_CREATED_STATE_RESOURCE

protected static final int DEVICE_TEST_CREATED_STATE_RESOURCE
Define the device test created state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_ALIVE_STATE_RESOURCE

protected static final int DEVICE_TEST_ALIVE_STATE_RESOURCE
Define the device test alive state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_CONNECTED_STATE_RESOURCE

protected static final int DEVICE_TEST_CONNECTED_STATE_RESOURCE
Define the device test connected state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_ACTIVE_STATE_RESOURCE

protected static final int DEVICE_TEST_ACTIVE_STATE_RESOURCE
Define the device test active state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_STARTED_STATE_RESOURCE

protected static final int DEVICE_TEST_STARTED_STATE_RESOURCE
Define the device test started state resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_STATE_RESOURCE_TABLE

protected static final int[] DEVICE_TEST_STATE_RESOURCE_TABLE
Define the device test state resource table (int[]) constant.


DEVICE_TEST_ERROR_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_ERROR_NOTIFICATION_RESOURCE
Define the device test error notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_SIGNAL_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_SIGNAL_NOTIFICATION_RESOURCE
Define the device test signal notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_SIGNAL_DATA_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_SIGNAL_DATA_NOTIFICATION_RESOURCE
Define the device test signal data notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_COMMAND_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_COMMAND_NOTIFICATION_RESOURCE
Define the device test command notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_COMMAND_DATA_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_COMMAND_DATA_NOTIFICATION_RESOURCE
Define the device test command data notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_MEASUREMENT_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_MEASUREMENT_NOTIFICATION_RESOURCE
Define the device test measurement notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_MEASUREMENT_VALUE_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_MEASUREMENT_VALUE_NOTIFICATION_RESOURCE
Define the device test measurement value notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_START_RESOURCE

protected static final int DEVICE_TEST_START_RESOURCE
Define the device test start resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_STOP_RESOURCE

protected static final int DEVICE_TEST_STOP_RESOURCE
Define the device test stop resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_WAITING_RESOURCE

protected static final int DEVICE_TEST_WAITING_RESOURCE
Define the device test waiting resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_SEND_EXCEPTION_RESOURCE

protected static final int DEVICE_TEST_SEND_EXCEPTION_RESOURCE
Define the device test send exception resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_COMMAND_NOT_FOUND_RESOURCE

protected static final int DEVICE_TEST_COMMAND_NOT_FOUND_RESOURCE
Define the device test command not found resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_MEASUREMENT_NOT_FOUND_RESOURCE

protected static final int DEVICE_TEST_MEASUREMENT_NOT_FOUND_RESOURCE
Define the device test measurement not found resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_SIGNAL_NOT_FOUND_RESOURCE

protected static final int DEVICE_TEST_SIGNAL_NOT_FOUND_RESOURCE
Define the device test signal not found resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_COMMAND_EXCEPTION_RESOURCE

protected static final int DEVICE_TEST_COMMAND_EXCEPTION_RESOURCE
Define the device test command exception resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_MEASUREMENT_EXCEPTION_RESOURCE

protected static final int DEVICE_TEST_MEASUREMENT_EXCEPTION_RESOURCE
Define the device test measurement exception resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_SIGNAL_EXCEPTION_RESOURCE

protected static final int DEVICE_TEST_SIGNAL_EXCEPTION_RESOURCE
Define the device test signal exception resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_START_EXECUTION_RESOURCE

protected static final int DEVICE_TEST_START_EXECUTION_RESOURCE
Define the device test start execution resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_STOP_EXECUTION_RESOURCE

protected static final int DEVICE_TEST_STOP_EXECUTION_RESOURCE
Define the device test stop execution resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_CONTROL_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_CONTROL_NOTIFICATION_RESOURCE
Define the device test control notification resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_EXIT_RESOURCE

protected static final int DEVICE_TEST_EXIT_RESOURCE
Define the device test exit resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_DEVICE_CONFIGURATION_MISCOMPARE_RESOURCE

protected static final int DEVICE_TEST_DEVICE_CONFIGURATION_MISCOMPARE_RESOURCE
Define the device test device configuration miscompare resource (int) constant.

See Also:
Constant Field Values

DEVICE_TEST_DATA_NOTIFICATION_RESOURCE

protected static final int DEVICE_TEST_DATA_NOTIFICATION_RESOURCE
Define the device test data notification resource (int) constant.

See Also:
Constant Field Values

deviceConfigurationInformation

protected java.util.Dictionary deviceConfigurationInformation
Define the device configuration information (Dictionary) field.


configurationSave

protected boolean configurationSave
Define the configuration save (boolean) field.

Constructor Detail

DeviceTest

public DeviceTest()
Constructs a new instance of the RfidAsystSecsDeviceTest class.

Method Detail

checkNotification

public void checkNotification()
Check notification.


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: CommandService which was executed. The time at which the command execution was detected. Any data which was contained within the command.

Specified by:
commandExecuted in interface CommandListener
Parameters:
source - The source (CommandService) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

controlChanged

public void controlChanged(DeviceService container,
                           java.lang.Object timestamp,
                           ControlService control,
                           int code)
The controlChanged method is called when a control was changed. A notification method to all ContainerListeners that a ControlService, specified by the control argument, and contained within the DeviceService, specified in the device arguement, was Added, Removed, or Modified, specified by the code argument in accordance with the above constants, at the time specified by the timestamp argument. In English : A control of the DeviceService was changed in the following manner at this time. Since other notifications are blocked until this method returns, implementors of this method should: org.eclipse.soda.dk.device.service.DeviceService java.lang.Object org.eclipse.soda.dk.device.service.ControlService int

Specified by:
controlChanged in interface DeviceListener
Parameters:
container - The device (DeviceService) parameter.
timestamp - The timestamp (Object) parameter.
control - The control (ControlService) parameter.
code - The code (int) parameter.
See Also:
deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,Object,Object)

deviceChanged

public void deviceChanged(DeviceService deviceService,
                          java.lang.Object timestamp,
                          int newState,
                          int oldState)
This method will be called when the state of the DeviceService changes. Since other notifications are blocked until this method returns, implementors of this method should: Because of the multiple threads and quickly changing states, the current state of the device may not be the same as the newState input parameter. org.eclipse.soda.dk.device.service.DeviceService java.lang.Object The new state of the DeviceService when the notification process started. The old state of the DeviceService.

Specified by:
deviceChanged in interface DeviceListener
Parameters:
deviceService - The device service (DeviceService) parameter.
timestamp - The timestamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
See Also:
controlChanged(DeviceService,Object,ControlService,int), measurementChanged(MeasurementService,Object,Object,Object)

deviceConfigurationCompare

public void deviceConfigurationCompare()
Transport configuration compare.


deviceConfigurationSave

public void deviceConfigurationSave()
Transport configuration save.

See Also:
isConfigurationSave(), setConfigurationSave(boolean)

endTests

public void endTests()
End tests.

See Also:
runTests(), startTests()

errorOccurred

public void errorOccurred(java.lang.Object source,
                          java.lang.Object timestamp,
                          java.lang.Object data)
The errorOccurred method is called when an error has occurred. Since other notifications are blocked until this method returns, implementors of this method should: The source object that detected the error. The time at which the error was detected. Contains any data about the error.

Specified by:
errorOccurred in interface ErrorListener
Parameters:
source - The source (Object) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.
See Also:
signalOccurred(SignalService,Object,Object)

exit

public void exit()
Exit.

Specified by:
exit in interface DeviceTestService

formatData

public java.lang.String formatData(java.lang.Object data)
The formatData will format the data values to a nice string. The data (Object) parameter.

Parameters:
data - The data (Object) parameter.
Returns:
Results of the format data (String) value.

getConfigurationInformation

public java.util.Dictionary getConfigurationInformation()
Return the property table.

Specified by:
getConfigurationInformation in interface DeviceTestService
Returns:
Results of the get configuration information (Dictionary) value.
See Also:
getConfigurationInformation(String), getDeviceConfigurationInformation(), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary), setDeviceConfigurationInformation(Dictionary)

getConfigurationInformation

public java.lang.Object getConfigurationInformation(java.lang.String propertyName)
Return the property value. The property name (String) parameter.

Parameters:
propertyName - The property name (String) parameter.
Returns:
Results of the get configuration information (Object) value.
See Also:
getConfigurationInformation(), getDeviceConfigurationInformation(), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary), setDeviceConfigurationInformation(Dictionary)

getConfigurationService

public ConfigurationService getConfigurationService()
Gets the configuration service value.

Overrides:
getConfigurationService in class EscObject
Returns:
The configuration service (ConfigurationService) value.

getCopyright

public java.lang.String getCopyright()
Gets the copyright (String) value.

Returns:
The copyright (String) value.

getDefaultDevice

public DeviceService getDefaultDevice()
                               throws java.lang.ClassNotFoundException,
                                      java.lang.IllegalAccessException,
                                      java.lang.InstantiationException
Gets the default device (DeviceService) value.

Returns:
The default device (DeviceService) value. Class Not Found Exception. Illegal Access Exception. Instantiation Exception.
Throws:
java.lang.ClassNotFoundException - Class Not Found Exception.
java.lang.IllegalAccessException - Illegal Access Exception.
java.lang.InstantiationException - Instantiation Exception.

getDevice

public DeviceService getDevice()
Gets the device to be tested.

Specified by:
getDevice in interface DeviceTestService
Returns:
Results of the get device (DeviceService) value.
See Also:
getDefaultDevice(), setDevice(DeviceService)

getDeviceConfigurationInformation

public java.util.Dictionary getDeviceConfigurationInformation()
Gets the device configuration information (Dictionary) value.

Returns:
The device configuration information (Dictionary) value.
See Also:
setDeviceConfigurationInformation(Dictionary)

getErrorSeverity

protected int getErrorSeverity(int errorNumber,
                               java.lang.Throwable error)
Get error severity with the specified error number and error parameters and return the int result. The error number (int) parameter. The error (Throwable) parameter.

Overrides:
getErrorSeverity in class EscObject
Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
Results of the get error severity (int) value.
See Also:
LogService

getLogDetails4

public java.lang.Object getLogDetails4()
Gets the log details4 (Object) value.

Overrides:
getLogDetails4 in class EscObject
Returns:
The log details4 (Object) value.

getLogDetails5

public java.lang.Object getLogDetails5()
Gets the log details5 (Object) value.

Overrides:
getLogDetails5 in class EscObject
Returns:
The log details5 (Object) value.

getLogDetails6

public java.lang.Object getLogDetails6()
Gets the log details6 (Object) value.

Overrides:
getLogDetails6 in class EscObject
Returns:
The log details6 (Object) value.

getPriority

public int getPriority()
Gets the priority (int) value.

Returns:
The priority (int) value.
See Also:
setPriority(int)

getReadTimeout

public long getReadTimeout()
Gets the read timeout (long) value.

Returns:
The read timeout (long) value.
See Also:
setReadTimeout(long)

getResource

public java.lang.String getResource(int resourceId)
Gets the string resource using the supplied resourceId. The resource id (int) parameter.

Overrides:
getResource in class EscObject
Parameters:
resourceId - The resource id (int) parameter.
Returns:
Results of the get resource (String) value.
See Also:
EscObject.getDefaultResource(int)

getTestCount

public int getTestCount()
Gets the test count (int) value.

Returns:
The test count (int) value.
See Also:
setTestCount(int)

getTestDelay

public long getTestDelay()
Gets the test delay (long) value.

Returns:
The test delay (long) value.
See Also:
setTestDelay(long)

getTestExecute

public boolean getTestExecute()
Gets the testExecute property value. If testExecute is true, then execute method will be invoked for all commands.

Returns:
Results of the get test execute (boolean) value.
See Also:
setTestExecute(boolean)

getTestExecuteRead

public boolean getTestExecuteRead()
Gets the testExecuteRead property value. If testExecuteRead is true, then the executeRead method will be invoked to all measurements.

Returns:
Results of the get test execute read (boolean) value.
See Also:
setTestExecuteRead(boolean)

getTestExecuteWrite

public boolean getTestExecuteWrite()
Gets the testExecuteWrite property value. If testExecuteWrite is true, then executeWrite method will be invoked to all measurements.

Returns:
Results of the get test execute write (boolean) value.
See Also:
setTestExecuteWrite(boolean)

getTestRead

public boolean getTestRead()
Gets the testRead property value. If testRead is true, then the read method will be invoked to all measurements.

Returns:
Results of the get test read (boolean) value.
See Also:
setTestRead(boolean)

getTestTrigger

public boolean getTestTrigger()
Gets the testTrigger property value. If testTrigger is true, then trigger method will be invoked for all signals.

Returns:
Results of the get test trigger (boolean) value.
See Also:
setTestTrigger(boolean)

getThread

public java.lang.Thread getThread()
Gets the thread to be used in testing.

Returns:
Results of the get thread (Thread) value.
See Also:
setThread(Thread)

getTotalTestTime

public long getTotalTestTime()
Gets the total test time (long) value.

Returns:
The total test time (long) value.
See Also:
setTotalTestTime(long)

getTransport

public TransportService getTransport()
Gets the transport (TransportService) value.

Returns:
The transport (TransportService) value.

getVendor

public java.lang.String getVendor()
Gets the vendor (String) value.

Returns:
The vendor (String) value.

isActive

public boolean isActive()
Gets the active status. If true, then tests are running.

Returns:
Results of the is active (boolean) value.
See Also:
setActive(boolean)

isConfigurationSave

public boolean isConfigurationSave()
Gets the configuration save (boolean) value.

Returns:
The configuration save (boolean) value.
See Also:
deviceConfigurationSave(), setConfigurationSave(boolean)

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: MeasurementService which changed. The time at which the value change was detected. The new value of the MeasurementService. The old value of the MeasurementService.

Specified by:
measurementChanged in interface MeasurementListener
Parameters:
source - The source (MeasurementService) parameter.
timestamp - The timestamp (Object) parameter.
newValue - The new value (Object) parameter.
oldValue - The old value (Object) parameter.
See Also:
controlChanged(DeviceService,Object,ControlService,int), deviceChanged(DeviceService,Object,int,int)

notificationReceived

public void notificationReceived(java.lang.String externalKey,
                                 java.lang.Object data)
Notification received with the specified external key and data parameters.

Overrides:
notificationReceived in class NotificationClient
Parameters:
externalKey - The external key (String) parameter.
data - The data (Object) parameter.

putConfigurationInformation

public void putConfigurationInformation(java.lang.String propertyName,
                                        java.lang.Object value)
Set the specified property value. The property name (String) parameter. The value (Object) parameter.

Parameters:
propertyName - The property name (String) parameter.
value - The value (Object) parameter.
See Also:
getConfigurationInformation(), getConfigurationInformation(String), getDeviceConfigurationInformation(), setConfigurationInformation(Dictionary), setDeviceConfigurationInformation(Dictionary)

run

public void run()
Run tests for the device.

Specified by:
run in interface java.lang.Runnable
See Also:
run(String[])

run

public void run(java.lang.String[] args)
Run with the specified args parameter. The args (String[]) parameter.

Parameters:
args - The args (String[]) parameter.
See Also:
run()

runTests

public void runTests()
Run tests.

See Also:
endTests(), startTests()

setActive

public void setActive(boolean active)
Sets the active status. The active (boolean) parameter.

Parameters:
active - The active (boolean) parameter.
See Also:
isActive()

setConfigurationInformation

public void setConfigurationInformation(java.util.Dictionary configurationInformation)
Sets the configuration information value. The configuration information (Dictionary) parameter.

Specified by:
setConfigurationInformation in interface DeviceTestService
Parameters:
configurationInformation - The configuration information (Dictionary) parameter.
See Also:
getConfigurationInformation(), getConfigurationInformation(String), getDeviceConfigurationInformation(), putConfigurationInformation(String,Object), setDeviceConfigurationInformation(Dictionary)

setConfigurationSave

public void setConfigurationSave(boolean configurationSave)
Sets the configuration save value. The configuration save (boolean) parameter.

Parameters:
configurationSave - The configuration save (boolean) parameter.
See Also:
deviceConfigurationSave(), isConfigurationSave()

setDevice

public void setDevice(DeviceService device)
Sets the device to be tested. The device (DeviceService) parameter.

Specified by:
setDevice in interface DeviceTestService
Parameters:
device - The device (DeviceService) parameter.
See Also:
getDefaultDevice(), getDevice()

setDeviceConfigurationInformation

public void setDeviceConfigurationInformation(java.util.Dictionary deviceConfigurationInformation)
Sets the device configuration information value. The device configuration information (Dictionary) parameter.

Parameters:
deviceConfigurationInformation - The device configuration information (Dictionary) parameter.
See Also:
getDeviceConfigurationInformation()

setPriority

public void setPriority(int priority)
Sets the priority value. The priority (int) parameter.

Parameters:
priority - The priority (int) parameter.
See Also:
getPriority()

setReadTimeout

public void setReadTimeout(long readTimeout)
Sets the read timeout value. The readTimeout (long) parameter.

Parameters:
readTimeout - The read timeout (long) parameter.
See Also:
getReadTimeout()

setTestCount

public void setTestCount(int testCount)
Sets the test count value. The test count (int) parameter.

Parameters:
testCount - The test count (int) parameter.
See Also:
getTestCount()

setTestDelay

public void setTestDelay(long testDelay)
Sets the test delay value. The testDelay (long) parameter.

Parameters:
testDelay - The test delay (long) parameter.
See Also:
getTestDelay()

setTestExecute

public void setTestExecute(boolean testExecute)
Sets the testExecute property value. If testExecute is true, then execute method will be invoked for all commands. The boolean value for the testExecute property.

Parameters:
testExecute - The test execute (boolean) parameter.
See Also:
getTestExecute()

setTestExecuteRead

public void setTestExecuteRead(boolean testExecuteRead)
Sets the testExecuteRead property value. If testExecuteRead is true, then the executeRead method will be invoked to all measurements. The boolean value for the testExecuteRead property.

Parameters:
testExecuteRead - The test execute read (boolean) parameter.
See Also:
getTestExecuteRead()

setTestExecuteWrite

public void setTestExecuteWrite(boolean testExecuteWrite)
Sets the testExecuteWrite property value. If testExecuteWrite is true, then executeWrite method will be invoked to all measurements. The boolean value for the testExecuteWrite property.

Parameters:
testExecuteWrite - The test execute write (boolean) parameter.
See Also:
getTestExecuteWrite()

setTestRead

public void setTestRead(boolean testRead)
Sets the testRead property value. If testRead is true, then the read method will be invoked to all measurements. The boolean value for the testRead property.

Parameters:
testRead - The test read (boolean) parameter.
See Also:
getTestRead()

setTestTrigger

public void setTestTrigger(boolean testTrigger)
Sets the testTrigger property value. If testTrigger is true, then trigger method will be invoked for all signals. The boolean value for the testTrigger property.

Parameters:
testTrigger - The test trigger (boolean) parameter.
See Also:
getTestTrigger()

setThread

public void setThread(java.lang.Thread thread)
Sets the thread. The thread (Thread) parameter.

Parameters:
thread - The thread (Thread) parameter.
See Also:
getThread()

setTotalTestTime

public void setTotalTestTime(long totalTestTime)
Sets the total test time value. The total test time (long) parameter.

Parameters:
totalTestTime - The total test time (long) parameter.
See Also:
getTotalTestTime()

setup

public void setup()
Setup.


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: The SignalService which fired. The time at which the signal was detected. Contains any data which was contained within the signal.

Specified by:
signalOccurred in interface SignalListener
Parameters:
source - The source (SignalService) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.
See Also:
errorOccurred(Object,Object,Object)

start

public void start()
Start the test case.

Specified by:
start in interface DeviceTestService

startTests

public void startTests()
Start tests.

See Also:
endTests(), runTests()

stop

public void stop()
Stops the test case.

Specified by:
stop in interface DeviceTestService

test

public void test()
Tests the device.


testCommand

public void testCommand(java.lang.String commandName)
Test command with the specified command name parameter. The command name (String) parameter.

Parameters:
commandName - The command name (String) parameter.

testMeasurement

public void testMeasurement(java.lang.String measurementName)
Test measurement with the specified measurement name parameter. The measurement name (String) parameter.

Parameters:
measurementName - The measurement name (String) parameter.

testSignal

public void testSignal(java.lang.String signalName)
Test signal with the specified signal name parameter. The signal name (String) parameter.

Parameters:
signalName - The signal name (String) parameter.

toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class EscObject
Returns:
The string (String) value.
See Also:
EscObject.getStaticString(String,String), EscObject.getString(String,String)

waitForStarted

public void waitForStarted()
Wait for started.


1.0.0

Copyright (c) 1999, 2007 IBM