|
||||||||||
| 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.OneWireContainer41
1-Wire® container for a Temperature and Humidity/A-D Logging iButton, DS1922. This container encapsulates the functionality of the 1-Wire family type 22 (hex).
The memory can be accessed through the objects that are returned
from the getMemoryBanks method.
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
The code below starts a mission with the following characteristics:
// "ID" is a byte array of size 8 with an address of a part we
// have already found with family code 22 hex
// "access" is a DSPortAdapter
OneWireContainer41 ds1922 = (OneWireContainer41)access.getDeviceContainer(ID);
ds1922.setupContainer(access,ID);
// stop the currently running mission, if there is one
ds1922.stopMission();
// clear the previous mission results
ds1922.clearMemory();
// set the high temperature alarm to 28 C
ds1922.setMissionAlarm(ds1922.TEMPERATURE_CHANNEL, ds1922.ALARM_HIGH, 28);
ds1922.setMissionAlarmEnable(ds1922.TEMPERATURE_CHANNEL,
ds1922.ALARM_HIGH, true);
// set the low temperature alarm to 23 C
ds1922.setMissionAlarm(ds1922.TEMPERATURE_CHANNEL, ds1922.ALARM_LOW, 23);
ds1922.setMissionAlarmEnable(ds1922.TEMPERATURE_CHANNEL,
ds1922.ALARM_LOW, true);
// set the high humidity alarm to 70%RH
ds1922.setMissionAlarm(ds1922.DATA_CHANNEL, ds1922.ALARM_HIGH, 70);
ds1922.setMissionAlarmEnable(ds1922.DATA_CHANNEL,
ds1922.ALARM_HIGH, true);
// set the low humidity alarm to 20%RH
ds1922.setMissionAlarm(ds1922.DATA_CHANNEL, ds1922.ALARM_LOW, 20);
ds1922.setMissionAlarmEnable(ds1922.DATA_CHANNEL,
ds1922.ALARM_LOW, true);
// set both channels to low resolution.
ds1922.setMissionResolution(ds1922.TEMPERATURE_CHANNEL,
ds1922.getMissionResolutions()[0]);
ds1922.setMissionResolution(ds1922.DATA_CHANNEL,
ds1922.getMissionResolutions()[0]);
// enable both channels
boolean[] enableChannel = new boolean[ds1922.getNumberMissionChannels()];
enableChannel[ds1922.TEMPERATURE_CHANNEL] = true;
enableChannel[ds1922.DATA_CHANNEL] = true;
// now start the mission with a sample rate of 1 minute
ds1922.startMission(90, 2, true, true, enableChannel);
The following code processes the mission log:
System.out.println("Temperature Readings");
if(ds1922.getMissionChannelEnable(owc.TEMPERATURE_CHANNEL))
{
int dataCount =
ds1922.getMissionSampleCount(ds1922.TEMPERATURE_CHANNEL);
System.out.println("SampleCount = " + dataCount);
for(int i=0; i<dataCount; i++)
{
System.out.println(
ds1922.getMissionSample(ds1922.TEMPERATURE_CHANNEL, i));
}
}
System.out.println("Humidity Readings");
if(ds1922.getMissionChannelEnable(owc.DATA_CHANNEL))
{
int dataCount =
ds1922.getMissionSampleCount(ds1922.DATA_CHANNEL);
System.out.println("SampleCount = " + dataCount);
for(int i=0; i<dataCount; i++)
{
System.out.println(
ds1922.getMissionSample(ds1922.DATA_CHANNEL, i));
}
}
Also see the usage examples in the TemperatureContainer
and ClockContainer
and ADContainer
interfaces.
OneWireContainer
to enumerate the MemoryBanks.
MemoryBank and
PagedMemoryBank
for bank specific operations.
DataSheet link is unavailable at time of publication. Please visit the website and search for DS1922 or DS2422 to find the current datasheet.
OneWireSensor,
SwitchContainer,
TemperatureContainer,
ADContainer,
MissionContainer,
PasswordContainer| Field Summary | |
static int |
ALARM_STATUS_REGISTER
Address of Alarm Status Register |
static byte |
ASR_BIT_BATTERY_ON_RESET
Alarm Status Register Bit: Battery On Reset |
static byte |
ASR_BIT_DATA_HIGH_ALARM
Alarm Status Register Bit: Data High Alarm |
static byte |
ASR_BIT_DATA_LOW_ALARM
Alarm Status Register Bit: Data Low Alarm |
static byte |
ASR_BIT_TEMPERATURE_HIGH_ALARM
Alarm Status Register Bit: Temperature High Alarm |
static byte |
ASR_BIT_TEMPERATURE_LOW_ALARM
Alarm Status Register Bit: Temperature Low Alarm |
static byte |
CLEAR_MEMORY_PW_COMMAND
1-Wire command for Clear Memory With Password |
static byte |
COPY_SCRATCHPAD_PW_COMMAND
1-Wire command for Copy Scratchpad With Password |
static int |
DATA_CHANNEL
Refers to the Humidity/A-D Channel for this device |
static int |
DATA_CONTROL_REGISTER
Address of Data Control Register |
static int |
DATA_HIGH_ALARM_THRESHOLD
Address of the Data High Alarm Register |
static int |
DATA_LOW_ALARM_THRESHOLD
Address of the Data Low Alarm Register |
static byte |
DCB_DS1922H
Value of Device Configuration Register for DS1922H |
static byte |
DCB_DS1922L
Value of Device Configuration Register for DS1922L |
static byte |
DCB_DS1922T
Value of Device Configuration Register for DS1922T |
static byte |
DCB_DS2422S
Value of Device Configuration Register for DS1922S |
static byte |
DCR_BIT_ENABLE_DATA_HIGH_ALARM
Data Control Register Bit: Enable Data High Alarm |
static byte |
DCR_BIT_ENABLE_DATA_LOW_ALARM
Data Control Register Bit: Enable Data Low Alarm |
static int |
DEVICE_CONFIGURATION_BYTE
Address of Device Configuration Register |
static int |
DEVICE_SAMPLE_COUNT
Address of the Device Sample Count |
static byte |
FORCED_CONVERSION
1-Wire command for Forced Conversion |
static int |
GENERAL_STATUS_REGISTER
Address of General Status Register |
static byte |
GSR_BIT_CONVERSION_IN_PROGRESS
General Status Register Bit: Conversion In Progress |
static byte |
GSR_BIT_FORCED_CONVERSION_IN_PROGRESS
General Status Register Bit: Forced Conversion In Progress |
static byte |
GSR_BIT_MEMORY_CLEARED
General Status Register Bit: Memory Cleared |
static byte |
GSR_BIT_MISSION_IN_PROGRESS
General Status Register Bit: Mission In Progress |
static byte |
GSR_BIT_SAMPLE_IN_PROGRESS
General Status Register Bit: Sample In Progress |
static byte |
GSR_BIT_WAITING_FOR_TEMPERATURE_ALARM
General Status Register Bit: Waiting for Temperature Alarm |
static int |
LAST_DATA_CONVERSION_LSB
Address of the last data conversion's LSB |
static int |
LAST_DATA_CONVERSION_MSB
Address of the last data conversion's MSB |
static int |
LAST_TEMPERATURE_CONVERSION_LSB
Address of the last temperature conversion's LSB |
static int |
LAST_TEMPERATURE_CONVERSION_MSB
Address of the last temperature conversion's MSB |
static byte |
MCR_BIT_DATA_RESOLUTION
Mission Control Register Bit: Set Data Resolution |
static byte |
MCR_BIT_ENABLE_DATA_LOGGING
Mission Control Register Bit: Enable Data Logging |
static byte |
MCR_BIT_ENABLE_ROLLOVER
Mission Control Register Bit: Enable Rollover |
static byte |
MCR_BIT_ENABLE_TEMPERATURE_LOGGING
Mission Control Register Bit: Enable Temperature Logging |
static byte |
MCR_BIT_START_MISSION_ON_TEMPERATURE_ALARM
Mission Control Register Bit: Start Mission on Temperature Alarm |
static byte |
MCR_BIT_TEMPERATURE_RESOLUTION
Mission Control Register Bit: Set Temperature Resolution |
static int |
MISSION_CONTROL_REGISTER
Address of Mission Control Register |
static int |
MISSION_LOG_SIZE
maximum size of the mission log |
static int |
MISSION_SAMPLE_COUNT
Address of the Mission Sample Count |
static int |
MISSION_START_DELAY
Address of the Mission Start Delay |
static int |
MISSION_TIMESTAMP_DATE
Address of the Mission Timestamp Date value |
static int |
MISSION_TIMESTAMP_TIME
Address of the Mission Timestamp Time value |
static int |
ODD_MISSION_LOG_SIZE
mission log size for odd combination of resolutions (i.e. |
static int |
PASSWORD_CONTROL_REGISTER
Address of the Password Control Register. |
static byte |
RCR_BIT_ENABLE_HIGH_SPEED_SAMPLE
Real-Time Clock Control Register Bit: Enable High Speed Sample |
static byte |
RCR_BIT_ENABLE_OSCILLATOR
Real-Time Clock Control Register Bit: Enable Oscillator |
static int |
READ_ACCESS_PASSWORD
Address of Read Access Password. |
static byte |
READ_MEMORY_CRC_PW_COMMAND
1-Wire command for Read Memory CRC With Password |
static byte |
READ_SCRATCHPAD_COMMAND
1-Wire command for Read Scratchpad |
static int |
READ_WRITE_ACCESS_PASSWORD
Address of the Read Write Access Password. |
static int |
RTC_CONTROL_REGISTER
Address of Real-Time Clock Control Register |
static int |
RTC_DATE
Address of the Real-time Clock Date value |
static int |
RTC_TIME
Address of the Real-time Clock Time value |
static int |
SAMPLE_RATE
Address of the Sample Rate Register |
static byte |
START_MISSION_PW_COMMAND
1-Wire command for Start Mission With Password |
static byte |
STOP_MISSION_PW_COMMAND
1-Wire command for Stop Mission With Password |
static byte |
TCR_BIT_ENABLE_TEMPERATURE_HIGH_ALARM
Temperature Control Register Bit: Enable Data Low Alarm |
static byte |
TCR_BIT_ENABLE_TEMPERATURE_LOW_ALARM
Temperature Control Register Bit: Enable Data Low Alarm |
static int |
TEMPERATURE_CHANNEL
Refers to the Temperature Channel for this device |
static int |
TEMPERATURE_CONTROL_REGISTER
Address of Temperature Control Register |
static int |
TEMPERATURE_HIGH_ALARM_THRESHOLD
Address of the Temperature High Alarm Register |
static int |
TEMPERATURE_LOW_ALARM_THRESHOLD
Address of the Temperature Low Alarm Register |
static byte |
WRITE_SCRATCHPAD_COMMAND
1-Wire command for Write Scratchpad |
| Fields inherited from interface com.dalsemi.onewire.container.MissionContainer |
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.ADContainer |
ALARM_HIGH, ALARM_LOW |
| Fields inherited from interface com.dalsemi.onewire.container.HumidityContainer |
ALARM_HIGH, ALARM_LOW |
| Constructor Summary | |
OneWireContainer41()
Creates a new OneWireContainer for communication with a
DS1922. |
|
OneWireContainer41(DSPortAdapter sourceAdapter,
byte[] newAddress)
Creates a new OneWireContainer for communication with a
DS1922. |
|
OneWireContainer41(DSPortAdapter sourceAdapter,
long newAddress)
Creates a new OneWireContainer for communication with a
DS1922. |
|
OneWireContainer41(DSPortAdapter sourceAdapter,
String newAddress)
Creates a new OneWireContainer for communication with a
DS1922. |
|
| Method Summary | |
boolean |
canADMultiChannelRead()
Checks to see if this A/D supports doing multiple voltage conversions at the same time. |
boolean |
canDisableClock()
Checks to see if the clock can be disabled. |
void |
clearMemory()
Erases the log memory from this missioning device. |
void |
clearMissionResults()
Clears the mission results and erases the log memory from this missioning device. |
void |
doADConvert(boolean[] doConvert,
byte[] state)
Performs voltage conversion on one or more specified channels. |
void |
doADConvert(int channel,
byte[] state)
Performs a voltage conversion on one specified channel. |
void |
doHumidityConvert(byte[] state)
Performs a Humidity conversion. |
void |
doTemperatureConvert(byte[] state)
Performs a temperature conversion. |
double |
getADAlarm(int channel,
int alarmType,
byte[] state)
Reads the value of the specified A/D alarm on the specified channel. |
boolean |
getADAlarmEnable(int channel,
int alarmType,
byte[] state)
Checks to see if the specified alarm on the specified channel is enabled. |
int |
getADDeviceBitCount()
|
double |
getADRange(int channel,
byte[] state)
Returns the currently selected range for the specified channel. |
double[] |
getADRanges(int channel)
Gets an array of available ranges for the specified A/D channel. |
double |
getADReferenceVoltage()
|
double |
getADResolution(int channel,
byte[] state)
Returns the currently selected resolution for the specified channel. |
double[] |
getADResolutions(int channel,
double range)
Gets an array of available resolutions based on the specified range on the specified A/D channel. |
double[] |
getADVoltage(byte[] state)
Reads the value of the voltages after a doADConvert(boolean[],byte[])
method call. |
double |
getADVoltage(int channel,
byte[] state)
Reads the value of the voltages after a doADConvert(int,byte[])
method call. |
String |
getAlternateNames()
Retrieves the alternate Dallas Semiconductor part numbers or names. |
long |
getClock(byte[] state)
Extracts the Real-Time clock value in milliseconds. |
long |
getClockAlarm(byte[] state)
Extracts the clock alarm value for the Real-Time clock. |
long |
getClockResolution()
Gets the clock resolution in milliseconds |
void |
getContainerReadOnlyPassword(byte[] password,
int offset)
Gets the Read-Only password used by the API when reading from the device's memory. |
void |
getContainerReadWritePassword(byte[] password,
int offset)
Gets the Read/Write password used by the API when reading from or writing to the device's memory. |
void |
getContainerWriteOnlyPassword(byte[] password,
int offset)
Gets the Write-Only password used by the API when writing to the device's memory. |
MemoryBankNVCRCPW |
getDataLogMemoryBank()
Returns instance of the memory bank representing this device's data log. |
String |
getDescription()
Gets a short description of the function of this iButton or 1-Wire Device type. |
boolean |
getDeviceReadOnlyPasswordEnable()
Returns true if the device's Read-Only password has been enabled. |
boolean |
getDeviceReadWritePasswordEnable()
Returns true if the device's Read/Write password has been enabled. |
int |
getDeviceSampleCount()
Reads the device and returns the total number of samples logged since the first power-on of this device. |
int |
getDeviceSampleCount(byte[] state)
Returns the total number of samples logged since the first power-on of this device. |
boolean |
getDeviceWriteOnlyPasswordEnable()
Returns true if the device's Write-Only password has been enabled. |
long |
getFirstSampleOffset(int channel)
Returns the amount of time, in milliseconds, before the first sample occurred. |
boolean |
getFlag(int register,
byte bitMask)
Gets the status of the specified flag from the specified register. |
boolean |
getFlag(int register,
byte bitMask,
byte[] state)
Gets the status of the specified flag from the specified register. |
boolean |
getForceADResults()
|
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 |
getMaxSpeed()
Returns the maximum speed this iButton device can communicate at. |
double |
getMaxTemperature()
Gets the maximum temperature in Celsius. |
Enumeration |
getMemoryBanks()
Gets an enumeration of memory bank instances that implement one or more of the following interfaces: MemoryBank,
PagedMemoryBank,
and OTPMemoryBank. |
double |
getMinTemperature()
Gets the minimum temperature in Celsius. |
double |
getMissionAlarm(int channel,
int alarmType)
Returns the threshold value which will trigger the alarm of the specified type on the specified channel. |
boolean |
getMissionAlarmEnable(int channel,
int alarmType)
Returns true if the alarm of the specified type has been enabled for the specified channel. |
boolean |
getMissionChannelEnable(int channel)
Returns true if the specified mission channel is enabled, indicating that the channel's readings will be recorded in the mission log. |
String |
getMissionLabel(int channel)
Returns a default friendly label for each channel supported by this Missioning device. |
double |
getMissionResolution(int channel)
Returns the currently selected resolution for the specified channel. |
double[] |
getMissionResolutions(int channel)
Returns all available resolutions for the specified mission channel. |
double |
getMissionSample(int channel,
int sampleNum)
Returns the sample as degrees celsius if temperature channel is specified or as percent relative humidity if data channel is specified. |
int |
getMissionSampleAsInteger(int channel,
int sampleNum)
Returns the sample as an integer value. |
int |
getMissionSampleCount(int channel)
Returns the number of samples available for the specified channel during the current mission. |
int |
getMissionSampleCountTotal(int channel)
Returns the total number of samples taken for the specified channel during the current mission. |
int |
getMissionSampleRate(int channel)
Returns the amount of time, in seconds, between samples taken by this missioning device. |
long |
getMissionSampleTimeStamp(int channel,
int sampleNum)
Returns the time, in milliseconds, that each sample was taken by the current mission. |
long |
getMissionTimeStamp(int channel)
Returns the time, in milliseconds, that the mission began. |
String |
getName()
Gets the Dallas Semiconductor part number of the iButton or 1-Wire Device as a java.lang.String. |
int |
getNumberADChannels()
Gets the number of channels supported by this A/D. |
int |
getNumberMissionChannels()
Gets the number of channels supported by this Missioning device. |
int |
getReadOnlyPasswordAddress()
Returns the absolute address of the memory location where the Read-Only password is written. |
int |
getReadOnlyPasswordLength()
Returns the length in bytes of the Read-Only password. |
int |
getReadWritePasswordAddress()
Returns the absolute address of the memory location where the Read/Write password is written. |
int |
getReadWritePasswordLength()
Returns the length in bytes of the Read/Write password. |
MemoryBankNVCRCPW |
getRegisterMemoryBank()
Returns instance of the memory bank representing this device's special function registers. |
MemoryBankScratchCRCPW |
getScratchpadMemoryBank()
Returns instance of the memory bank representing this device's scratchpad. |
double |
getTemperature(byte[] state)
Gets the temperature value in Celsius from the state
data retrieved from the readDevice() method. |
double |
getTemperatureAlarm(int alarmType,
byte[] state)
Gets the specified temperature alarm value in Celsius from the state data retrieved from the
readDevice() method. |
double |
getTemperatureAlarmResolution()
Gets the temperature alarm resolution in Celsius. |
double |
getTemperatureResolution(byte[] state)
Gets the current temperature resolution in Celsius from the state data retrieved from the readDevice()
method. |
double[] |
getTemperatureResolutions()
Get an array of available temperature resolutions in Celsius. |
MemoryBankNVCRCPW |
getUserDataMemoryBank()
Returns instance of the memory bank representing this device's general-purpose user data memory. |
int |
getWriteOnlyPasswordAddress()
Returns the absolute address of the memory location where the Write-Only password is written. |
int |
getWriteOnlyPasswordLength()
Returns the length in bytes of the Write-Only password. |
boolean |
hasADAlarmed(int channel,
int alarmType,
byte[] state)
Checks the state of the specified alarm on the specified channel. |
boolean |
hasADAlarms()
Checks to see if this A/D measuring device has high/low alarms. |
boolean |
hasClockAlarm()
Checks 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 |
hasMissionAlarmed(int channel,
int alarmType)
Returns true if the specified channel's alarm value of the specified type has been triggered during the mission. |
boolean |
hasMissionAlarms(int channel)
Indicates whether or not the specified channel of this missioning device has mission alarm capabilities. |
boolean |
hasMissionRolloverOccurred()
Returns true if a mission has rolled over. |
boolean |
hasReadOnlyPassword()
Returns true if this device has a Read-Only password. |
boolean |
hasReadWritePassword()
Returns true if this device has a Read/Write password. |
boolean |
hasSelectableHumidityResolution()
Checks to see if this device has selectable Humidity resolution. |
boolean |
hasSelectableTemperatureResolution()
Checks to see if this device has selectable temperature resolution. |
boolean |
hasSinglePasswordEnable()
Returns true if this device has the capability to enable one type of password while leaving another type disabled. |
boolean |
hasTemperatureAlarms()
Checks to see if this temperature measuring device has high/low trip alarms. |
boolean |
hasWriteOnlyPassword()
Returns true if this device has a Write-Only password. |
boolean |
isClockAlarmEnabled(byte[] state)
Checks if the clock alarm is enabled. |
boolean |
isClockAlarming(byte[] state)
Checks if the clock alarm flag has been set. |
boolean |
isClockRunning(byte[] state)
Checks if the device's oscillator is enabled. |
boolean |
isContainerReadOnlyPasswordSet()
Returns true if the password used by the API for reading from the device's memory has been set. |
boolean |
isContainerReadWritePasswordSet()
Returns true if the password used by the API for reading from or writing to the device's memory has been set. |
boolean |
isContainerWriteOnlyPasswordSet()
Returns true if the password used by the API for writing to the device's memory has been set. |
boolean |
isMissionLoaded()
Returns true if the mission results have been loaded from the device. |
boolean |
isMissionRolloverEnabled()
Returns true if a rollover is enabled. |
boolean |
isMissionRunning()
Returns true if a mission is currently running. |
boolean |
isMissionSUTA()
Returns true if the currently loaded mission results indicate that this mission has the SUTA bit enabled. |
boolean |
isMissionWFTA()
Returns true if the currently loaded mission results indicate that this mission has the SUTA bit enabled and is still Waiting For Temperature Alarm (WFTA). |
boolean |
isRelative()
Checks to see if humidity value given is a 'relative' humidity value. |
boolean |
isStartUponTemperatureAlarmEnabled()
Returns true if the SUTA (Start Upon Temperature Alarm) bit in the Mission Control register is set. |
boolean |
isStartUponTemperatureAlarmEnabled(byte[] state)
Returns true if the SUTA (Start Upon Temperature Alarm) bit in the Mission Control register is set. |
void |
loadMissionResults()
Loads the results of the currently running mission. |
byte |
readByte(int memAddr)
Reads a single byte from the DS1922. |
byte[] |
readDevice()
Retrieves the 1-Wire device sensor state. |
void |
setADAlarm(int channel,
int alarmType,
double alarm,
byte[] state)
Sets the voltage value of the specified alarm on the specified channel. |
void |
setADAlarmEnable(int channel,
int alarmType,
boolean alarmEnable,
byte[] state)
Enables or disables the specified alarm on the specified channel. |
void |
setADDeviceBitCount(int bits)
|
void |
setADRange(int channel,
double range,
byte[] state)
Sets the input range for the specified channel. |
void |
setADReferenceVoltage(double referenceVoltage)
|
void |
setADResolution(int channel,
double resolution,
byte[] state)
Sets the conversion resolution value for the specified channel. |
void |
setClock(long time,
byte[] state)
Sets the Real-Time clock. |
void |
setClockAlarm(long time,
byte[] state)
Sets the clock alarm. |
void |
setClockAlarmEnable(boolean alarmEnable,
byte[] state)
Enables or disables the clock alarm. |
void |
setClockRunEnable(boolean runEnable,
byte[] state)
Enables or disables the oscillator, turning the clock 'on' and 'off'. |
void |
setContainerReadOnlyPassword(byte[] password,
int offset)
Sets the Read-Only password used by the API when reading from the device's memory. |
void |
setContainerReadWritePassword(byte[] password,
int offset)
Sets the Read/Write password used by the API when reading from or writing to the device's memory. |
void |
setContainerWriteOnlyPassword(byte[] password,
int offset)
Sets the Write-Only password used by the API when writing to the device's memory. |
void |
setDefaultTemperatureCompensationValue(double temperatureValue,
boolean override)
Sets the default temperature value for temperature compensation. |
void |
setDevicePasswordEnable(boolean enableReadOnly,
boolean enableReadWrite,
boolean enableWriteOnly)
Enables/Disables passwords for this Device. |
void |
setDevicePasswordEnableAll(boolean enableAll)
Enables/Disables passwords for this device. |
void |
setDeviceReadOnlyPassword(byte[] password,
int offset)
Writes the given password to the device's Read-Only password register. |
void |
setDeviceReadWritePassword(byte[] password,
int offset)
Writes the given password to the device's Read/Write password register. |
void |
setDeviceWriteOnlyPassword(byte[] password,
int offset)
Writes the given password to the device's Write-Only password register. |
void |
setFlag(int register,
byte bitMask,
boolean flagValue)
Sets the status of the specified flag in the specified register. |
void |
setFlag(int register,
byte bitMask,
boolean flagValue,
byte[] state)
Sets the status of the specified flag in the specified register. |
void |
setForceADResults(boolean force)
|
void |
setHumidityAlarm(int alarmType,
double alarmValue,
byte[] state)
Sets the Humidity alarm value in percent in the provided state data. |
void |
setHumidityCalibrationRegisterUsage(boolean use)
Enables/Disables the usage of the humidity calibration registers. |
void |
setHumidityResolution(double resolution,
byte[] state)
Sets the current Humidity resolution in percent in the provided state data. |
void |
setMissionAlarm(int channel,
int alarmType,
double threshold)
Sets the threshold value which will trigger the alarm of the specified type on the specified channel. |
void |
setMissionAlarmEnable(int channel,
int alarmType,
boolean enable)
Enables/disables the alarm of the specified type for the specified channel |
void |
setMissionChannelEnable(int channel,
boolean enable)
Enables/disables the specified mission channel, indicating whether or not the channel's readings will be recorded in the mission log. |
void |
setMissionResolution(int channel,
double resolution)
Sets the selected resolution for the specified channel. |
void |
setSpeedCheck(boolean doSpeedCheck)
Directs the container to avoid the calls to doSpeed() in methods that communicate with the DS1922/DS2422. |
void |
setStartUponTemperatureAlarmEnable(boolean enable)
Sets the SUTA (Start Upon Temperature Alarm) bit in the Mission Control register. |
void |
setStartUponTemperatureAlarmEnable(boolean enable,
byte[] state)
Sets the SUTA (Start Upon Temperature Alarm) bit in the Mission Control register. |
void |
setTemperatureAlarm(int alarmType,
double alarmValue,
byte[] state)
Sets the temperature alarm value in Celsius in the provided state data. |
void |
setTemperatureCalibrationRegisterUsage(boolean use)
Enables/Disables the usage of calibration registers. |
void |
setTemperatureCompensationUsage(boolean use)
Enables/Disables the usage of temperature compensation. |
void |
setTemperatureResolution(double resolution,
byte[] state)
Sets the current temperature resolution in Celsius in the provided state data. |
void |
setupContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provides this container with the adapter object used to access this device and the address of the iButton or 1-Wire device. |
void |
setupContainer(DSPortAdapter sourceAdapter,
long newAddress)
Provides this container with the adapter object used to access this device and the address of the iButton or 1-Wire device. |
void |
setupContainer(DSPortAdapter sourceAdapter,
String newAddress)
Provides this container with the adapter object used to access this device and the address of the iButton or 1-Wire device. |
void |
startMission()
Starts a new mission. |
void |
startNewMission(int sampleRate,
int missionStartDelay,
boolean rolloverEnabled,
boolean syncClock,
boolean[] channelEnabled)
Begins a new mission on this missioning device. |
void |
stopMission()
Stops the currently running mission. |
void |
writeDevice(byte[] state)
Writes the 1-Wire device sensor state that have been changed by 'set' methods. |
| Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, equals, getAdapter, getAddress, getAddressAsLong, getAddressAsString, hashCode, isAlarming, isPresent, setSpeed, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TEMPERATURE_CHANNEL
public static final int DATA_CHANNEL
public static final byte WRITE_SCRATCHPAD_COMMAND
public static final byte READ_SCRATCHPAD_COMMAND
public static final byte COPY_SCRATCHPAD_PW_COMMAND
public static final byte READ_MEMORY_CRC_PW_COMMAND
public static final byte CLEAR_MEMORY_PW_COMMAND
public static final byte START_MISSION_PW_COMMAND
public static final byte STOP_MISSION_PW_COMMAND
public static final byte FORCED_CONVERSION
public static final int RTC_TIME
public static final int RTC_DATE
public static final int SAMPLE_RATE
public static final int TEMPERATURE_LOW_ALARM_THRESHOLD
public static final int TEMPERATURE_HIGH_ALARM_THRESHOLD
public static final int DATA_LOW_ALARM_THRESHOLD
public static final int DATA_HIGH_ALARM_THRESHOLD
public static final int LAST_TEMPERATURE_CONVERSION_LSB
public static final int LAST_TEMPERATURE_CONVERSION_MSB
public static final int LAST_DATA_CONVERSION_LSB
public static final int LAST_DATA_CONVERSION_MSB
public static final int TEMPERATURE_CONTROL_REGISTER
public static final byte TCR_BIT_ENABLE_TEMPERATURE_LOW_ALARM
public static final byte TCR_BIT_ENABLE_TEMPERATURE_HIGH_ALARM
public static final int DATA_CONTROL_REGISTER
public static final byte DCR_BIT_ENABLE_DATA_LOW_ALARM
public static final byte DCR_BIT_ENABLE_DATA_HIGH_ALARM
public static final int RTC_CONTROL_REGISTER
public static final byte RCR_BIT_ENABLE_OSCILLATOR
public static final byte RCR_BIT_ENABLE_HIGH_SPEED_SAMPLE
public static final int MISSION_CONTROL_REGISTER
public static final byte MCR_BIT_ENABLE_TEMPERATURE_LOGGING
public static final byte MCR_BIT_ENABLE_DATA_LOGGING
public static final byte MCR_BIT_TEMPERATURE_RESOLUTION
public static final byte MCR_BIT_DATA_RESOLUTION
public static final byte MCR_BIT_ENABLE_ROLLOVER
public static final byte MCR_BIT_START_MISSION_ON_TEMPERATURE_ALARM
public static final int ALARM_STATUS_REGISTER
public static final byte ASR_BIT_TEMPERATURE_LOW_ALARM
public static final byte ASR_BIT_TEMPERATURE_HIGH_ALARM
public static final byte ASR_BIT_DATA_LOW_ALARM
public static final byte ASR_BIT_DATA_HIGH_ALARM
public static final byte ASR_BIT_BATTERY_ON_RESET
public static final int GENERAL_STATUS_REGISTER
public static final byte GSR_BIT_SAMPLE_IN_PROGRESS
public static final byte GSR_BIT_MISSION_IN_PROGRESS
public static final byte GSR_BIT_CONVERSION_IN_PROGRESS
public static final byte GSR_BIT_MEMORY_CLEARED
public static final byte GSR_BIT_WAITING_FOR_TEMPERATURE_ALARM
public static final byte GSR_BIT_FORCED_CONVERSION_IN_PROGRESS
public static final int MISSION_START_DELAY
public static final int MISSION_TIMESTAMP_TIME
public static final int MISSION_TIMESTAMP_DATE
public static final int DEVICE_CONFIGURATION_BYTE
public static final byte DCB_DS2422S
public static final byte DCB_DS1922H
public static final byte DCB_DS1922L
public static final byte DCB_DS1922T
public static final int PASSWORD_CONTROL_REGISTER
public static final int READ_ACCESS_PASSWORD
public static final int READ_WRITE_ACCESS_PASSWORD
public static final int MISSION_SAMPLE_COUNT
public static final int DEVICE_SAMPLE_COUNT
public static final int MISSION_LOG_SIZE
public static final int ODD_MISSION_LOG_SIZE
| Constructor Detail |
public OneWireContainer41()
OneWireContainer for communication with a
DS1922.
Note that the method setupContainer(DSPortAdapter,byte[])
must be called to set the correct DSPortAdapter device address.setupContainer(DSPortAdapter,byte[]),
OneWireContainer41(DSPortAdapter,byte[]),
OneWireContainer41(DSPortAdapter,long),
OneWireContainer41(DSPortAdapter,String)
public OneWireContainer41(DSPortAdapter sourceAdapter,
byte[] newAddress)
OneWireContainer for communication with a
DS1922.sourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this DS1922OneWireContainer41(),
OneWireContainer41(DSPortAdapter,long),
OneWireContainer41(DSPortAdapter,String)
public OneWireContainer41(DSPortAdapter sourceAdapter,
long newAddress)
OneWireContainer for communication with a
DS1922.sourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this DS1922OneWireContainer41(),
OneWireContainer41(DSPortAdapter,byte[]),
OneWireContainer41(DSPortAdapter,String)
public OneWireContainer41(DSPortAdapter sourceAdapter,
String newAddress)
OneWireContainer for communication with a
DS1922.sourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this DS1922OneWireContainer41(),
OneWireContainer41(DSPortAdapter,long),
OneWireContainer41(DSPortAdapter,String)| Method Detail |
public void setupContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
setupContainer in class OneWireContainersourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this 1-Wire deviceAddress
public void setupContainer(DSPortAdapter sourceAdapter,
long newAddress)
setupContainer in class OneWireContainersourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this 1-Wire deviceAddress
public void setupContainer(DSPortAdapter sourceAdapter,
String newAddress)
setupContainer in class OneWireContainersourceAdapter - adapter object required to communicate with
this iButtonnewAddress - address of this 1-Wire deviceAddress
public byte[] readDevice()
throws OneWireIOException,
OneWireException
readDevice in interface OneWireSensorOneWireIOException - 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
adapter
public void writeDevice(byte[] state)
throws OneWireIOException,
OneWireException
writeDevice in interface OneWireSensorstate - 1-Wire device sensor stateOneWireIOException - 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
adapter
public byte readByte(int memAddr)
throws OneWireIOException,
OneWireException
readDevice()
method or through the MemoryBank objects returned in the
getMemoryBanks() method.memAddr - the address to read from (in the range of 0x200-0x21F)OneWireIOException - 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
adapterreadDevice(),
getMemoryBanks()
public boolean getFlag(int register,
byte bitMask)
throws OneWireIOException,
OneWireException
Gets the status of the specified flag from the specified register.
This method actually communicates with the DS1922. To improve
performance if you intend to make multiple calls to this method,
first call readDevice() and use the
getFlag(int, byte, byte[]) method instead.
The DS1922 has several sets of flags.
TEMPERATURE_CONTROL_REGISTER TCR_BIT_ENABLE_TEMPERATURE_LOW_ALARM TCR_BIT_ENABLE_TEMPERATURE_HIGH_ALARM DATA_CONTROL_REGISTER DCR_BIT_ENABLE_DATA_LOW_ALARM DCR_BIT_ENABLE_DATA_HIGH_ALARM RTC_CONTROL_REGISTER RCR_BIT_ENABLE_OSCILLATOR RCR_BIT_ENABLE_HIGH_SPEED_SAMPLE MISSION_CONTROL_REGISTER MCR_BIT_ENABLE_TEMPERATURE_LOGGING MCR_BIT_ENABLE_DATA_LOGGING MCR_BIT_TEMPERATURE_RESOLUTION MCR_BIT_DATA_RESOLUTION MCR_BIT_ENABLE_ROLLOVER MCR_BIT_START_MISSION_UPON_TEMPERATURE_ALARM ALARM_STATUS_REGISTER ASR_BIT_TEMPERATURE_LOW_ALARM ASR_BIT_TEMPERATURE_HIGH_ALARM ASR_BIT_DATA_LOW_ALARM ASR_BIT_DATA_HIGH_ALARM ASR_BIT_BATTERY_ON_RESET GENERAL_STATUS_REGISTER GSR_BIT_SAMPLE_IN_PROGRESS GSR_BIT_MISSION_IN_PROGRESS GSR_BIT_MEMORY_CLEARED GSR_BIT_WAITING_FOR_TEMPERATURE_ALARM register - address of register containing the flag (see above for available options)bitMask - the flag to read (see above for available options)true
signifies a "1" and false signifies a "0"OneWireIOException - 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
adaptergetFlag(int,byte,byte[]),
readDevice(),
setFlag(int,byte,boolean)
public boolean getFlag(int register,
byte bitMask,
byte[] state)
Gets the status of the specified flag from the specified register. This method is the preferred manner of reading the control and status flags.
For more information on valid values for the bitMask
parameter, see the getFlag(int,byte) method.
register - address of register containing the flag (see
getFlag(int,byte) for available options)bitMask - the flag to read (see getFlag(int,byte)
for available options)state - current state of the device returned from readDevice()true
signifies a "1" and false signifies a "0"getFlag(int,byte),
readDevice(),
setFlag(int,byte,boolean,byte[])
public void setFlag(int register,
byte bitMask,
boolean flagValue)
throws OneWireIOException,
OneWireException
Sets the status of the specified flag in the specified register.
If a mission is in progress a OneWireIOException will be thrown
(one cannot write to the registers while a mission is commencing). This method
actually communicates with the DS1922. To improve
performance if you intend to make multiple calls to this method,
first call readDevice() and use the
setFlag(int,byte,boolean,byte[]) method instead.
For more information on valid values for the bitMask
parameter, see the getFlag(int,byte) method.
register - address of register containing the flag (see
getFlag(int,byte) for available options)bitMask - the flag to read (see getFlag(int,byte)
for available options)flagValue - new value for the flag (true is logic "1")OneWireIOException - 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'.
In the case of the DS1922, this could also be due to a
currently running mission.OneWireException - on a communication or setup error with the 1-Wire
adaptergetFlag(int,byte),
getFlag(int,byte,byte[]),
setFlag(int,byte,boolean,byte[]),
readDevice()
public void setFlag(int register,
byte bitMask,
boolean flagValue,
byte[] state)
Sets the status of the specified flag in the specified register.
If a mission is in progress a OneWireIOException will be thrown
(one cannot write to the registers while a mission is commencing). This method
is the preferred manner of setting the DS1922 status and control flags.
The method writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().
For more information on valid values for the bitMask
parameter, see the getFlag(int,byte) method.
register - address of register containing the flag (see
getFlag(int,byte) for available options)bitMask - the flag to read (see getFlag(int,byte)
for available options)flagValue - new value for the flag (true is logic "1")state - current state of the device returned from readDevice()getFlag(int,byte),
getFlag(int,byte,byte[]),
setFlag(int,byte,boolean),
readDevice(),
writeDevice(byte[])public Enumeration getMemoryBanks()
MemoryBank,
PagedMemoryBank,
and OTPMemoryBank.getMemoryBanks in class OneWireContainerEnumeration of memory bankspublic MemoryBankScratchCRCPW getScratchpadMemoryBank()
public MemoryBankNVCRCPW getUserDataMemoryBank()
public MemoryBankNVCRCPW getDataLogMemoryBank()
public MemoryBankNVCRCPW getRegisterMemoryBank()
public int getMaxSpeed()
getMaxSpeed in class OneWireContainerDSPortAdapter.setSpeed(int)public String getName()
java.lang.String.
For example "DS1992".getName in class OneWireContainerpublic String getAlternateNames()
getAlternateNames in class OneWireContainerpublic String getDescription()
getDescription in class OneWireContainerpublic 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 void stopMission()
throws OneWireException,
OneWireIOException
stopMission in interface MissionContainer
public void startMission()
throws OneWireException,
OneWireIOException
public void clearMemory()
throws OneWireException,
OneWireIOException
public int getReadOnlyPasswordLength()
throws OneWireException
getReadOnlyPasswordLength in interface PasswordContainer
public int getReadWritePasswordLength()
throws OneWireException
getReadWritePasswordLength in interface PasswordContainer
public int getWriteOnlyPasswordLength()
throws OneWireException
getWriteOnlyPasswordLength in interface PasswordContainer
public int getReadOnlyPasswordAddress()
throws OneWireException
getReadOnlyPasswordAddress in interface PasswordContainer
public int getReadWritePasswordAddress()
throws OneWireException
getReadWritePasswordAddress in interface PasswordContainer
public int getWriteOnlyPasswordAddress()
throws OneWireException
getWriteOnlyPasswordAddress in interface PasswordContainerpublic boolean hasReadOnlyPassword()
hasReadOnlyPassword in interface PasswordContainertrue always, since DS1922 has Read-Only password.public boolean hasReadWritePassword()
hasReadWritePassword in interface PasswordContainertrue always, since DS1922 has Read/Write password.public boolean hasWriteOnlyPassword()
hasWriteOnlyPassword in interface PasswordContainerfalse always, since DS1922 has no Write-Only password.
public boolean getDeviceReadOnlyPasswordEnable()
throws OneWireException
getDeviceReadOnlyPasswordEnable in interface PasswordContainertrue if the device's Read-Only password has been enabled.
public boolean getDeviceReadWritePasswordEnable()
throws OneWireException
getDeviceReadWritePasswordEnable in interface PasswordContainertrue if the device's Read/Write password has been enabled.
public boolean getDeviceWriteOnlyPasswordEnable()
throws OneWireException
getDeviceWriteOnlyPasswordEnable in interface PasswordContainertrue if the device's Write-Only password has been enabled.public boolean hasSinglePasswordEnable()
hasSinglePasswordEnable in interface PasswordContainertrue if the device has the capability to enable one type
of password while leaving another type disabled.
public void setDevicePasswordEnable(boolean enableReadOnly,
boolean enableReadWrite,
boolean enableWriteOnly)
throws OneWireException,
OneWireIOException
Enables/Disables passwords for this Device. This method allows you to
individually enable the different types of passwords for a particular
device. If hasSinglePasswordEnable() returns true,
you can selectively enable particular types of passwords. Otherwise,
this method will throw an exception if all supported types are not
enabled.
For this to be successful, either write-protect passwords must be disabled, or the write-protect password(s) for this container must be set and must match the value of the write-protect password(s) in the device's register.
WARNING: Enabling passwords requires that both the read password and the read/write password be re-written to the part. Before calling this method, you should set the container read password and read/write password values. This will ensure that the correct value is written into the part.
setDevicePasswordEnable in interface PasswordContainerenableReadOnly - if true Read-Only passwords will be enabled.enableReadWrite - if true Read/Write passwords will be enabled.enableWriteOnly - if true Write-Only passwords will be enabled.
public void setDevicePasswordEnableAll(boolean enableAll)
throws OneWireException,
OneWireIOException
Enables/Disables passwords for this device. If the part has more than one
type of password (Read-Only, Write-Only, or Read/Write), all passwords
will be enabled. This function is equivalent to the following:
owc41.setDevicePasswordEnable(
owc41.hasReadOnlyPassword(),
owc41.hasReadWritePassword(),
owc41.hasWriteOnlyPassword() );
For this to be successful, either write-protect passwords must be disabled, or the write-protect password(s) for this container must be set and must match the value of the write-protect password(s) in the device's register.
WARNING: Enabling passwords requires that both the read password and the read/write password be re-written to the part. Before calling this method, you should set the container read password and read/write password values. This will ensure that the correct value is written into the part.
setDevicePasswordEnableAll in interface PasswordContainerenableAll - if true, all passwords are enabled. Otherwise,
all passwords are disabled.
public void setDeviceReadOnlyPassword(byte[] password,
int offset)
throws OneWireException,
OneWireIOException
Writes the given password to the device's Read-Only password register. Note that this function does not enable the password, just writes the value to the appropriate memory location.
For this to be successful, either write-protect passwords must be disabled, or the write-protect password(s) for this container must be set and must match the value of the write-protect password(s) in the device's register.
WARNING: Setting the read password requires that both the read password and the read/write password be written to the part. Before calling this method, you should set the container read/write password value. This will ensure that the correct value is written into the part.
setDeviceReadOnlyPassword in interface PasswordContainerpassword - the new password to be written to the device's Read-Only
password register. Length must be
(offset + getReadOnlyPasswordLength)offset - the starting point for copying from the given password array
public void setDeviceReadWritePassword(byte[] password,
int offset)
throws OneWireException,
OneWireIOException
Writes the given password to the device's Read/Write password register. Note that this function does not enable the password, just writes the value to the appropriate memory location.
For this to be successful, either write-protect passwords must be disabled, or the write-protect password(s) for this container must be set and must match the value of the write-protect password(s) in the device's register.
setDeviceReadWritePassword in interface PasswordContainerpassword - the new password to be written to the device's Read-Write
password register. Length must be
(offset + getReadWritePasswordLength)offset - the starting point for copying from the given password array
public void setDeviceWriteOnlyPassword(byte[] password,
int offset)
throws OneWireException,
OneWireIOException
Writes the given password to the device's Write-Only password register. Note that this function does not enable the password, just writes the value to the appropriate memory location.
For this to be successful, either write-protect passwords must be disabled, or the write-protect password(s) for this container must be set and must match the value of the write-protect password(s) in the device's register.
setDeviceWriteOnlyPassword in interface PasswordContainerpassword - the new password to be written to the device's Write-Only
password register. Length must be
(offset + getWriteOnlyPasswordLength)offset - the starting point for copying from the given password array
public void setContainerReadOnlyPassword(byte[] password,
int offset)
throws OneWireException
setContainerReadOnlyPassword in interface PasswordContainerpassword - the new password to be used by the API when
reading from the device's memory. Length must be
(offset + getReadOnlyPasswordLength)offset - the starting point for copying from the given password array
public void setContainerReadWritePassword(byte[] password,
int offset)
throws OneWireException
setContainerReadWritePassword in interface PasswordContainerpassword - the new password to be used by the API when
reading from or writing to the device's memory. Length must be
(offset + getReadWritePasswordLength)offset - the starting point for copying from the given password array
public void setContainerWriteOnlyPassword(byte[] password,
int offset)
throws OneWireException
setContainerWriteOnlyPassword in interface PasswordContainerpassword - the new password to be used by the API when
writing to the device's memory. Length must be
(offset + getWriteOnlyPasswordLength)offset - the starting point for copying from the given password array
public boolean isContainerReadOnlyPasswordSet()
throws OneWireException
isContainerReadOnlyPasswordSet in interface PasswordContainertrue if the password used by the API for
reading from the device's memory has been set.
public boolean isContainerReadWritePasswordSet()
throws OneWireException
isContainerReadWritePasswordSet in interface PasswordContainertrue if the password used by the API for
reading from or writing to the device's memory has been set.
public boolean isContainerWriteOnlyPasswordSet()
throws OneWireException
isContainerWriteOnlyPasswordSet in interface PasswordContainertrue if the password used by the API for
writing to the device's memory has been set.
public void getContainerReadOnlyPassword(byte[] password,
int offset)
throws OneWireException
setContainerReadOnlyPassword method.getContainerReadOnlyPassword in interface PasswordContainerpassword - array for holding the password that is used by the
API when reading from the device's memory. Length must be
(offset + getWriteOnlyPasswordLength)offset - the starting point for copying into the given password array
public void getContainerReadWritePassword(byte[] password,
int offset)
throws OneWireException
setContainerReadWritePassword method.getContainerReadWritePassword in interface PasswordContainerpassword - array for holding the password that is used by the
API when reading from or writing to the device's memory. Length must be
(offset + getReadWritePasswordLength)offset - the starting point for copying into the given password array
public void getContainerWriteOnlyPassword(byte[] password,
int offset)
throws OneWireException
setContainerWriteOnlyPassword method.getContainerWriteOnlyPassword in interface PasswordContainerpassword - array for holding the password that is used by the
API when writing to the device's memory. Length must be
(offset + getWriteOnlyPasswordLength)offset - the starting point for copying into the given password array
public String getMissionLabel(int channel)
throws OneWireException,
OneWireIOException
getMissionLabel in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public void setStartUponTemperatureAlarmEnable(boolean enable)
throws OneWireException,
OneWireIOException
enable - sets/clears the SUTA bit in the Mission Control register.
public void setStartUponTemperatureAlarmEnable(boolean enable,
byte[] state)
throws OneWireException,
OneWireIOException
readDevice().
After updating the 'state', the method writeDevice(byte[])
should be called to commit your changes.enable - sets/clears the SUTA bit in the Mission Control register.state - current state of the device returned from readDevice()
public boolean isStartUponTemperatureAlarmEnabled()
throws OneWireException,
OneWireIOException
true if the SUTA bit in the Mission Control register is set.
public boolean isStartUponTemperatureAlarmEnabled(byte[] state)
throws OneWireException,
OneWireIOException
readDevice().state - current state of the device returned from readDevice()true if the SUTA bit in the Mission Control register is set.
public boolean isMissionSUTA()
throws OneWireException,
OneWireIOException
true if the currently loaded mission
results indicate that this mission has the SUTA bit
enabled.
public boolean isMissionWFTA()
throws OneWireException,
OneWireIOException
true if the currently loaded mission
results indicate that this mission has the SUTA bit
enabled and is still Waiting For Temperature Alarm (WFTA).
public void startNewMission(int sampleRate,
int missionStartDelay,
boolean rolloverEnabled,
boolean syncClock,
boolean[] channelEnabled)
throws OneWireException,
OneWireIOException
startNewMission in interface MissionContainersampleRate - indicates the sampling rate, in seconds, that
this missioning device should log samples.missionStartDelay - indicates the amount of time, in seconds,
that should pass before the mission begins.rolloverEnabled - if false, this device will stop
recording new samples after the data log is full. Otherwise,
it will replace samples starting at the beginning.syncClock - if true, the real-time clock of this
missioning device will be synchronized with the current time
according to this java.util.Date.
public void loadMissionResults()
throws OneWireException,
OneWireIOException
loadMissionResults in interface MissionContainerpublic boolean isMissionLoaded()
isMissionLoaded in interface MissionContainertrue if the mission results have been loaded.public int getNumberMissionChannels()
getNumberOfMissionChannels() - 1)].getNumberMissionChannels in interface MissionContainer
public void setMissionChannelEnable(int channel,
boolean enable)
throws OneWireException,
OneWireIOException
setMissionChannelEnable in interface MissionContainerchannel - the channel to enable/disableenable - if true, the channel is enabled
public boolean getMissionChannelEnable(int channel)
throws OneWireException,
OneWireIOException
getMissionChannelEnable in interface MissionContainerchannel - the channel to enable/disableenable - if true, the channel is enabled
public int getMissionSampleRate(int channel)
throws OneWireException,
OneWireIOException
getMissionSampleRate in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public int getMissionSampleCount(int channel)
throws OneWireException,
OneWireIOException
getMissionSampleCount in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public int getDeviceSampleCount()
throws OneWireException,
OneWireIOException
public int getDeviceSampleCount(byte[] state)
throws OneWireException,
OneWireIOException
state - The current state of the device as return from readDevice()
public int getMissionSampleCountTotal(int channel)
throws OneWireException,
OneWireIOException
getMissionSampleCountTotal in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public double getMissionSample(int channel,
int sampleNum)
throws OneWireException,
OneWireIOException
getMissionSample in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)sampleNum - the sample number to return, between 0 and
(getMissionSampleCount(channel)-1)
public int getMissionSampleAsInteger(int channel,
int sampleNum)
throws OneWireException,
OneWireIOException
channel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)sampleNum - the sample number to return, between 0 and
(getMissionSampleCount(channel)-1)
public long getMissionSampleTimeStamp(int channel,
int sampleNum)
throws OneWireException,
OneWireIOException
getMissionSampleTimeStamp in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)sampleNum - the sample number to return, between 0 and
(getMissionSampleCount(channel)-1)
public boolean isMissionRunning()
throws OneWireException,
OneWireIOException
true if a mission is currently running.isMissionRunning in interface MissionContainertrue if a mission is currently running.
public boolean isMissionRolloverEnabled()
throws OneWireException,
OneWireIOException
true if a rollover is enabled.isMissionRolloverEnabled in interface MissionContainertrue if a rollover is enabled.
public boolean hasMissionRolloverOccurred()
throws OneWireException,
OneWireIOException
true if a mission has rolled over.hasMissionRolloverOccurred in interface MissionContainertrue if a mission has rolled over.
public void clearMissionResults()
throws OneWireException,
OneWireIOException
clearMissionResults in interface MissionContainer
public long getMissionTimeStamp(int channel)
throws OneWireException,
OneWireIOException
getMissionTimeStamp in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public long getFirstSampleOffset(int channel)
throws OneWireException,
OneWireIOException
getFirstSampleOffset in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public double[] getMissionResolutions(int channel)
throws OneWireException,
OneWireIOException
getMissionResolutions in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public double getMissionResolution(int channel)
throws OneWireException,
OneWireIOException
getMissionResolution in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public void setMissionResolution(int channel,
double resolution)
throws OneWireException,
OneWireIOException
setMissionResolution in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)resolution - the new resolution for the specified channel.public void setTemperatureCalibrationRegisterUsage(boolean use)
use - if true, all humidity values read from
device will be calibrated.public void setHumidityCalibrationRegisterUsage(boolean use)
use - if true, all humidity values read from
device will be calibrated.public void setTemperatureCompensationUsage(boolean use)
setDefaultTemperatureCompensationValue method.use - if true, all humidity values read from
device will be compensated for temperature.setDefaultTemperatureCompensationValue(double, boolean)
public void setDefaultTemperatureCompensationValue(double temperatureValue,
boolean override)
override parameter is true.temperatureValue - the default temperature value for temperature
compensation.override - if true, the default temperature value
will always be used (instead of the temperature log data).setDefaultTemperatureCompensationValue(double, boolean)public boolean hasMissionAlarms(int channel)
hasMissionAlarms in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)
public boolean hasMissionAlarmed(int channel,
int alarmType)
throws OneWireException,
OneWireIOException
hasMissionAlarmed in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)alarmType - valid value: ALARM_HIGH or
ALARM_LOW
public boolean getMissionAlarmEnable(int channel,
int alarmType)
throws OneWireException,
OneWireIOException
getMissionAlarmEnable in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)alarmType - valid value: ALARM_HIGH or
ALARM_LOW
public void setMissionAlarmEnable(int channel,
int alarmType,
boolean enable)
throws OneWireException,
OneWireIOException
setMissionAlarmEnable in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)alarmType - valid value: ALARM_HIGH or
ALARM_LOWenable - if true, alarm is enabled.
public double getMissionAlarm(int channel,
int alarmType)
throws OneWireException,
OneWireIOException
getMissionAlarm in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)alarmType - valid value: ALARM_HIGH or
ALARM_LOW
public void setMissionAlarm(int channel,
int alarmType,
double threshold)
throws OneWireException,
OneWireIOException
setMissionAlarm in interface MissionContainerchannel - the mission channel, between 0 and
(getNumberOfMissionChannels()-1)alarmType - valid value: ALARM_HIGH or
ALARM_LOWthreshold - the threshold value which will trigger the alarmpublic boolean hasTemperatureAlarms()
hasTemperatureAlarms in interface TemperatureContainertrue if this TemperatureContainer
has high/low trip alarmsgetTemperatureAlarm(int, byte[]),
setTemperatureAlarm(int, double, byte[])public boolean hasSelectableTemperatureResolution()
hasSelectableTemperatureResolution in interface TemperatureContainertrue if this TemperatureContainer
has selectable temperature resolutiongetTemperatureResolution(byte[]),
getTemperatureResolutions(),
setTemperatureResolution(double, byte[])public double[] getTemperatureResolutions()
getTemperatureResolutions in interface TemperatureContainerhasSelectableTemperatureResolution(),
getTemperatureResolution(byte[]),
setTemperatureResolution(double, byte[])public double getTemperatureAlarmResolution()
getTemperatureAlarmResolution in interface TemperatureContainerhasTemperatureAlarms(),
getTemperatureAlarm(int, byte[]),
setTemperatureAlarm(int, double, byte[])public double getMaxTemperature()
getMaxTemperature in interface TemperatureContainergetMinTemperature()public double getMinTemperature()
getMinTemperature in interface TemperatureContainergetMaxTemperature()
public void doTemperatureConvert(byte[] state)
throws OneWireIOException,
OneWireException
state
information to calculate the conversion time.doTemperatureConvert in interface TemperatureContainerstate - 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'.
In the case of the DS1922 Thermocron, this could also be due to a
currently running mission.OneWireException - on a communication or setup error with the 1-Wire
adapterpublic double getTemperature(byte[] state)
state
data retrieved from the readDevice() method.getTemperature in interface TemperatureContainerstate - byte array with device state informationdoTemperatureConvert()
public double getTemperatureAlarm(int alarmType,
byte[] state)
state data retrieved from the
readDevice() method.getTemperatureAlarm in interface TemperatureContaineralarmType - valid value: ALARM_HIGH or
ALARM_LOWstate - byte array with device state informationhasTemperatureAlarms(),
setTemperatureAlarm(int, double, byte[])public double getTemperatureResolution(byte[] state)
state data retrieved from the readDevice()
method.getTemperatureResolution in interface TemperatureContainerstate - byte array with device state informationhasSelectableTemperatureResolution(),
getTemperatureResolutions(),
setTemperatureResolution(double, byte[])
public void setTemperatureAlarm(int alarmType,
double alarmValue,
byte[] state)
state data.
Use the method writeDevice() with
this data to finalize the change to the device.setTemperatureAlarm in interface TemperatureContaineralarmType - valid value: ALARM_HIGH or
ALARM_LOWalarmValue - alarm trip value in Celsiusstate - byte array with device state informationhasTemperatureAlarms(),
getTemperatureAlarm(int, byte[])
public void setTemperatureResolution(double resolution,
byte[] state)
throws OneWireException
state data. Use the method writeDevice()
with this data to finalize the change to the device.setTemperatureResolution in interface TemperatureContainerresolution - temperature resolution in Celsiusstate - byte array with device state informationOneWireException - if the device does not support
selectable temperature resolutionhasSelectableTemperatureResolution(),
getTemperatureResolution(byte[]),
getTemperatureResolutions()public 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()public int getNumberADChannels()
getNumberADChannels() - 1)].getNumberADChannels in interface ADContainerpublic boolean hasADAlarms()
hasADAlarms in interface ADContainerpublic double[] getADRanges(int channel)
getADRanges in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]getNumberADChannels()
public double[] getADResolutions(int channel,
double range)
getADResolutions in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]range - A/D range setting from the getADRanges(int) methodchannel for this rangegetNumberADChannels(),
getADRanges(int)public boolean canADMultiChannelRead()
canADMultiChannelRead in interface ADContainerdoADConvert(boolean[],byte[])
public void doADConvert(int channel,
byte[] state)
throws OneWireIOException,
OneWireException
getADVoltage(int,byte[]) to read
the result of this conversion, using the same channel
argument as this method uses.doADConvert in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]state - current state of the device returned from readDevice()OneWireIOException - on a 1-Wire communication error such as
no 1-Wire device present. 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'.
This is usually a recoverable error.OneWireException - on a communication or setup error with the
1-Wire adapter. This is usually a non-recoverable error.OneWireSensor.readDevice(),
getADVoltage(int,byte[])
public void doADConvert(boolean[] doConvert,
byte[] state)
throws OneWireIOException,
OneWireException
getADVoltage(byte[]) can be used to read the result
of the conversion(s). This A/D must support multi-channel read,
reported by canADMultiChannelRead(), if more then 1 channel is specified.doADConvert in interface ADContainerdoConvert - array of size getNumberADChannels() representing
which channels should perform conversionsstate - current state of the device returned from readDevice()OneWireIOException - on a 1-Wire communication error such as
no 1-Wire device present. 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'.
This is usually a recoverable error.OneWireException - on a communication or setup error with the
1-Wire adapter. This is usually a non-recoverable error.OneWireSensor.readDevice(),
getADVoltage(byte[]),
canADMultiChannelRead()
public double[] getADVoltage(byte[] state)
throws OneWireIOException,
OneWireException
doADConvert(boolean[],byte[])
method call. This A/D device must support multi-channel reading, reported by
canADMultiChannelRead(), if more than 1 channel conversion was attempted
by doADConvert().getADVoltage in interface ADContainerstate - current state of the device returned from readDevice()OneWireIOException - on a 1-Wire communication error such as
no 1-Wire device present. 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'.
This is usually a recoverable error.OneWireException - on a communication or setup error with the
1-Wire adapter. This is usually a non-recoverable error.doADConvert(boolean[],byte[])
public double getADVoltage(int channel,
byte[] state)
throws OneWireIOException,
OneWireException
doADConvert(int,byte[])
method call. If more than one channel has been read it is more
efficient to use the getADVoltage(byte[]) method that
returns all channel voltage values.getADVoltage in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]state - current state of the device returned from readDevice()OneWireIOException - on a 1-Wire communication error such as
no 1-Wire device present. 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'.
This is usually a recoverable error.OneWireException - on a communication or setup error with the
1-Wire adapter. This is usually a non-recoverable error.doADConvert(int,byte[]),
getADVoltage(byte[])
public double getADAlarm(int channel,
int alarmType,
byte[] state)
throws OneWireException
hasADAlarms() method.getADAlarm in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]alarmType - the desired alarm, ALARM_HIGH or ALARM_LOWstate - current state of the device returned from readDevice()OneWireException - if this device does not have A/D alarmsOneWireSensor.readDevice(),
hasADAlarms()
public boolean getADAlarmEnable(int channel,
int alarmType,
byte[] state)
throws OneWireException
hasADAlarms() method.getADAlarmEnable in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]alarmType - the desired alarm, ALARM_HIGH or ALARM_LOWstate - current state of the device returned from readDevice()OneWireException - if this device does not have A/D alarmsOneWireSensor.readDevice(),
hasADAlarms()
public boolean hasADAlarmed(int channel,
int alarmType,
byte[] state)
throws OneWireException
hasADAlarms() method.hasADAlarmed in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]alarmType - the desired alarm, ALARM_HIGH or ALARM_LOWstate - current state of the device returned from readDevice()OneWireException - if this device does not have A/D alarmsOneWireSensor.readDevice(),
hasADAlarms(),
getADAlarmEnable(int,int,byte[]),
setADAlarmEnable(int,int,boolean,byte[])
public double getADResolution(int channel,
byte[] state)
getADResolution in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]state - current state of the device returned from readDevice()channel in voltsgetADResolutions(int,double),
setADResolution(int,double,byte[])
public double getADRange(int channel,
byte[] state)
getADRange in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]state - current state of the device returned from readDevice()getADRanges(int),
setADRange(int,double,byte[])
public void setADAlarm(int channel,
int alarmType,
double alarm,
byte[] state)
throws OneWireException
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all A/D devices have alarms. Check to see if this device has
alarms first by calling the hasADAlarms() method.setADAlarm in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]alarmType - the desired alarm, ALARM_HIGH or ALARM_LOWalarm - new alarm valuestate - current state of the device returned from readDevice()OneWireException - if this device does not have A/D alarmsOneWireSensor.writeDevice(byte[]),
hasADAlarms(),
getADAlarm(int,int,byte[]),
getADAlarmEnable(int,int,byte[]),
setADAlarmEnable(int,int,boolean,byte[]),
hasADAlarmed(int,int,byte[])
public void setADAlarmEnable(int channel,
int alarmType,
boolean alarmEnable,
byte[] state)
throws OneWireException
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all A/D devices have alarms. Check to see if this device has
alarms first by calling the hasADAlarms() method.setADAlarmEnable in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]alarmType - the desired alarm, ALARM_HIGH or ALARM_LOWalarmEnable - true to enable the alarm, false to disablestate - current state of the device returned from readDevice()OneWireException - if this device does not have A/D alarmsOneWireSensor.writeDevice(byte[]),
hasADAlarms(),
getADAlarm(int,int,byte[]),
setADAlarm(int,int,double,byte[]),
getADAlarmEnable(int,int,byte[]),
hasADAlarmed(int,int,byte[])
public void setADResolution(int channel,
double resolution,
byte[] state)
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all A/D devices have alarms. Check to see if this device has
alarms first by calling the hasADAlarms() method.setADResolution in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]resolution - one of the resolutions returned by getADResolutions(int,double)state - current state of the device returned from readDevice()getADResolutions(int,double),
getADResolution(int,byte[])
public void setADRange(int channel,
double range,
byte[] state)
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all A/D devices have alarms. Check to see if this device has
alarms first by calling the hasADAlarms() method.setADRange in interface ADContainerchannel - channel number in the range [0 to (getNumberADChannels() - 1)]range - one of the ranges returned by getADRanges(int)state - current state of the device returned from readDevice()getADRanges(int),
getADRange(int,byte[])public void setADReferenceVoltage(double referenceVoltage)
public double getADReferenceVoltage()
public void setADDeviceBitCount(int bits)
public int getADDeviceBitCount()
public void setForceADResults(boolean force)
public boolean getForceADResults()
public boolean hasClockAlarm()
hasClockAlarm in interface ClockContainergetClockAlarm(byte[]),
isClockAlarmEnabled(byte[]),
isClockAlarming(byte[]),
setClockAlarm(long,byte[]),
setClockAlarmEnable(boolean,byte[])public boolean canDisableClock()
canDisableClock in interface ClockContainerisClockRunning(byte[]),
setClockRunEnable(boolean,byte[])public long getClockResolution()
getClockResolution in interface ClockContainerpublic long getClock(byte[] state)
getClock in interface ClockContainerstate - current state of the device returned from readDevice()OneWireSensor.readDevice(),
setClock(long,byte[])
public long getClockAlarm(byte[] state)
throws OneWireException
getClockAlarm in interface ClockContainerstate - current state of the device returned from readDevice()OneWireSensor.readDevice(),
hasClockAlarm(),
isClockAlarmEnabled(byte[]),
isClockAlarming(byte[]),
setClockAlarm(long,byte[]),
setClockAlarmEnable(boolean,byte[])public boolean isClockAlarming(byte[] state)
isClockAlarming in interface ClockContainerstate - current state of the device returned from readDevice()OneWireSensor.readDevice(),
hasClockAlarm(),
isClockAlarmEnabled(byte[]),
getClockAlarm(byte[]),
setClockAlarm(long,byte[]),
setClockAlarmEnable(boolean,byte[])public boolean isClockAlarmEnabled(byte[] state)
isClockAlarmEnabled in interface ClockContainerstate - current state of the device returned from readDevice()OneWireSensor.readDevice(),
hasClockAlarm(),
isClockAlarming(byte[]),
getClockAlarm(byte[]),
setClockAlarm(long,byte[]),
setClockAlarmEnable(boolean,byte[])public boolean isClockRunning(byte[] state)
isClockRunning in interface ClockContainerstate - current state of the device returned from readDevice()OneWireSensor.readDevice(),
canDisableClock(),
setClockRunEnable(boolean,byte[])
public void setClock(long time,
byte[] state)
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice().setClock in interface ClockContainertime - new value for the Real-Time clock, in milliseconds
since January 1, 1970state - current state of the device returned from readDevice()OneWireSensor.writeDevice(byte[]),
getClock(byte[])
public void setClockAlarm(long time,
byte[] state)
throws OneWireException
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all clock devices have alarms. Check to see if this device has
alarms first by calling the hasClockAlarm() method.setClockAlarm in interface ClockContainertime - - new value for the Real-Time clock alarm, in milliseconds
since January 1, 1970state - current state of the device returned from readDevice()OneWireException - if this device does not have clock alarmsOneWireSensor.writeDevice(byte[]),
hasClockAlarm(),
isClockAlarmEnabled(byte[]),
getClockAlarm(byte[]),
isClockAlarming(byte[]),
setClockAlarmEnable(boolean,byte[])
public void setClockRunEnable(boolean runEnable,
byte[] state)
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all clock devices can disable their oscillators. Check to see if this device can
disable its oscillator first by calling the canDisableClock() method.setClockRunEnable in interface ClockContainerrunEnable - true to enable the clock oscillatorstate - current state of the device returned from readDevice()OneWireSensor.writeDevice(byte[]),
canDisableClock(),
isClockRunning(byte[])
public void setClockAlarmEnable(boolean alarmEnable,
byte[] state)
throws OneWireException
writeDevice() must be called to finalize
changes to the device. Note that multiple 'set' methods can
be called before one call to writeDevice(). Also note that
not all clock devices have alarms. Check to see if this device has
alarms first by calling the hasClockAlarm() method.setClockAlarmEnable in interface ClockContaineralarmEnable - true to enable the clock alarmstate - current state of the device returned from readDevice()OneWireSensor.writeDevice(byte[]),
hasClockAlarm(),
isClockAlarmEnabled(byte[]),
getClockAlarm(byte[]),
setClockAlarm(long,byte[]),
isClockAlarming(byte[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||