2010-01-26 1.2.0

org.eclipse.soda.dk.generic.io.gpio.profile
Class GenericIoGpioProfile

java.lang.Object
  extended by GpioProfile
      extended by org.eclipse.soda.dk.generic.io.gpio.profile.GenericIoGpioProfile
All Implemented Interfaces:
GenericIoGpioProfileService

public class GenericIoGpioProfile
extends GpioProfile
implements GenericIoGpioProfileService

Gpio Profile implementation for Generic Digital and Analog I/O Device. The GenericIoGpioProfile class implements the GenericIoGpioProfileService and provides the controls for the profile.

The list of exported services:

Since:
1.0
Version:
1.2.0
See Also:
GenericIoGpioProfileService,

See the following specification(s) for more details:

Title: EPCglobal Low Level Reader Protocol (LLRP)
URL: http://www.epcglobalinc.org/standards/llrp
Version: 1.0.1
Date: August 13, 2007
Vendor: EPCglobal
Comment: Ratified

Title: EPCglobal Application Level Events (ALE) Specification
URL: http://www.epcglobalinc.org/standards/ale/
Version: 1.1
Date: February 27, 2008
Vendor: EPCglobal
Comment: Ratified

Field Summary
static java.lang.String CLASS_NAME
          Defines the full class name.
protected  MeasurementService genericIoDeviceServiceAnalogInputCount
          Defines the AnalogInputCount measu reference.
protected  MeasurementService genericIoDeviceServiceAnalogInputs
          Defines the AnalogInputs measu reference.
protected  MeasurementService genericIoDeviceServiceAnalogOutputCount
          Defines the AnalogOutputCount measu reference.
protected  MeasurementService genericIoDeviceServiceAnalogOutputs
          Defines the AnalogOutputs measu reference.
protected  MeasurementService genericIoDeviceServiceDigitalInputCount
          Defines the DigitalInputCount measu reference.
protected  MeasurementService genericIoDeviceServiceDigitalInputs
          Defines the DigitalInputs measu reference.
protected  MeasurementService genericIoDeviceServiceDigitalOutputCount
          Defines the DigitalOutputCount measu reference.
protected  MeasurementService genericIoDeviceServiceDigitalOutputs
          Defines the DigitalOutputs measu reference.
 
Fields inherited from interface org.eclipse.soda.dk.generic.io.gpio.profile.service.GenericIoGpioProfileService
ALL_COMMANDS, ALL_MEASUREMENTS, ALL_SIGNALS, Capabilities, CAPABILITIES_ERROR_EXTERNAL_KEY, CAPABILITIES_EXTERNAL_KEY, CAPABILITIES_GET_EXTERNAL_KEY, Configuration, CONFIGURATION_ERROR_EXTERNAL_KEY, CONFIGURATION_EXTERNAL_KEY, CONFIGURATION_GET_EXTERNAL_KEY, FACTORY_SERVICE_NAME, GenericIoGpioProfile, MANAGED_SERVICE_NAME, Metrics, METRICS_ERROR_EXTERNAL_KEY, METRICS_EXTERNAL_KEY, METRICS_GET_EXTERNAL_KEY, POLLINGRATE, POLLINGRATE_DEFAULT, POLLINGRATE_PROPERTY, SERVICE_DESCRIPTION, SERVICE_NAME, Status, STATUS_ERROR_EXTERNAL_KEY, STATUS_EXTERNAL_KEY, STATUS_GET_EXTERNAL_KEY
 
Constructor Summary
GenericIoGpioProfile()
          Constructs a new instance of the GenericIoGpioProfile class.
 
Method Summary
 void activate()
          Activate.
protected  long createOutputStateFromMap(java.util.Map states, java.lang.String[] keys, long count)
          Create output state from map with the specified states, keys and count parameters and return the long result.
 void deactivate()
          Deactivate.
 void deviceChanged(DeviceService source, java.lang.Object timestamp, int newState, int oldState)
          Device changed.
 AdapterService getAdapter()
          Gets the get adapter value.
protected  long getAnalogInputCountValue()
          Gets the analog input count value (long) value.
protected  long getAnalogOutputCountValue()
          Gets the analog output count value (long) value.
 DeviceService getDefaultDevice()
          Gets the default DeviceService.
 java.lang.String getDefaultKey()
          Gets the default key of the profile.
protected  long getInputCountValue()
          Gets the input count value (long) value.
protected  long getOutputCountValue()
          Gets the output count value (long) value.
 int getPollingrate()
          Gets the value of pollingrate custom parameter.
 boolean isAdapterNeeded()
          Is adapter needed.
 boolean isDeviceNeeded()
          Is device needed.
 void measurementChanged(MeasurementService source, java.lang.Object timestamp, java.lang.Object newValue, java.lang.Object oldValue)
          Measurement changed.
 void setAdapter(AdapterService adapter)
          Set adapter.
 void setDevice(DeviceService device)
          Set device.
protected  void setOutputPins(long value)
          Sets the output pins value.
 void setPollingrate(int pollingrate)
          Sets the value of pollingrate custom parameter.
 void setup()
           
protected  void turnOffAllOutputs()
          Turn off all outputs.
protected  void turnOnAllOutputs()
          Turn on all outputs.
protected  void updateAnalogOutputs(java.util.Map fullState, java.util.Map individualRequest)
          Update analog outputs with the specified full state and individual request parameters.
protected  void updateOutputs(java.util.Map fullState, java.util.Map individualRequest)
          Update outputs with the specified full state and individual request parameters.
 
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

genericIoDeviceServiceDigitalInputCount

protected MeasurementService genericIoDeviceServiceDigitalInputCount
Defines the DigitalInputCount measu reference.

Since:
1.0

genericIoDeviceServiceDigitalOutputCount

protected MeasurementService genericIoDeviceServiceDigitalOutputCount
Defines the DigitalOutputCount measu reference.

Since:
1.0

genericIoDeviceServiceAnalogInputCount

protected MeasurementService genericIoDeviceServiceAnalogInputCount
Defines the AnalogInputCount measu reference.

Since:
1.1

genericIoDeviceServiceAnalogOutputCount

protected MeasurementService genericIoDeviceServiceAnalogOutputCount
Defines the AnalogOutputCount measu reference.

Since:
1.1

genericIoDeviceServiceDigitalInputs

protected MeasurementService genericIoDeviceServiceDigitalInputs
Defines the DigitalInputs measu reference.

Since:
1.0

genericIoDeviceServiceDigitalOutputs

protected MeasurementService genericIoDeviceServiceDigitalOutputs
Defines the DigitalOutputs measu reference.

Since:
1.1

genericIoDeviceServiceAnalogInputs

protected MeasurementService genericIoDeviceServiceAnalogInputs
Defines the AnalogInputs measu reference.

Since:
1.1

genericIoDeviceServiceAnalogOutputs

protected MeasurementService genericIoDeviceServiceAnalogOutputs
Defines the AnalogOutputs measu reference.

Since:
1.1
Constructor Detail

GenericIoGpioProfile

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

Since:
1.0
Method Detail

setDevice

public void setDevice(DeviceService device)
Set device.

Parameters:
device - device.
Since:
1.0

deviceChanged

public void deviceChanged(DeviceService source,
                          java.lang.Object timestamp,
                          int newState,
                          int oldState)
Device changed.

Parameters:
source - source.
timestamp - time stamp.
newState - new state.
oldState - old state.
Since:
1.0

measurementChanged

public void measurementChanged(MeasurementService source,
                               java.lang.Object timestamp,
                               java.lang.Object newValue,
                               java.lang.Object oldValue)
Measurement changed.

Parameters:
source - source.
timestamp - time stamp.
newValue - new value.
oldValue - old value.
Since:
1.0

getDefaultKey

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

Returns:
String The default key
Since:
1.0

getDefaultDevice

public DeviceService getDefaultDevice()
Gets the default DeviceService.

Returns:
DeviceService The default DeviceService.
Since:
1.0

isDeviceNeeded

public boolean isDeviceNeeded()
Is device needed.

Returns:
The results of this method.
Since:
1.0

setPollingrate

public void setPollingrate(int pollingrate)
Sets the value of pollingrate custom parameter.

Parameters:
pollingrate - The pollingrate custom parameter.
Since:
1.0
See Also:
getPollingrate()

getPollingrate

public int getPollingrate()
Gets the value of pollingrate custom parameter.

Returns:
pollingrate custom parameter.
Since:
1.0
See Also:
setPollingrate(int)

setup

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

getAdapter

public AdapterService getAdapter()
Gets the get adapter value.

Returns:
The adapter value.
Since:
1.1

setAdapter

public void setAdapter(AdapterService adapter)
Set adapter.

Parameters:
adapter - adapter.
Since:
1.1

isAdapterNeeded

public boolean isAdapterNeeded()
Is adapter needed.

Returns:
The results of this method.
Since:
1.1

activate

public void activate()
Activate.


createOutputStateFromMap

protected long createOutputStateFromMap(java.util.Map states,
                                        java.lang.String[] keys,
                                        long count)
Create output state from map with the specified states, keys and count parameters and return the long result.

Parameters:
states - The states (Map) parameter.
keys - The keys (String[]) parameter.
count - The count (long) parameter.
Returns:
Results of the create output state from map (long) value.

deactivate

public void deactivate()
Deactivate.


getAnalogInputCountValue

protected long getAnalogInputCountValue()
Gets the analog input count value (long) value.

Returns:
The analog input count value (long) value.

getAnalogOutputCountValue

protected long getAnalogOutputCountValue()
Gets the analog output count value (long) value.

Returns:
The analog output count value (long) value.

getInputCountValue

protected long getInputCountValue()
Gets the input count value (long) value.

Returns:
The input count value (long) value.
See Also:
getAnalogInputCountValue()

getOutputCountValue

protected long getOutputCountValue()
Gets the output count value (long) value.

Returns:
The output count value (long) value.
See Also:
getAnalogOutputCountValue()

setOutputPins

protected void setOutputPins(long value)
Sets the output pins value.

Parameters:
value - The value (long) parameter.

turnOffAllOutputs

protected void turnOffAllOutputs()
Turn off all outputs.


turnOnAllOutputs

protected void turnOnAllOutputs()
Turn on all outputs.


updateAnalogOutputs

protected void updateAnalogOutputs(java.util.Map fullState,
                                   java.util.Map individualRequest)
Update analog outputs with the specified full state and individual request parameters.

Parameters:
fullState - The full state (Map) parameter.
individualRequest - The individual request (Map) parameter.

updateOutputs

protected void updateOutputs(java.util.Map fullState,
                             java.util.Map individualRequest)
Update outputs with the specified full state and individual request parameters.

Parameters:
fullState - The full state (Map) parameter.
individualRequest - The individual request (Map) parameter.
See Also:
turnOffAllOutputs(), turnOnAllOutputs(), updateAnalogOutputs(Map,Map)

2010-01-26 1.2.0

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