2009-01-09 1.2.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, MultiplexCommandListener, DeviceListener, MultiplexDeviceListener, DeviceTestService, MeasurementListener, MultiplexMeasurementListener, MultiplexSignalListener, SignalListener, ErrorListener

public class DeviceTest
extends org.eclipse.soda.dk.notification.client.NotificationClient
implements DeviceTestService, java.lang.Runnable, MultiplexCommandListener, MultiplexSignalListener, MultiplexMeasurementListener, MultiplexDeviceListener

Version:
1.2.0

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
          Deprecated. #PRIORITY_DEFAULT
static long DEFAULT_READ_TIMEOUT
          Deprecated. #READ_TIMEOUT_DEFAULT
static int DEFAULT_TEST_COUNT
          Deprecated. #TEST_COUNT_DEFAULT
static long DEFAULT_TEST_DELAY
          Deprecated. #TEST_DELAY_DEFAULT
static boolean DEFAULT_TEST_EXECUTE
          Deprecated. #TEST_EXECUTE_DEFAULT
static boolean DEFAULT_TEST_EXECUTE_READ
          Deprecated. #TEST_EXECUTE_READ_DEFAULT
static boolean DEFAULT_TEST_EXECUTE_WRITE
          Deprecated. #TEST_EXECUTE_WRITE_DEFAULT
static boolean DEFAULT_TEST_READ
          Deprecated. #TEST_READ_DEFAULT
static boolean DEFAULT_TEST_TRIGGER
          Deprecated. #TEST_TRIGGER_DEFAULT
static long DEFAULT_TOTAL_TEST_TIME
          Deprecated. #TOTAL_TEST_TIME_DEFAULT
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.
static java.lang.String ID_VALUE
          Define the id value (String) constant.
static java.lang.String PREFIX_VALUE
          Define the prefix value (String) constant.
static int PRIORITY_DEFAULT
          Define the priority default (int) constant.
static long READ_TIMEOUT_DEFAULT
          Define the default read timeout (long) constant.
static int TEST_COUNT_DEFAULT
          Define the test count default (int) constant.
static long TEST_DELAY_DEFAULT
          Define the test delay default (long) constant.
static boolean TEST_EXECUTE_DEFAULT
          Define the test execute default (boolean) constant.
static boolean TEST_EXECUTE_READ_DEFAULT
          Define the test execute read default (boolean) constant.
static boolean TEST_EXECUTE_WRITE_DEFAULT
          Define the test execute write default (boolean) constant.
static boolean TEST_READ_DEFAULT
          Define the test read default (boolean) constant.
static boolean TEST_TRIGGER_DEFAULT
          Define the test trigger default (boolean) constant.
static long TOTAL_TEST_TIME_DEFAULT
          Define the total test time default (long) constant.
 
Fields inherited from class org.eclipse.soda.dk.notification.client.NotificationClient
TOPIC_DELIMITER
 
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, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, 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, Unmodifiable
 
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 channelChanged(DeviceService 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 checkNotification()
          Check notification.
 void commandExecuted(CommandService source, java.lang.Object timestamp, ChannelService channel, java.lang.Object data)
          Command executed with the specified source, timestamp, channel and data parameters.
 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.
 org.eclipse.soda.dk.notification.service.NotificationService getDefaultNotificationService()
          Gets the default notification service (NotificationService) value.
 DeviceService getDevice()
          Gets the device (DeviceService) value.
 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 value.
 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, ChannelService channel, java.lang.Object newValue, java.lang.Object oldValue)
          Measurement changed with the specified source, timestamp, channel, new value and old value parameters.
 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[] arguments)
          Run with the specified arguments parameter.
 void runTests()
          Run tests.
 void setActive(boolean active)
          Sets the active value.
 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 value.
 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 value.
 void setTotalTestTime(long totalTestTime)
          Sets the total test time value.
 void setup()
          Setup.
 void signalOccurred(SignalService source, java.lang.Object timestamp, ChannelService channel, java.lang.Object data)
          Signal occurred with the specified source, timestamp, channel and data parameters.
 void signalOccurred(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the signal triggered.
 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, prependPrefix, register, register, setNotificationController, setNotificationService, unregister
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
attemptRecoveryFromError, createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getDouble, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails7, getLogLevel, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isBackward, isDebug, isLogging, isTrace, isUnmodifiable, loadService, log, log, log, report, report, report, report, report, report, report, reportError, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, 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.


PRIORITY_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_PRIORITY

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

See Also:
Constant Field Values

TEST_COUNT_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_COUNT

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

See Also:
Constant Field Values

TEST_DELAY_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_DELAY

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

See Also:
Constant Field Values

TEST_EXECUTE_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE

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

See Also:
Constant Field Values

TEST_EXECUTE_READ_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE_READ

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

See Also:
Constant Field Values

TEST_EXECUTE_WRITE_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_EXECUTE_WRITE

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

See Also:
Constant Field Values

TEST_READ_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_READ

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

See Also:
Constant Field Values

TEST_TRIGGER_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TEST_TRIGGER

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

See Also:
Constant Field Values

TOTAL_TEST_TIME_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_TOTAL_TEST_TIME

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

See Also:
Constant Field Values

READ_TIMEOUT_DEFAULT

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

Since:
1.2
See Also:
Constant Field Values

DEFAULT_READ_TIMEOUT

public static final long DEFAULT_READ_TIMEOUT
Deprecated. #READ_TIMEOUT_DEFAULT
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

ID_VALUE

public static final java.lang.String ID_VALUE
Define the id value (String) constant.

See Also:
Constant Field Values

PREFIX_VALUE

public static final java.lang.String PREFIX_VALUE
Define the prefix value (String) 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

channelChanged

public void channelChanged(DeviceService 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.

Specified by:
channelChanged in interface MultiplexDeviceListener
Parameters:
source - The source (DeviceService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
Since:
1.2
See Also:
controlChanged(DeviceService,Object,ControlService,int), deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,ChannelService,Object,Object), measurementChanged(MeasurementService,Object,Object,Object)

checkNotification

public void checkNotification()
Check notification.


commandExecuted

public void commandExecuted(CommandService source,
                            java.lang.Object timestamp,
                            ChannelService channel,
                            java.lang.Object data)
Command executed with the specified source, timestamp, channel and data parameters.

Specified by:
commandExecuted in interface MultiplexCommandListener
Parameters:
source - The source (CommandService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Since:
1.2
See Also:
commandExecuted(CommandService,Object,Object)

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 time stamp (Object) parameter.
data - The data (Object) parameter.
See Also:
commandExecuted(CommandService,Object,ChannelService,Object)

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 argument, 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 container (DeviceService) parameter.
timestamp - The time stamp (Object) parameter.
control - The control (ControlService) parameter.
code - The code (int) parameter.
See Also:
channelChanged(DeviceService,Object,ChannelService,int,int), deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,ChannelService,Object,Object), 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 time stamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
See Also:
channelChanged(DeviceService,Object,ChannelService,int,int), controlChanged(DeviceService,Object,ControlService,int), measurementChanged(MeasurementService,Object,ChannelService,Object,Object), 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 time stamp (Object) parameter.
data - The data (Object) parameter.
See Also:
signalOccurred(SignalService,Object,ChannelService,Object), 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.

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)
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.

Parameters:
propertyName - The property name (String) parameter.
Returns:
Results of the get configuration information (Object)
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)

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.
Throws:
java.lang.ClassNotFoundException - Class Not Found Exception.
java.lang.IllegalAccessException - Illegal Access Exception.
java.lang.InstantiationException - Instantiation Exception.

getDefaultNotificationService

public org.eclipse.soda.dk.notification.service.NotificationService getDefaultNotificationService()
Gets the default notification service (NotificationService) value.

Returns:
The default notification service (NotificationService) value.

getDevice

public DeviceService getDevice()
Gets the device (DeviceService) value.

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)
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.

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.

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)
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)
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 value.

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,
                               ChannelService channel,
                               java.lang.Object newValue,
                               java.lang.Object oldValue)
Measurement changed with the specified source, timestamp, channel, new value and old value parameters.

Specified by:
measurementChanged in interface MultiplexMeasurementListener
Parameters:
source - The source (MeasurementService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newValue - The new value (Object) parameter.
oldValue - The old value (Object) parameter.
Since:
1.2
See Also:
channelChanged(DeviceService,Object,ChannelService,int,int), controlChanged(DeviceService,Object,ControlService,int), deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,Object,Object)

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 time stamp (Object) parameter.
newValue - The new value (Object) parameter.
oldValue - The old value (Object) parameter.
See Also:
channelChanged(DeviceService,Object,ChannelService,int,int), controlChanged(DeviceService,Object,ControlService,int), deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,ChannelService,Object,Object)

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 org.eclipse.soda.dk.notification.client.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.

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[] arguments)
Run with the specified arguments parameter.

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

runTests

public void runTests()
Run tests.

See Also:
endTests(), startTests()

setActive

public void setActive(boolean active)
Sets the active value.

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

setConfigurationInformation

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

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.

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

setDevice

public void setDevice(DeviceService device)
Sets the device value.

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.

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

setPriority

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

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

setReadTimeout

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

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

setTestCount

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

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

setTestDelay

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

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 value.

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

setTotalTestTime

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

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,
                           ChannelService channel,
                           java.lang.Object data)
Signal occurred with the specified source, timestamp, channel and data parameters.

Specified by:
signalOccurred in interface MultiplexSignalListener
Parameters:
source - The source (SignalService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Since:
1.2
See Also:
errorOccurred(Object,Object,Object), signalOccurred(SignalService,Object,Object)

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 triggered. The signal can be triggered when a message is received 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 time stamp (Object) parameter.
data - The data (Object) parameter.
See Also:
errorOccurred(Object,Object,Object), signalOccurred(SignalService,Object,ChannelService,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.

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

testMeasurement

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

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

testSignal

public void testSignal(java.lang.String signalName)
Test signal with the specified signal name 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.


2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.