public final class DACChannelConfig extends java.lang.Object implements PeripheralConfig
DACChannelConfig
class encapsulates the hardware addressing information, and static and dynamic
configuration parameters of an DAC 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 DACChannelConfig
can be passed to the PeripheralManager.open(PeripheralConfig)
or
PeripheralManager.open(Class, PeripheralConfig)
method to open the designated DAC channel with the specified
configuration. A PeripheralConfigInvalidException
is thrown when attempting to open a peripheral device with
an invalid or unsupported configuration.DEFAULT
Constructor and Description |
---|
DACChannelConfig(int converterNumber,
int channelNumber,
int resolution,
int samplingInterval)
Creates a new
DACChannelConfig with the specified hardware addressing information and configuration
parameters. |
Modifier and Type | Method and Description |
---|---|
int |
getChannelNumber()
Gets the configured channel number.
|
int |
getConverterNumber()
Gets the configured converter number.
|
int |
getResolution()
Gets the configured resolution.
|
int |
getSamplingInterval()
Gets the default/initial configured output sampling interval (in microseconds).
|
public DACChannelConfig(int converterNumber, int channelNumber, int resolution, int samplingInterval)
DACChannelConfig
with the specified hardware addressing information and configuration
parameters.converterNumber
- the hardware converter's number (a positive or null integer) or PeripheralConfig.DEFAULT
.channelNumber
- the hardware channel's number (a positive or null integer) or PeripheralConfig.DEFAULT
.resolution
- the resolution in bits (a positive integer) or PeripheralConfig.DEFAULT
.samplingInterval
- the initial output sampling interval in microseconds (a positive integer) or PeripheralConfig.DEFAULT
.java.lang.IllegalArgumentException
- if any of the following is true:
converterNumber
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.public int getChannelNumber()
PeripheralConfig.DEFAULT
.public int getConverterNumber()
PeripheralConfig.DEFAULT
.public int getResolution()
PeripheralConfig.DEFAULT
.public int getSamplingInterval()
PeripheralConfig.DEFAULT
.Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.
ing HTM