|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
1-Wire Switch interface class for basic potentiometer operations. This class should be implemented for each potentiometer type 1-Wire device. Currently there is only the DS2890, but it appears that plans have been made for more complex parts with more wipers, different possible number of wiper positions, etc.
| Method Summary | |
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()
Get 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. |
boolean |
isChargePumpOn(byte[] state)
Determines if the Potentiometer's charge pump is enabled. |
boolean |
isLinear(byte[] state)
Query to see if this Potentiometer One Wire Device has linear potentiometer element(s) or logarithmic potentiometer element(s). |
int |
numberOfPotentiometers(byte[] state)
Query to see how many potentiometers this Potentiometer One Wire Device has. |
int |
numberOfWiperSettings(byte[] state)
Query to find the number of wiper settings that any wiper on this Potentiometer One Wire Device can have. |
int |
potentiometerResistance(byte[] state)
Query to find the resistance value of the potentiometer. |
void |
setChargePump(boolean charge_pump_on,
byte[] state)
Set the Potentiometer's charge pump. |
void |
setCurrentWiperNumber(int wiper_number,
byte[] state)
Sets the currently selected wiper number. |
boolean |
setWiperPosition(int position)
Set the wiper position for the potentiometer. |
boolean |
wiperSettingsAreVolatile(byte[] state)
Query to see if this Potentiometer One Wire Device's wiper settings are volatile or non-volatile. |
| Methods inherited from interface com.dalsemi.onewire.container.OneWireSensor |
readDevice, writeDevice |
| Method Detail |
public boolean isLinear(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public boolean wiperSettingsAreVolatile(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public int numberOfPotentiometers(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public int numberOfWiperSettings(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public int potentiometerResistance(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public int getCurrentWiperNumber(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).
public void setCurrentWiperNumber(int wiper_number,
byte[] state)
wiper_number - Wiper number to select for communication.state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).public boolean isChargePumpOn(byte[] state)
state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).OneWireIOException - OneWireException -
public void setChargePump(boolean charge_pump_on,
byte[] state)
charge_pump_on - True if you want to enable the charge pump.state - State buffer of the Potentiometer One Wire Device (reaturned by readDevice()).OneWireIOException - OneWireException -
public int getWiperPosition()
throws OneWireIOException,
OneWireException
OneWireIOException - OneWireException -
public boolean setWiperPosition(int position)
throws OneWireIOException,
OneWireException
position - The position to set the wiper.OneWireIOException - OneWireException -
public int increment(boolean reselect)
throws OneWireIOException,
OneWireException
reselect - Increment/Decrement can be called without resetting
the part if the last call was an Increment/Decrement.
True if you want to select the part (you must call
with true after any other one-wire method)OneWireIOException - OneWireException -
public int decrement(boolean reselect)
throws OneWireIOException,
OneWireException
reselect - Increment/Decrement can be called without resetting
the part if the last call was an Increment/Decrement.
True if you want to select the part (you must call
with true after any other one-wire method)OneWireIOException - OneWireException -
public int increment()
throws OneWireIOException,
OneWireException
OneWireIOException - OneWireException -
public int decrement()
throws OneWireIOException,
OneWireException
OneWireIOException - OneWireException -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||