|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.dalsemi.onewire.container.OneWireContainer
|
+--com.dalsemi.onewire.container.OneWireContainer26
1-Wire® container that encapsulates the functionality of the 1-Wire family type 26 (hex), Dallas Semiconductor part number: DS2438, Smart Battery Monitor.
Sometimes the VAD input will report 10.23 V even if nothing is attached. This value is also the maximum voltage that part can report.
| Field Summary | |
static byte |
AD_FLAG
Flag to set/check the voltage A/D Input Select Bit with setFlag/getFlag When this bit is true the battery input is (VDD) is selected as input for the voltage A/D input. |
static byte |
ADB_FLAG
Flag to check whether or not the A/D converter is busy using getFlag(). |
static byte |
CA_FLAG
Flag to set/check the Current Accumulator bit with setFlag/getFlag. |
static int |
CHANNEL_VAD
Channel selector for the VAD input. |
static int |
CHANNEL_VDD
Channel selector for the VDD input. |
static byte |
EE_FLAG
Flag to set/check the Current Accumulator Shadow Selector bit with setFlag/getFlag. |
static byte |
IAD_FLAG
Flag to set/check the Current A/D Control bit with setFlag/getFlag. |
static byte |
NVB_FLAG
Flag to check whether or not an operation is being performed on the nonvolatile memory using getFlag. |
static byte |
TB_FLAG
Flag to check whether or not a temperature conversion is in progress using getFlag(). |
| Fields inherited from interface com.dalsemi.onewire.container.ADContainer |
ALARM_HIGH, ALARM_LOW |
| Fields inherited from interface com.dalsemi.onewire.container.TemperatureContainer |
ALARM_HIGH, ALARM_LOW |
| Fields inherited from interface com.dalsemi.onewire.container.HumidityContainer |
ALARM_HIGH, ALARM_LOW |
| Constructor Summary | |
OneWireContainer26()
Default constructor |
|
OneWireContainer26(DSPortAdapter sourceAdapter,
byte[] newAddress)
Create a container with a provided adapter object and the address of the 1-Wire device. |
|
OneWireContainer26(DSPortAdapter sourceAdapter,
long newAddress)
Create a container with a provided adapter object and the address of the 1-Wire device. |
|
OneWireContainer26(DSPortAdapter sourceAdapter,
String newAddress)
Create a container with a provided adapter object and the address of the 1-Wire device. |
|
| Method Summary | |
void |
calibrateCurrentADC()
Calibrate the current ADC. |
boolean |
canADMultiChannelRead()
Query to see if this A/D supports doing multiple voltage conversions at the same time. |
boolean |
canDisableClock()
Query to see if the clock can be disabled. |
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. |
void |
doHumidityConvert(byte[] state)
Performs a Humidity conversion. |
void |
doTemperatureConvert(byte[] state)
Perform an temperature conversion. |
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. |
String |
getAlternateNames()
Return the alternate Dallas Semiconductor part number or name. |
int |
getCCA()
Retrieves the current CCA value in mVHr. |
long |
getClock(byte[] state)
This method extracts the Clock Value in milliseconds from the state data retrieved from the readDevice() method. |
long |
getClockAlarm(byte[] state)
This method extracts the Clock Alarm Value from the provided state data retrieved from the readDevice()
method. |
long |
getClockResolution()
Query to get the clock resolution in milliseconds |
double |
getCurrent(byte[] state)
Get the instantaneous current. |
int |
getDCA()
Retrieves the value of the DCA in mVHr. |
String |
getDescription()
Return a short description of the function of this 1-Wire device type. |
long |
getDisconnectTime(byte[] state)
This method extracts the Clock Value in milliseconds from the state data retrieved from the readDevice() method. |
long |
getEndOfChargeTime(byte[] state)
This method extracts the Clock Value in milliseconds from the state data retrieved from the readDevice() method. |
boolean |
getFlag(byte flagToGet)
Checks the specified flag in the status/configuration register and returns its status as a boolean. |
double |
getHumidity(byte[] state)
Gets the humidity expressed as a percent value (0.0 to 100.0) of humidity. |
double |
getHumidityAlarm(int alarmType,
byte[] state)
Gets the specified Humidity alarm value in percent from the state data retrieved from the
readDevice() method. |
double |
getHumidityAlarmResolution()
Gets the Humidity alarm resolution in percent. |
double |
getHumidityResolution(byte[] state)
Gets the current Humidity resolution in percent from the state data retrieved from the readDevice()
method. |
double[] |
getHumidityResolutions()
Get an array of available Humidity resolutions in percent humidity (0 to 100). |
int |
getICA()
Retrieves the current ICA value in mVHr. |
double |
getMaxTemperature()
Query to get the maximum temperature in degrees C. |
double |
getMinTemperature()
Query to get the minimum temperature in degrees C. |
String |
getName()
Returns the Dallas Semiconductor part number of this 1-Wire device as a string. |
int |
getNumberADChannels()
Query to get the number of channels supported by this A/D. |
double |
getRemainingCapacity()
Calculate the remaining capacity in mAH as outlined in the data sheet. |
double |
getSenseResistor()
Get the value used for the sense resistor in the getCurrent()
calculations. |
double |
getTemperature(byte[] state)
This method extracts the Temperature Value in degrees C from the state data retrieved from the readDevice() method. |
double |
getTemperatureAlarm(int alarmType,
byte[] state)
This method extracts the specified Alarm value in degrees C from the state data retrieved from the readDevice() method. |
double |
getTemperatureAlarmResolution()
Query to get the high/low resolution in degrees C. |
double |
getTemperatureResolution(byte[] state)
This method extracts the current resolution in degrees C from the state data retrieved from the readDevice() method. |
double[] |
getTemperatureResolutions()
Query to get an array of available resolutions in degrees C. |
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. |
boolean |
hasClockAlarm()
Query to see if the clock has an alarm feature. |
boolean |
hasHumidityAlarms()
Checks to see if this Humidity measuring device has high/low trip alarms. |
boolean |
hasSelectableHumidityResolution()
Checks to see if this device has selectable Humidity resolution. |
boolean |
hasSelectableTemperatureResolution()
Query to see if this device has selectable resolution. |
boolean |
hasTemperatureAlarms()
Query to see if this temperature measuring device has high/low trip alarms. |
boolean |
isCharging(byte[] state)
Determines if the battery is charging and returns a boolean. |
boolean |
isClockAlarmEnabled(byte[] state)
This method checks if the Clock Alarm is enabled from the provided state data retrieved from the readDevice() method. |
boolean |
isClockAlarming(byte[] state)
This method checks if the Clock Alarm flag has been set from the state data retrieved from the readDevice() method. |
boolean |
isClockRunning(byte[] state)
This method checks if the device's oscilator is enabled. |
boolean |
isRelative()
Checks to see if humidity value given is a 'relative' humidity value. |
byte[] |
readDevice()
This method retrieves the 1-Wire device sensor state. |
byte[] |
readPage(int page)
Reads the specified 8 byte page and returns the data in an array. |
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. |
void |
setCCA(int ccaValue)
Set the value of the CCA. |
void |
setClock(long time,
byte[] state)
This method sets the Clock time in the provided state data Use the method writeDevice() with
this data to finalize the change to the device. |
void |
setClockAlarm(long time,
byte[] state)
This method sets the Clock Alarm in the provided state data. |
void |
setClockAlarmEnable(boolean alarmEnable,
byte[] state)
This method sets the Clock Alarm enable. |
void |
setClockRunEnable(boolean runEnable,
byte[] state)
This method sets the oscillator enable to the specified value. |
void |
setDCA(int dcaValue)
Set the value of the DCA. |
void |
setFlag(byte flagToSet,
boolean flagValue)
Set one of the flags in the STATUS/CONFIGURATION register. |
void |
setHumidityAlarm(int alarmType,
double alarmValue,
byte[] state)
Sets the Humidity alarm value in percent in the provided state data. |
void |
setHumidityResolution(double resolution,
byte[] state)
Sets the current Humidity resolution in percent in the provided state data. |
void |
setICA(int icaValue)
Set the value of the ICA. |
void |
setSenseResistor(double resistance)
Set the value of the sense resistor used to determine battery current. |
void |
setSpeedCheck(boolean doSpeedCheck)
Directs the container to avoid the calls to doSpeed() in methods that communicate with the Thermocron. |
void |
setTemperatureAlarm(int alarmType,
double alarmValue,
byte[] state)
This method sets the alarm value in degrees C in the provided state data. |
void |
setTemperatureResolution(double resolution,
byte[] state)
This method sets the current resolution in degrees C in the provided state data. |
void |
setThreshold(byte thresholdValue)
Set the minimum current measurement magnitude for which the ICA/CCA/DCA are incremented. |
void |
writeDevice(byte[] state)
This method write the 1-Wire device sensor state that have been changed by the 'set' methods. |
void |
writePage(int page,
byte[] source,
int offset)
Writes a page of memory to this device. |
| Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getMaxSpeed, getMemoryBanks, isAlarming, isPresent, setSpeed, setupContainer, setupContainer, setupContainer |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CHANNEL_VDD
public static final int CHANNEL_VAD
public static final byte IAD_FLAG
public static final byte CA_FLAG
public static final byte EE_FLAG
public static final byte AD_FLAG
public static final byte TB_FLAG
public static final byte NVB_FLAG
public static final byte ADB_FLAG
| Constructor Detail |
public OneWireContainer26()
public OneWireContainer26(DSPortAdapter sourceAdapter,
byte[] newAddress)
sourceAdapter - adapter object required to communicate with
this 1-Wire devicenewAddress - address of this 1-Wire device
public OneWireContainer26(DSPortAdapter sourceAdapter,
long newAddress)
sourceAdapter - adapter object required to communicate with
this 1-Wire devicenewAddress - address of this 1-Wire device
public OneWireContainer26(DSPortAdapter sourceAdapter,
String newAddress)
sourceAdapter - adapter object required to communicate with
this 1-Wire devicenewAddress - address of this 1-Wire device| Method Detail |
public String getName()
getName in class OneWireContainerpublic String getAlternateNames()
getAlternateNames in class OneWireContainerpublic String getDescription()
getDescription in class OneWireContainerpublic void setSenseResistor(double resistance)
getCurrent() calculation.
See the DS2438 datasheet for more information on sensing battery
current.resistance - Value of the sense resistor in Ohms.public double getSenseResistor()
getCurrent()
calculations.public void setSpeedCheck(boolean doSpeedCheck)
doSpeed(). However, this is an expensive operation.
If a user manages the bus speed in an
application, call this method with doSpeedCheck
as false. The default behavior is
to call doSpeed().doSpeedCheck - true for doSpeed() to be called before every
1-Wire bus access, false to skip this expensive callOneWireContainer.doSpeed()
public byte[] readPage(int page)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
page - the page number to readOneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void writePage(int page,
byte[] source,
int offset)
throws OneWireIOException,
OneWireException
setFlag().page - the page numbersource - data to be written to pageoffset - offset with page to begin writtingOneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public boolean getFlag(byte flagToGet)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
flagToGet - flag bitmask.
Acceptable parameters: IAD_FLAG, CA_FLAG, EE_FLAG, AD_FLAG, TB_FLAG,
NVB_FLAG, ADB_FLAG
(may be ORed with | to check the status of more than one).OneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void setFlag(byte flagToSet,
boolean flagValue)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
bitmask - of the flag to set
Acceptable parameters: IAD_FLAG, CA_FLAG, EE_FLAG, AD_FLAG, TB_FLAG,
NVB_FLAG, ADB_FLAG.flagValue - value to set flag toOneWireIOException - Error writting dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passedpublic double getCurrent(byte[] state)
setSenseResitor(double).state - current state of device
public double getRemainingCapacity()
throws OneWireIOException,
OneWireException,
IllegalArgumentException
OneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public boolean isCharging(byte[] state)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
state - current state of deviceOneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void calibrateCurrentADC()
throws OneWireIOException,
OneWireException,
IllegalArgumentException
OneWireIOException - Error calibratingOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void setThreshold(byte thresholdValue)
throws OneWireIOException,
OneWireException
threshold - minimum number of bits a current measurement must have to be accumulated,
Only 0,2,4 and 8 are valid parametersOneWireIOException - Error setting the thresholdOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public int getICA()
throws OneWireIOException,
OneWireException,
IllegalArgumentException
OneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public int getCCA()
throws OneWireIOException,
OneWireException,
IllegalArgumentException
OneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public int getDCA()
throws OneWireIOException,
OneWireException,
IllegalArgumentException
OneWireIOException - Error reading dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void setICA(int icaValue)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
icaValue - new ICA valueOneWireIOException - Error writing dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void setCCA(int ccaValue)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
ccaValue - new CCA valueOneWireIOException - Error writing dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passed
public void setDCA(int dcaValue)
throws OneWireIOException,
OneWireException,
IllegalArgumentException
dcaValue - new DCA valueOneWireIOException - Error writing dataOneWireException - Could not find partIllegalArgumentException - Bad parameters passedpublic long getDisconnectTime(byte[] state)
readDevice() method.state - device statepublic long getEndOfChargeTime(byte[] state)
readDevice() method.state - device statepublic int getNumberADChannels()
getNumberADChannels in interface ADContainerpublic boolean hasADAlarms()
hasADAlarms in interface ADContainerpublic double[] getADRanges(int channel)
getADRanges in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]
public double[] getADResolutions(int channel,
double range)
getADResolutions in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]range - A/D rangepublic boolean canADMultiChannelRead()
canADMultiChannelRead in interface ADContainer
public void doADConvert(int channel,
byte[] state)
throws OneWireIOException,
OneWireException
doADConvert in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]state - current state of the
device returned from readDevice()OneWireIOException - Error writing dataOneWireException - Could not find part
public void doADConvert(boolean[] doConvert,
byte[] state)
throws OneWireIOException,
OneWireException
getVoltage() can be used to read the result
of the conversion. This A/D must support multi-channel read
canMultiChannelRead() if there are more then 1 channel is specified.doADConvert in interface ADContainerdoConvert - channels
to perform conversion onstate - current state of the
device returned from readDevice()OneWireIOException - Error writing dataOneWireException - Could not find part
public double[] getADVoltage(byte[] state)
throws OneWireIOException,
OneWireException
doADConvert() method call. Also must
include the last valid state from the readDevice() method
and this A/D must support multi-channel read canMultiChannelRead()
if there are more then 1 channel.getADVoltage in interface ADContainerstate - current state of the
device returned from readDevice()OneWireIOException - Error reading dataOneWireException - Could not find part
public double getADVoltage(int channel,
byte[] state)
throws OneWireIOException,
OneWireException
doADConvert() method call. Also must
include the last valid state from the readDevice() method.
Note, if more then one channel is to be read then it is more
efficient to use the getVoltage() method that returns all
channel values.getADVoltage in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]state - current state of the
device returned from readDevice()OneWireIOException - Error reading dataOneWireException - Could not find part
public double getADAlarm(int channel,
int alarmType,
byte[] state)
throws OneWireException
readDevice() method.getADAlarm in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]alarmType - desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state - current state of the
device returned from readDevice()OneWireException - Device does not support A/D alarms
public boolean getADAlarmEnable(int channel,
int alarmType,
byte[] state)
throws OneWireException
readDevice() method.getADAlarmEnable in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]alarmType - desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state - current state of the state
returned from readDevice()OneWireException - Device does not support A/D alarms
public boolean hasADAlarmed(int channel,
int alarmType,
byte[] state)
throws OneWireException
readDevice() method.hasADAlarmed in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]alarmType - desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)state - current state of the state
returned from readDevice()OneWireException - Device does not support A/D alarms
public double getADResolution(int channel,
byte[] state)
readDevice() method.getADResolution in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]state - current state of the state
returned from readDevice()
public double getADRange(int channel,
byte[] state)
readDevice() method.getADRange in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]state - current state of the state
returned from readDevice()
public void setADAlarm(int channel,
int alarmType,
double alarm,
byte[] state)
throws OneWireException
readDevice() method.
The method writeDevice() must be called to finalize these
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().setADAlarm in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]alarmType - desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)alarm - alarm value (will be reduced to 8 bit resolution)state - current state of the
device returned from readDevice()OneWireException - Device does not support A/D alarms
public void setADAlarmEnable(int channel,
int alarmType,
boolean alarmEnable,
byte[] state)
throws OneWireException
readDevice() method.
The method writeDevice() must be called to finalize these
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().setADAlarmEnable in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]alarmType - desired alarm, ALARM_HIGH (1)
or ALARM_LOW (0)alarmEnable - alarm enable valuestate - current state of the
device returned from readDevice()OneWireException - Device does not support A/D alarms
public void setADResolution(int channel,
double resolution,
byte[] state)
readDevice() method.
The method writeDevice() must be called to finalize these
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().setADResolution in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]resolution - resolution to use in voltsstate - current state of the
device returned from readDevice()
public void setADRange(int channel,
double range,
byte[] state)
readDevice() method.
The method writeDevice() must be called to finalize these
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().setADRange in interface ADContainerchannel - channel in the range
[0 to (getNumberChannels() - 1)]range - maximum volt range, use
getRanges() method to get available rangesstate - current state of the
device returned from readDevice()
public byte[] readDevice()
throws OneWireIOException,
OneWireException
writeDevice() to finalize the one or more change.readDevice in interface OneWireSensorOneWireIOException - Error reading dataOneWireException - Could not find part
public void writeDevice(byte[] state)
throws OneWireIOException,
OneWireException
writeDevice in interface OneWireSensorstate - device's stateOneWireIOException - Error writting dataOneWireException - Could not find partpublic boolean hasTemperatureAlarms()
hasTemperatureAlarms in interface TemperatureContainerpublic boolean hasSelectableTemperatureResolution()
hasSelectableTemperatureResolution in interface TemperatureContainerpublic double[] getTemperatureResolutions()
getTemperatureResolutions in interface TemperatureContainer
public double getTemperatureAlarmResolution()
throws OneWireException
getTemperatureAlarmResolution in interface TemperatureContainerOneWireException - Device does not have temperature alarmspublic double getMaxTemperature()
getMaxTemperature in interface TemperatureContainerpublic double getMinTemperature()
getMinTemperature in interface TemperatureContainer
public void doTemperatureConvert(byte[] state)
throws OneWireIOException,
OneWireException
doTemperatureConvert in interface TemperatureContainerstate - device stateOneWireIOException - Error writting dataOneWireException - Could not find partpublic double getTemperature(byte[] state)
readDevice() method.getTemperature in interface TemperatureContainerstate - device statedoTemperature()
public double getTemperatureAlarm(int alarmType,
byte[] state)
throws OneWireException
readDevice() method.getTemperatureAlarm in interface TemperatureContaineralarmType - alarm trip type ALARM_HIGH (1)
or ALARM_LOW (0)state - device stateOneWireException - Device does not have temperature alarmspublic double getTemperatureResolution(byte[] state)
readDevice() method.getTemperatureResolution in interface TemperatureContainerstate - device state
public void setTemperatureAlarm(int alarmType,
double alarmValue,
byte[] state)
throws OneWireException,
OneWireIOException
writeDevice() with
this data to finalize the change to the device.setTemperatureAlarm in interface TemperatureContaineralarmType - alarm type ALARM_HIGH (1)
or ALARM_LOW (0)alarmValue - trip value in degrees Cstate - device stateOneWireException - Device does not have temperature alarms
public void setTemperatureResolution(double resolution,
byte[] state)
throws OneWireException,
OneWireIOException
writeDevice() with
this data to finalize the change to the device.setTemperatureResolution in interface TemperatureContainerresolution - temperature resolution in degrees Cstate - device stateOneWireIOException - Error writting dataOneWireException - Could not find partpublic boolean hasClockAlarm()
hasClockAlarm in interface ClockContainerpublic boolean canDisableClock()
isClockRunning() and setClockRunEnable().canDisableClock in interface ClockContainerpublic long getClockResolution()
getClockResolution in interface ClockContainerpublic long getClock(byte[] state)
readDevice() method.getClock in interface ClockContainerstate - device state
public long getClockAlarm(byte[] state)
throws OneWireException
readDevice()
method.getClockAlarm in interface ClockContainerstate - device stateOneWireException - Device does not have clock alarmpublic boolean isClockAlarming(byte[] state)
readDevice() method.isClockAlarming in interface ClockContainerstate - device statepublic boolean isClockAlarmEnabled(byte[] state)
readDevice() method.isClockAlarmEnabled in interface ClockContainerstate - device statepublic boolean isClockRunning(byte[] state)
readDevice() method.isClockRunning in interface ClockContainerstate - device state
public void setClock(long time,
byte[] state)
writeDevice() with
this data to finalize the change to the device.setClock in interface ClockContainertime - new clock setting in millisecondsstate - device state
public void setClockAlarm(long time,
byte[] state)
throws OneWireException
writeDevice() with
this data to finalize the change to the device.setClockAlarm in interface ClockContainertime - new clock setting in mllisecondsstate - device stateOneWireException - Device does not support clock alarm
public void setClockRunEnable(boolean runEnable,
byte[] state)
throws OneWireException
writeDevice() with this
data to finalize the change to the device.setClockRunEnable in interface ClockContainerrunEnable - true to enable clock oscillatorstate - device stateOneWireException - Device does not support disabled clock
public void setClockAlarmEnable(boolean alarmEnable,
byte[] state)
throws OneWireException
writeDevice() with this data to finalize the
change to the device.setClockAlarmEnable in interface ClockContaineralarmEnable - - true to enable clock alarmstate - device stateOneWireException - Device does not support clock alarmpublic boolean isRelative()
isRelative in interface HumidityContainertrue if this HumidityContainer
provides a relative humidity readinggetHumidityResolution(byte[]),
getHumidityResolutions(),
setHumidityResolution(double, byte[])public boolean hasHumidityAlarms()
hasHumidityAlarms in interface HumidityContainertrue if this HumidityContainer
has high/low trip alarmsgetHumidityAlarm(int, byte[]),
setHumidityAlarm(int, double, byte[])public boolean hasSelectableHumidityResolution()
hasSelectableHumidityResolution in interface HumidityContainertrue if this HumidityContainer
has selectable Humidity resolutiongetHumidityResolution(byte[]),
getHumidityResolutions(),
setHumidityResolution(double, byte[])public double[] getHumidityResolutions()
getHumidityResolutions in interface HumidityContainerhasSelectableHumidityResolution(),
getHumidityResolution(byte[]),
setHumidityResolution(double, byte[])
public double getHumidityAlarmResolution()
throws OneWireException
getHumidityAlarmResolution in interface HumidityContainerOneWireException - Device does not support Humidity
alarmshasHumidityAlarms(),
getHumidityAlarm(int, byte[]),
setHumidityAlarm(int, double, byte[])
public void doHumidityConvert(byte[] state)
throws OneWireIOException,
OneWireException
doHumidityConvert in interface HumidityContainerstate - byte array with device state informationOneWireIOException - on a 1-Wire communication error such as
reading an incorrect CRC from a 1-Wire device. This could be
caused by a physical interruption in the 1-Wire Network due to
shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.OneWireException - on a communication or setup error with the 1-Wire
adapterpublic double getHumidity(byte[] state)
getHumidity in interface HumidityContainerstate - byte array with device state informationhasSelectableHumidityResolution(),
getHumidityResolution(byte[]),
setHumidityResolution(double, byte[])public double getHumidityResolution(byte[] state)
state data retrieved from the readDevice()
method.getHumidityResolution in interface HumidityContainerstate - byte array with device state informationhasSelectableHumidityResolution(),
getHumidityResolutions(),
setHumidityResolution(double, byte[])
public double getHumidityAlarm(int alarmType,
byte[] state)
throws OneWireException
state data retrieved from the
readDevice() method.getHumidityAlarm in interface HumidityContaineralarmType - valid value: ALARM_HIGH or
ALARM_LOWstate - byte array with device state informationOneWireException - Device does not support Humidity
alarmshasHumidityAlarms(),
setHumidityAlarm(int, double, byte[])
public void setHumidityAlarm(int alarmType,
double alarmValue,
byte[] state)
throws OneWireException
state data.
Use the method writeDevice() with
this data to finalize the change to the device.setHumidityAlarm in interface HumidityContaineralarmType - valid value: ALARM_HIGH or
ALARM_LOWalarmValue - alarm trip value in percentstate - byte array with device state informationOneWireException - Device does not support Humidity
alarmshasHumidityAlarms(),
getHumidityAlarm(int, byte[])
public void setHumidityResolution(double resolution,
byte[] state)
throws OneWireException
state data. Use the method writeDevice()
with this data to finalize the change to the device.setHumidityResolution in interface HumidityContainerresolution - Humidity resolution in percentstate - byte array with device state informationOneWireException - Device does not support selectable
Humidity resolutionhasSelectableHumidityResolution(),
getHumidityResolution(byte[]),
getHumidityResolutions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||