public final class DACChannelConfig extends java.lang.Object implements DeviceConfig<DACChannel>, DeviceConfig.HardwareAddressing
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
DeviceConfig.DEFAULT
. Whether such default settings are supported is platform- as well as device
driver-dependent.
An instance of DACChannelConfig
can be passed to the
DeviceManager.open(DeviceConfig)
or
DeviceManager.open(Class, DeviceConfig)
method to open the designated DAC channel
with the specified configuration. A InvalidDeviceConfigException
is thrown when
attempting to open a device with an invalid or unsupported configuration.DeviceConfig.HardwareAddressing
DEFAULT
Constructor and Description |
---|
DACChannelConfig(int controllerNumber,
int channelNumber,
int resolution,
int samplingInterval)
Creates a new
DACChannelConfig with the specified hardware addressing information and
configuration parameters. |
DACChannelConfig(java.lang.String controllerName,
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 |
---|---|
boolean |
equals(java.lang.Object obj)
Checks two
DACChannelConfig objects for equality. |
int |
getChannelNumber()
Gets the configured channel number.
|
java.lang.String |
getControllerName()
Gets the configured controller name (such as its device file name on UNIX systems).
|
int |
getControllerNumber()
Gets the configured controller number.
|
int |
getResolution()
Gets the configured resolution.
|
int |
getSamplingInterval()
Gets the default/initial configured output sampling interval (in microseconds).
|
int |
hashCode()
Returns the hash code value for this object.
|
public DACChannelConfig(int controllerNumber, int channelNumber, int resolution, int samplingInterval)
DACChannelConfig
with the specified hardware addressing information and
configuration parameters.controllerNumber
- the hardware converter's number (a positive or zero integer) or DeviceConfig.DEFAULT
.channelNumber
- the hardware channel's number (a positive or zero integer) or DeviceConfig.DEFAULT
.resolution
- the resolution in bits (a positive integer) or DeviceConfig.DEFAULT
.samplingInterval
- the initial output sampling interval in microseconds (a positive integer) or
DeviceConfig.DEFAULT
.java.lang.IllegalArgumentException
- if any of the following is true:
controllerNumber
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 DACChannelConfig(java.lang.String controllerName, int channelNumber, int resolution, int samplingInterval)
DACChannelConfig
with the specified hardware addressing information and
configuration parameters.controllerName
- the controller name (such as its device file name on UNIX systems).channelNumber
- the hardware channel's number (a positive or zero integer) or DeviceConfig.DEFAULT
.resolution
- the resolution in bits (a positive integer) or DeviceConfig.DEFAULT
.samplingInterval
- the initial output sampling interval in microseconds (a positive integer) or
DeviceConfig.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.java.lang.NullPointerException
- if controllerName
is null
.public int getChannelNumber()
DeviceConfig.DEFAULT
.public int getControllerNumber()
getControllerNumber
in interface DeviceConfig.HardwareAddressing
DeviceConfig.DEFAULT
.public java.lang.String getControllerName()
getControllerName
in interface DeviceConfig.HardwareAddressing
null
.public int getResolution()
DeviceConfig.DEFAULT
.public int getSamplingInterval()
DeviceConfig.DEFAULT
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
DACChannelConfig
objects for equality.equals
in class java.lang.Object
obj
- the object to test for equality with this object.true
if obj
is a DACChannelConfig
and has the same hardware
addressing information and configuration parameter values as this
DACChannelConfig
object.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices