public interface PotentiometerContainer extends OneWireSensor
The PotentiometerContainer methods can be organized into the following categories:
pc
':
byte[] state = pc.readDevice();
if (!(pc.isChargePumpOn()))
pc.setChargePump(true, state);
pc.writeDevice(state);
pc.setWiperPosition(127);
pc.increment();
pc.decrement();
OneWireContainer2C
,
OneWireSensor
,
ClockContainer
,
TemperatureContainer
,
SwitchContainer
Modifier and Type | Method and Description |
---|---|
int |
decrement()
Decrements the wiper position after selecting the part.
|
int |
decrement(boolean reselect)
Decrements the wiper position.
|
int |
getCurrentWiperNumber(byte[] state)
Gets the currently selected wiper number.
|
int |
getWiperPosition()
Gets the current wiper position of the Potentiometer.
|
int |
increment()
Increments the wiper position after selecting the part.
|
int |
increment(boolean reselect)
Increments the wiper position by one.
|
boolean |
isChargePumpOn(byte[] state)
Determines if the Potentiometer's charge pump is enabled.
|
boolean |
isLinear(byte[] state)
Querys to see if this Potentiometer 1-Wire Device
has linear potentiometer element(s) or logarithmic
potentiometer element(s).
|
int |
numberOfPotentiometers(byte[] state)
Querys to see how many potentiometers this
Potentiometer 1-Wire Device has.
|
int |
numberOfWiperSettings(byte[] state)
Querys to find the number of wiper settings
that any wiper on this Potentiometer 1-Wire
Device can have.
|
int |
potentiometerResistance(byte[] state)
Querys to find the resistance value of the potentiometer.
|
void |
setChargePump(boolean charge_pump_on,
byte[] state)
Sets the state of the Potentiometer's charge pump.
|
void |
setCurrentWiperNumber(int wiper_number,
byte[] state)
Sets the currently selected wiper number.
|
boolean |
setWiperPosition(int position)
Sets the wiper position of the potentiometer.
|
boolean |
wiperSettingsAreVolatile(byte[] state)
Querys to see if this Potentiometer 1-Wire Device's
wiper settings are volatile or non-volatile.
|
readDevice, writeDevice
boolean isLinear(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)true
if this device has linear potentiometer element(s),
false
if this device has logarithmic potentiometer element(s)boolean wiperSettingsAreVolatile(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)true
if the wiper settings are volatile,
false
if the wiper settings are non-volatile.int numberOfPotentiometers(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)int numberOfWiperSettings(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)int potentiometerResistance(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)int getCurrentWiperNumber(byte[] state)
numberOfPotentiometers()
.state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)void setCurrentWiperNumber(int wiper_number, byte[] state)
numberOfPotentiometers()
.wiper_number
- wiper number to select for communicationstate
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)boolean isChargePumpOn(byte[] state)
state
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)true
if enabled, false
if notvoid setChargePump(boolean charge_pump_on, byte[] state)
charge_pump_on
- true
to enable the charge pump, false
to disable charge pumpstate
- state buffer of the Potentiometer 1-Wire Device (returned by readDevice()
)int getWiperPosition() throws OneWireIOException, OneWireException
numberOfWiperPositions()
, and describes the voltage output.numberOfWiperPositions()
OneWireIOException
- Data was not read correctlyOneWireException
- Could not find deviceboolean setWiperPosition(int position) throws OneWireIOException, OneWireException
position
- position to set the wiper totrue
if the operation was successful, false
otherwiseOneWireIOException
- Data was not written correctlyOneWireException
- Could not find deviceint increment(boolean reselect) throws OneWireIOException, OneWireException
reselect
- increment()
can be called without resetting
the part if the last call was an increment()
or decrement()
.
true
if device is to be selected (must be called with true
after any other 1-wire method)numberOfWiperPositions()
)OneWireIOException
- Data was not written correctlyOneWireException
- Could not find deviceint decrement(boolean reselect) throws OneWireIOException, OneWireException
reselect
- decrement()
can be called without resetting
the part if the last call was an increment()
or decrement()
.
true
if device is to be selected (must be called with true
after any other 1-wire method)numberOfWiperPositions()
).OneWireIOException
- Data was not written correctlyOneWireException
- Could not find deviceint increment() throws OneWireIOException, OneWireException
numberOfWiperPositions()
)OneWireIOException
- Data was not written correctlyOneWireException
- Could not find deviceint decrement() throws OneWireIOException, OneWireException
numberOfWiperPositions()
)OneWireIOException
- Data was not written correctlyOneWireException
- Could not find deviceCopyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.