|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
1-Wire Switch interface class for basic switch operations. This class should be implemented for each switch type 1-Wire device.
Method Summary | |
void |
clearActivity()
Clears the activity latches the next time possible. |
boolean |
getLatchState(int channel,
byte[] state)
This method checks the latch state of the indicated channel from the provided state data retrieved from the 'readDevice()' method. |
boolean |
getLevel(int channel,
byte[] state)
This method checks the sensed level on the indicated channel from the provided state data retrieved from the 'readDevice()' method. |
int |
getNumberChannels(byte[] state)
Query to get the number of channels supported by this switch. |
boolean |
getSensedActivity(int channel,
byte[] state)
This method checks if the indicated channel had activity from the provided state data retrieved from the 'readDevice()' method. |
boolean |
hasActivitySensing()
Query to see if the channels of this switch support activity sensing. |
boolean |
hasLevelSensing()
Query to see if the channels of this switch support level sensing. |
boolean |
hasSmartOn()
Query to see if the channels of this switch support smart on. |
boolean |
isHighSideSwitch()
Query to see if the channels of this switch are 'high side' switches. |
boolean |
onlySingleChannelOn()
Query to see if the channels of this switch require that only channel is on at any one time. |
void |
setLatchState(int channel,
boolean latchState,
boolean doSmart,
byte[] state)
This method sets the latch state of the indicated channel in the state data. |
Methods inherited from interface com.dalsemi.onewire.container.OneWireSensor |
readDevice, writeDevice |
Method Detail |
public boolean isHighSideSwitch()
public boolean hasActivitySensing()
public boolean hasLevelSensing()
public boolean hasSmartOn()
public boolean onlySingleChannelOn()
public int getNumberChannels(byte[] state)
state
- - byte array of device statepublic boolean getLevel(int channel, byte[] state) throws OneWireException
channel
- state
- - byte array of device stateboolean<\code> true if level sensed is 'high'
and false if level sensed is 'low'.
public boolean getLatchState(int channel, byte[] state)
channel
- state
- - byte array of device stateboolean<\code> true if channel latch is 'on'
or conducting and false if channel latch is 'off' and not
conducting. Note that the actual output then the latch is 'on'
is returned from the 'isHighSideSwitch()' method.
public boolean getSensedActivity(int channel, byte[] state) throws OneWireException
channel
- state
- - byte array of device stateboolean<\code> true if activity was detected
and false if no activity was detected.
public void setLatchState(int channel, boolean latchState, boolean doSmart, byte[] state)
channel
- - integer indicated channel to do operation on
in the range [0 to (getNumberChannels() - 1)]latchState
- doSmart
- - if latchState is 'on'/true then doSmart indicates
if a 'smart on' is to be done. To avoid an exception
check the cababilities of the device using the
'hasSmartOn()' method.state
- - byte array of device statepublic void clearActivity() throws OneWireException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |