|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
1-Wire A/D interface class for basic analog measuring operations. This class should be implemented for each A/D type 1-Wire device.
Field Summary | |
static int |
ALARM_HIGH
High alarm |
static int |
ALARM_LOW
Low Alarm |
Method Summary | |
boolean |
canADMultiChannelRead()
Query to see if this A/D supports doing multiple voltage conversions at the same time. |
void |
doADConvert(boolean[] doConvert,
byte[] state)
This method is used to perform voltage conversion on all specified channels. |
void |
doADConvert(int channel,
byte[] state)
This method is used to perform voltage conversion on all specified channels. |
double |
getADAlarm(int channel,
int alarmType,
byte[] state)
This method is used to extract the alarm voltage value of the specified channel from the provided state buffer. |
boolean |
getADAlarmEnable(int channel,
int alarmType,
byte[] state)
This method is used to extract the alarm enable value of the specified channel from the provided state buffer. |
double |
getADRange(int channel,
byte[] state)
This method is used to extract the input voltage range of the specified channel from the provided state buffer. |
double[] |
getADRanges(int channel)
Query to get an array of available ranges for the specified A/D channel. |
double |
getADResolution(int channel,
byte[] state)
This method is used to extract the conversion resolution of the specified channel from the provided state buffer expressed in volts. |
double[] |
getADResolutions(int channel,
double range)
Query to get an array of available resolutions based on the specified range on the specified A/D channel. |
double[] |
getADVoltage(byte[] state)
This method is used to read the voltage values. |
double |
getADVoltage(int channel,
byte[] state)
This method is used to read a channels voltage value. |
int |
getNumberADChannels()
Query to get the number of channels supported by this A/D. |
boolean |
hasADAlarmed(int channel,
int alarmType,
byte[] state)
This method is used to check the alarm event value of the specified channel from the provided state buffer. |
boolean |
hasADAlarms()
Query to see if this A/D measuring device has high/low alarms. |
void |
setADAlarm(int channel,
int alarmType,
double alarm,
byte[] state)
This method is used to set the alarm voltage value of the specified channel in the provided state buffer. |
void |
setADAlarmEnable(int channel,
int alarmType,
boolean alarmEnable,
byte[] state)
This method is used to set the alarm enable value of the specified channel in the provided state buffer. |
void |
setADRange(int channel,
double range,
byte[] state)
This method is used to set the input range for the specified channel in the provided state buffer. |
void |
setADResolution(int channel,
double resolution,
byte[] state)
This method is used to set the conversion resolution value for the specified channel in the provided state buffer. |
Methods inherited from interface com.dalsemi.onewire.container.OneWireSensor |
readDevice, writeDevice |
Field Detail |
public static final int ALARM_HIGH
public static final int ALARM_LOW
Method Detail |
public int getNumberADChannels()
public boolean hasADAlarms()
public double[] getADRanges(int channel)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].public double[] getADResolutions(int channel, double range)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].range
- public boolean canADMultiChannelRead()
public void doADConvert(int channel, byte[] state) throws OneWireIOException, OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].state
- - byte array of the current state of the
device returned from 'readDevice()'.OneWireIOException
- OneWireException
- public void doADConvert(boolean[] doConvert, byte[] state) throws OneWireIOException, OneWireException
doConvert
- - boolean array representing which channels
to perform conversion on.state
- - byte array of the current state of the
device returned from 'readDevice()'.OneWireIOException
- OneWireException
- public double[] getADVoltage(byte[] state) throws OneWireIOException, OneWireException
state
- - byte array of the current state of the
device returned from 'readDevice()'.OneWireIOException
- OneWireException
- public double getADVoltage(int channel, byte[] state) throws OneWireIOException, OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].state
- - byte array of the current state of the
device returned from 'readDevice()'.OneWireIOException
- OneWireException
- public double getADAlarm(int channel, int alarmType, byte[] state) throws OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].alarmType
- - int, representing the desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state
- - byte array of the current state of the
device returned from 'readDevice()'.public boolean getADAlarmEnable(int channel, int alarmType, byte[] state) throws OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].alarmType
- - int, representing the desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state
- - byte array of the current state of the state
returned from 'readDevice()'.public boolean hasADAlarmed(int channel, int alarmType, byte[] state) throws OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].alarmType
- - int, representing the desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state
- - byte array of the current state of the state
returned from 'readDevice()'.public double getADResolution(int channel, byte[] state)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].state
- - byte array of the current state of the state
returned from 'readDevice()'.public double getADRange(int channel, byte[] state)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].state
- - byte array of the current state of the state
returned from 'readDevice()'.public void setADAlarm(int channel, int alarmType, double alarm, byte[] state) throws OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].alarmType
- - int, representing the desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)alarm
- - double, alarm value (will be reduced to 8 bit resolution).state
- - byte array of the current state of the
device returned from 'readDevice()'.public void setADAlarmEnable(int channel, int alarmType, boolean alarmEnable, byte[] state) throws OneWireException
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].alarmType
- - int, representing the desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)alarmEnable
- - boolean, alarm enable valuestate
- - byte array of the current state of the
device returned from 'readDevice()'.public void setADResolution(int channel, double resolution, byte[] state)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].resolution
- - double, resolution to use in voltsstate
- - byte array of the current state of the
device returned from 'readDevice()'.public void setADRange(int channel, double range, byte[] state)
channel
- - integer specifying channel in the range
[0 to (getNumberChannels() - 1)].range
- - double, representing the max volt range, use
'getRanges()' method to get available rangesstate
- - byte array of the current state of the
device returned from 'readDevice()'.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |