public final class ADCChannelConfig extends java.lang.Object implements PeripheralConfig<ADCChannel>, PeripheralConfig.HardwareAddressing
ADCChannelConfig class encapsulates the hardware addressing information, and static and dynamic
configuration parameters of an ADC channel.
Some hardware addressing parameter, and static and dynamic configuration parameters may be set to PeripheralConfig.DEFAULT.
Whether such default settings are supported is platform- as well as peripheral driver-dependent.
An instance of ADCChannelConfig can be passed to the PeripheralManager.open(PeripheralConfig) or
PeripheralManager.open(Class, PeripheralConfig) method to open the designated ADC channel with the specified
configuration. A PeripheralConfigInvalidException is thrown when attempting to open a peripheral device with
an invalid or unsupported configuration.PeripheralConfig.HardwareAddressingDEFAULT| Constructor and Description |
|---|
ADCChannelConfig(int deviceNumber,
int channelNumber,
int resolution,
int samplingInterval,
int samplingTime)
Creates a new
ADCChannelConfig with the specified hardware addressing information and configuration
parameters. |
ADCChannelConfig(java.lang.String deviceName,
int channelNumber,
int resolution,
int samplingInterval,
int samplingTime)
Creates a new
ADCChannelConfig with the specified hardware addressing information and configuration
parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Checks two
ADCChannelConfig objects for equality. |
int |
getChannelNumber()
Gets the configured channel number.
|
java.lang.String |
getDeviceName()
Gets the configured device name (such as to its device file name on UNIX systems).
|
int |
getDeviceNumber()
Gets the configured device number (such as the ADC conveter number).
|
int |
getResolution()
Gets the configured resolution.
|
int |
getSamplingInterval()
Gets the configured default/initial input sampling interval - the amount of time between two samples (in
microseconds).
|
int |
getSamplingTime()
Gets the configured input sampling time - the amount of time to take the sample (in microseconds).
|
int |
hashCode()
Returns the hash code value for this object.
|
public ADCChannelConfig(int deviceNumber,
int channelNumber,
int resolution,
int samplingInterval,
int samplingTime)
ADCChannelConfig with the specified hardware addressing information and configuration
parameters.deviceNumber - the hardware converter's number (a positive or zero integer) or PeripheralConfig.DEFAULT.channelNumber - the hardware channel's number (a positive or zero integer) or PeripheralConfig.DEFAULT.resolution - the resolution in bits (a positive integer) or PeripheralConfig.DEFAULT.samplingInterval - the initial input sampling interval (the amount of time between two samples) in microseconds (a
positive integer) or PeripheralConfig.DEFAULT.samplingTime - the sampling time (the amount of time to take the sample) in microseconds (a positive integer) or
PeripheralConfig.DEFAULT.java.lang.IllegalArgumentException - if any of the following is true:
deviceNumber is not in the defined range;channelNumber is not in the defined range;resolution is not in the defined range;samplingInterval is not in the defined range;samplingTime is not in the defined range.public ADCChannelConfig(java.lang.String deviceName,
int channelNumber,
int resolution,
int samplingInterval,
int samplingTime)
ADCChannelConfig with the specified hardware addressing information and configuration
parameters.deviceName - the device name (such as to its device file name on UNIX systems).channelNumber - the hardware channel's number (a positive or zero integer) or PeripheralConfig.DEFAULT.resolution - the resolution in bits (a positive integer) or PeripheralConfig.DEFAULT.samplingInterval - the initial input sampling interval (the amount of time between two samples) in microseconds (a
positive integer) or PeripheralConfig.DEFAULT.samplingTime - the sampling time (the amount of time to take the sample) in microseconds (a positive integer) or
PeripheralConfig.DEFAULT.java.lang.IllegalArgumentException - if any of the following is true:
channelNumber is not in the defined range;resolution is not in the defined range;samplingInterval is not in the defined range;samplingTime is not in the defined range.java.lang.NullPointerException - if deviceName is null.public int getChannelNumber()
PeripheralConfig.DEFAULT.public int getDeviceNumber()
getDeviceNumber in interface PeripheralConfig.HardwareAddressingPeripheralConfig.DEFAULT.public java.lang.String getDeviceName()
getDeviceName in interface PeripheralConfig.HardwareAddressingnull.public int getResolution()
PeripheralConfig.DEFAULT.public int getSamplingInterval()
PeripheralConfig.DEFAULT.public int getSamplingTime()
PeripheralConfig.DEFAULT.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
ADCChannelConfig objects for equality.equals in class java.lang.Objectobj - the object to test for equality with this object.true if obj is a ADCChannelConfig and has
the same hardware addressing information and configuration parameter values
as this ADCChannelConfig object.Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.
Legal Notices