2010-01-26 1.2.0

org.eclipse.soda.dk.generic.io.device
Class GenericIoDevice

java.lang.Object
  extended by Device
      extended by org.eclipse.soda.dk.generic.io.device.GenericIoDevice
All Implemented Interfaces:
GenericIoDeviceService
Direct Known Subclasses:
GenericIoSimulatorDevice

public abstract class GenericIoDevice
extends Device
implements GenericIoDeviceService

Generic Digital and Analog I/O Device. The GenericIoDevice class implements the GenericIoDeviceService and provides the controls for the device.

The list of exported services:

Since:
1.0
Version:
1.2.0
See Also:
GenericIoDeviceService, org.eclipse.soda.dk.device.service.DeviceService

Field Summary
static java.lang.String AI_DATA_KEY_PREFIX
          Define the ai data key prefix (String) constant.
protected  MethodMeasurement analogInputCount
          Defines the AnalogInputCount measurement Integer.
protected  MethodMeasurement analogInputs
          Maintain the input.
protected  MethodMeasurement analogOutputCount
          Defines the AnalogOutputCount measurement Integer.
protected  MethodMeasurement analogOutputs
          Maintain the output pins.
static java.lang.String AO_DATA_KEY_PREFIX
          Define the ao data key prefix (String) constant.
static java.lang.String CLASS_NAME
          Defines the full class name.
protected  MethodMeasurement digitalInputCount
          Defines the DigitalInputCount measurement Integer.
protected  MethodMeasurement digitalInputs
          Maintain the input.
protected  MethodMeasurement digitalOutputCount
          Defines the DigitalOutputCount measurement Integer.
protected  MethodMeasurement digitalOutputs
          Maintain the output pins.
 
Fields inherited from interface org.eclipse.soda.dk.generic.io.device.service.GenericIoDeviceService
AI1_DATA_KEY, AI10_DATA_KEY, AI11_DATA_KEY, AI12_DATA_KEY, AI13_DATA_KEY, AI14_DATA_KEY, AI15_DATA_KEY, AI16_DATA_KEY, AI17_DATA_KEY, AI18_DATA_KEY, AI19_DATA_KEY, AI2_DATA_KEY, AI20_DATA_KEY, AI21_DATA_KEY, AI22_DATA_KEY, AI23_DATA_KEY, AI24_DATA_KEY, AI25_DATA_KEY, AI26_DATA_KEY, AI27_DATA_KEY, AI28_DATA_KEY, AI29_DATA_KEY, AI3_DATA_KEY, AI30_DATA_KEY, AI31_DATA_KEY, AI32_DATA_KEY, AI4_DATA_KEY, AI5_DATA_KEY, AI6_DATA_KEY, AI7_DATA_KEY, AI8_DATA_KEY, AI9_DATA_KEY, ALL_COMMANDS, ALL_MEASUREMENTS, ALL_SIGNALS, ANALOG_INPUT_COUNT_ERROR_EXTERNAL_KEY, ANALOG_INPUT_COUNT_EXTERNAL_KEY, ANALOG_INPUT_COUNT_GET_EXTERNAL_KEY, ANALOG_INPUT_COUNT_KEY, ANALOG_INPUT_COUNT_READ_EXTERNAL_KEY, ANALOG_INPUTS_ERROR_EXTERNAL_KEY, ANALOG_INPUTS_EXTERNAL_KEY, ANALOG_INPUTS_GET_EXTERNAL_KEY, ANALOG_INPUTS_READ_EXTERNAL_KEY, ANALOG_OUTPUT_COUNT_ERROR_EXTERNAL_KEY, ANALOG_OUTPUT_COUNT_EXTERNAL_KEY, ANALOG_OUTPUT_COUNT_GET_EXTERNAL_KEY, ANALOG_OUTPUT_COUNT_KEY, ANALOG_OUTPUT_COUNT_READ_EXTERNAL_KEY, ANALOG_OUTPUTS_ERROR_EXTERNAL_KEY, ANALOG_OUTPUTS_EXTERNAL_KEY, ANALOG_OUTPUTS_GET_EXTERNAL_KEY, ANALOG_OUTPUTS_WRITE_EXTERNAL_KEY, AnalogInputCount, AnalogInputs, AnalogOutputCount, AnalogOutputs, AO1_DATA_KEY, AO10_DATA_KEY, AO11_DATA_KEY, AO12_DATA_KEY, AO13_DATA_KEY, AO14_DATA_KEY, AO15_DATA_KEY, AO16_DATA_KEY, AO17_DATA_KEY, AO18_DATA_KEY, AO19_DATA_KEY, AO2_DATA_KEY, AO20_DATA_KEY, AO21_DATA_KEY, AO22_DATA_KEY, AO23_DATA_KEY, AO24_DATA_KEY, AO25_DATA_KEY, AO26_DATA_KEY, AO27_DATA_KEY, AO28_DATA_KEY, AO29_DATA_KEY, AO3_DATA_KEY, AO30_DATA_KEY, AO31_DATA_KEY, AO32_DATA_KEY, AO4_DATA_KEY, AO5_DATA_KEY, AO6_DATA_KEY, AO7_DATA_KEY, AO8_DATA_KEY, AO9_DATA_KEY, DIGITAL_INPUT_COUNT_ERROR_EXTERNAL_KEY, DIGITAL_INPUT_COUNT_EXTERNAL_KEY, DIGITAL_INPUT_COUNT_GET_EXTERNAL_KEY, DIGITAL_INPUT_COUNT_KEY, DIGITAL_INPUT_COUNT_READ_EXTERNAL_KEY, DIGITAL_INPUTS_ERROR_EXTERNAL_KEY, DIGITAL_INPUTS_EXTERNAL_KEY, DIGITAL_INPUTS_GET_EXTERNAL_KEY, DIGITAL_INPUTS_READ_EXTERNAL_KEY, DIGITAL_OUTPUT_COUNT_ERROR_EXTERNAL_KEY, DIGITAL_OUTPUT_COUNT_EXTERNAL_KEY, DIGITAL_OUTPUT_COUNT_GET_EXTERNAL_KEY, DIGITAL_OUTPUT_COUNT_KEY, DIGITAL_OUTPUT_COUNT_READ_EXTERNAL_KEY, DIGITAL_OUTPUTS_ERROR_EXTERNAL_KEY, DIGITAL_OUTPUTS_EXTERNAL_KEY, DIGITAL_OUTPUTS_GET_EXTERNAL_KEY, DIGITAL_OUTPUTS_WRITE_EXTERNAL_KEY, DigitalInputCount, DigitalInputs, DigitalOutputCount, DigitalOutputs, GenericIoDevice, SERVICE_DESCRIPTION, SERVICE_NAME
 
Constructor Summary
  GenericIoDevice()
          Constructs a new instance of the GenericIoDevice class.
protected GenericIoDevice(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics)
          Constructs an instance of this class from the specified capabilities, status, configuration and metrics parameters.
protected GenericIoDevice(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics, java.lang.String channels, java.lang.String channelChanged, java.lang.String openChannel, java.lang.String closeChannel)
          Constructs an instance of this class from the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.
 
Method Summary
 MeasurementService getAnalogInputCount()
          Defines the AnalogInputCount measurement Integer.
 MeasurementService getAnalogInputs()
          Maintain the input.
protected abstract  java.util.Map getAnalogInputValue()
          Gets the analog input value (Map) value.
 MeasurementService getAnalogOutputCount()
          Defines the AnalogOutputCount measurement Integer.
 MeasurementService getAnalogOutputs()
          Maintain the output pins.
 int getControlCapacity()
          Gets the control capacity.
 java.lang.String getDefaultKey()
          Gets the default key of the device.
 TransportService getDefaultTransport()
          Gets the default TransportService.
 MeasurementService getDigitalInputCount()
          Defines the DigitalInputCount measurement Integer.
 MeasurementService getDigitalInputs()
          Maintain the input.
protected abstract  long getDigitalInputState()
          Gets the digital input state (long) value.
 MeasurementService getDigitalOutputCount()
          Defines the DigitalOutputCount measurement Integer.
 MeasurementService getDigitalOutputs()
          Maintain the output pins.
 int getMessageCapacity()
          Gets the message capacity.
 int getNumberOfAnalogInputs()
          Gets the number of analog inputs (int) value.
 int getNumberOfAnalogOutputs()
          Gets the number of analog outputs (int) value.
 int getNumberOfDigitalInputs()
          Gets the number of digital inputs (int) value.
 int getNumberOfDigitalOutputs()
          Gets the number of digital outputs (int) value.
 java.lang.Object handleMethodAnalogInputCount(int code, Measurement measurement, java.lang.Object data)
          Handle method analog input count with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodAnalogInputs(int code, Measurement measurement, java.lang.Object data)
          Handle method analog inputs with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodAnalogOutputCount(int code, Measurement measurement, java.lang.Object data)
          Handle method analog output count with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodAnalogOutputs(int code, Measurement measurement, java.lang.Object data)
          Handle method analog outputs with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodDigitalInputCount(int code, Measurement measurement, java.lang.Object data)
          Handle method digital input count with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodDigitalInputs(int code, Measurement measurement, java.lang.Object data)
          Handle method digital inputs with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodDigitalOutputCount(int code, Measurement measurement, java.lang.Object data)
          Handle method digital output count with the specified code, measurement and data parameters and return the Object result.
 java.lang.Object handleMethodDigitalOutputs(int code, Measurement measurement, java.lang.Object data)
          Handle method digital outputs with the specified code, measurement and data parameters and return the Object result.
protected  java.lang.Object initializeIntegerMeasurement(int code, Measurement measurement, java.lang.Object data)
          Initialize integer measurement with the specified code, measurement and data parameters and return the Object result.
protected  java.lang.Object initializeStringMeasurement(int code, Measurement measurement, java.lang.Object data)
          Initialize string measurement with the specified code, measurement and data parameters and return the Object result.
protected abstract  void setAnalogOutputValue(java.util.Map outputState)
          Sets the analog output value value.
protected abstract  void setDigitalOutputState(long l)
          Sets the digital output state value.
 void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

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

Since:
1.0
See Also:
Constant Field Values

digitalInputCount

protected final MethodMeasurement digitalInputCount
Defines the DigitalInputCount measurement Integer.

Since:
1.0
See Also:
handleMethodDigitalInputCount(int, Measurement, Object)

digitalOutputCount

protected final MethodMeasurement digitalOutputCount
Defines the DigitalOutputCount measurement Integer.

Since:
1.0
See Also:
handleMethodDigitalOutputCount(int, Measurement, Object)

analogInputCount

protected final MethodMeasurement analogInputCount
Defines the AnalogInputCount measurement Integer.

Since:
1.0
See Also:
handleMethodAnalogInputCount(int, Measurement, Object)

analogOutputCount

protected final MethodMeasurement analogOutputCount
Defines the AnalogOutputCount measurement Integer.

Since:
1.0
See Also:
handleMethodAnalogOutputCount(int, Measurement, Object)

digitalOutputs

protected final MethodMeasurement digitalOutputs
Maintain the output pins.

Since:
1.1
See Also:
handleMethodDigitalOutputs(int, Measurement, Object)

digitalInputs

protected final MethodMeasurement digitalInputs
Maintain the input.

Since:
1.1
See Also:
handleMethodDigitalInputs(int, Measurement, Object)

analogOutputs

protected final MethodMeasurement analogOutputs
Maintain the output pins.

Since:
1.1
See Also:
handleMethodAnalogOutputs(int, Measurement, Object)

analogInputs

protected final MethodMeasurement analogInputs
Maintain the input.

Since:
1.1
See Also:
handleMethodAnalogInputs(int, Measurement, Object)

AO_DATA_KEY_PREFIX

public static final java.lang.String AO_DATA_KEY_PREFIX
Define the ao data key prefix (String) constant.

See Also:
Constant Field Values

AI_DATA_KEY_PREFIX

public static final java.lang.String AI_DATA_KEY_PREFIX
Define the ai data key prefix (String) constant.

See Also:
Constant Field Values
Constructor Detail

GenericIoDevice

public GenericIoDevice()
Constructs a new instance of the GenericIoDevice class.

Since:
1.0

GenericIoDevice

protected GenericIoDevice(java.lang.String capabilities,
                          java.lang.String status,
                          java.lang.String configuration,
                          java.lang.String metrics)
Constructs an instance of this class from the specified capabilities, status, configuration and metrics parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
Since:
1.2
See Also:
GenericIoDevice(), GenericIoDevice(String,String,String,String,String,String,String,String)

GenericIoDevice

protected GenericIoDevice(java.lang.String capabilities,
                          java.lang.String status,
                          java.lang.String configuration,
                          java.lang.String metrics,
                          java.lang.String channels,
                          java.lang.String channelChanged,
                          java.lang.String openChannel,
                          java.lang.String closeChannel)
Constructs an instance of this class from the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
channels - The channels (String) parameter.
channelChanged - The channel changed (String) parameter.
openChannel - The open channel (String) parameter.
closeChannel - The close channel (String) parameter.
Since:
1.2
See Also:
GenericIoDevice(), GenericIoDevice(String,String,String,String)
Method Detail

getDefaultKey

public java.lang.String getDefaultKey()
Gets the default key of the device.

Returns:
String The default key
Since:
1.0

getDefaultTransport

public TransportService getDefaultTransport()
Gets the default TransportService.

Returns:
TransportService The default TransportService.
Since:
1.0

getControlCapacity

public int getControlCapacity()
Gets the control capacity.

Returns:
The control capacity value.
Since:
1.0

getMessageCapacity

public int getMessageCapacity()
Gets the message capacity.

Returns:
int The message capacity.
Since:
1.0

getDigitalInputCount

public MeasurementService getDigitalInputCount()
Defines the DigitalInputCount measurement Integer.

Returns:
The digital input count value.
Since:
1.0
See Also:
handleMethodDigitalInputCount(int, Measurement, Object)

getDigitalOutputCount

public MeasurementService getDigitalOutputCount()
Defines the DigitalOutputCount measurement Integer.

Returns:
The digital output count value.
Since:
1.0
See Also:
handleMethodDigitalOutputCount(int, Measurement, Object)

getAnalogInputCount

public MeasurementService getAnalogInputCount()
Defines the AnalogInputCount measurement Integer.

Returns:
The analog input count value.
Since:
1.0
See Also:
handleMethodAnalogInputCount(int, Measurement, Object)

getAnalogOutputCount

public MeasurementService getAnalogOutputCount()
Defines the AnalogOutputCount measurement Integer.

Returns:
The analog output count value.
Since:
1.0
See Also:
handleMethodAnalogOutputCount(int, Measurement, Object)

getDigitalOutputs

public MeasurementService getDigitalOutputs()
Maintain the output pins.

Returns:
The digital outputs value.
Since:
1.0
See Also:
handleMethodDigitalOutputs(int, Measurement, Object)

getDigitalInputs

public MeasurementService getDigitalInputs()
Maintain the input.

Returns:
The digital inputs value.
Since:
1.0
See Also:
handleMethodDigitalInputs(int, Measurement, Object)

getAnalogOutputs

public MeasurementService getAnalogOutputs()
Maintain the output pins.

Returns:
The analog outputs value.
Since:
1.0
See Also:
handleMethodAnalogOutputs(int, Measurement, Object)

getAnalogInputs

public MeasurementService getAnalogInputs()
Maintain the input.

Returns:
The analog inputs value.
Since:
1.0
See Also:
handleMethodAnalogInputs(int, Measurement, Object)

setup

public void setup()
Since:
1.2
See Also:
org.eclipse.soda.dk.device.Container#setup()

getAnalogInputValue

protected abstract java.util.Map getAnalogInputValue()
Gets the analog input value (Map) value.

Returns:
The analog input value (Map) value.

getDigitalInputState

protected abstract long getDigitalInputState()
Gets the digital input state (long) value.

Returns:
The digital input state (long) value.

getNumberOfAnalogInputs

public int getNumberOfAnalogInputs()
Gets the number of analog inputs (int) value.

Returns:
The number of analog inputs (int) value.

getNumberOfAnalogOutputs

public int getNumberOfAnalogOutputs()
Gets the number of analog outputs (int) value.

Returns:
The number of analog outputs (int) value.

getNumberOfDigitalInputs

public int getNumberOfDigitalInputs()
Gets the number of digital inputs (int) value.

Returns:
The number of digital inputs (int) value.

getNumberOfDigitalOutputs

public int getNumberOfDigitalOutputs()
Gets the number of digital outputs (int) value.

Returns:
The number of digital outputs (int) value.

handleMethodAnalogInputCount

public java.lang.Object handleMethodAnalogInputCount(int code,
                                                     Measurement measurement,
                                                     java.lang.Object data)
Handle method analog input count with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method analog input count (Object) value.

handleMethodAnalogInputs

public java.lang.Object handleMethodAnalogInputs(int code,
                                                 Measurement measurement,
                                                 java.lang.Object data)
Handle method analog inputs with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method analog inputs (Object) value.

handleMethodAnalogOutputCount

public java.lang.Object handleMethodAnalogOutputCount(int code,
                                                      Measurement measurement,
                                                      java.lang.Object data)
Handle method analog output count with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method analog output count (Object) value.

handleMethodAnalogOutputs

public java.lang.Object handleMethodAnalogOutputs(int code,
                                                  Measurement measurement,
                                                  java.lang.Object data)
Handle method analog outputs with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method analog outputs (Object) value.

handleMethodDigitalInputCount

public java.lang.Object handleMethodDigitalInputCount(int code,
                                                      Measurement measurement,
                                                      java.lang.Object data)
Handle method digital input count with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method digital input count (Object) value.

handleMethodDigitalInputs

public java.lang.Object handleMethodDigitalInputs(int code,
                                                  Measurement measurement,
                                                  java.lang.Object data)
Handle method digital inputs with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method digital inputs (Object) value.

handleMethodDigitalOutputCount

public java.lang.Object handleMethodDigitalOutputCount(int code,
                                                       Measurement measurement,
                                                       java.lang.Object data)
Handle method digital output count with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method digital output count (Object) value.

handleMethodDigitalOutputs

public java.lang.Object handleMethodDigitalOutputs(int code,
                                                   Measurement measurement,
                                                   java.lang.Object data)
Handle method digital outputs with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method digital outputs (Object) value.

initializeIntegerMeasurement

protected java.lang.Object initializeIntegerMeasurement(int code,
                                                        Measurement measurement,
                                                        java.lang.Object data)
Initialize integer measurement with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the initialize integer measurement (Object) value.

initializeStringMeasurement

protected java.lang.Object initializeStringMeasurement(int code,
                                                       Measurement measurement,
                                                       java.lang.Object data)
Initialize string measurement with the specified code, measurement and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
data - The data (Object) parameter.
Returns:
Results of the initialize string measurement (Object) value.

setAnalogOutputValue

protected abstract void setAnalogOutputValue(java.util.Map outputState)
Sets the analog output value value.

Parameters:
outputState - The output state (Map) parameter.

setDigitalOutputState

protected abstract void setDigitalOutputState(long l)
Sets the digital output state value.

Parameters:
l - The l (long) parameter.

2010-01-26 1.2.0

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