|
|||||||||
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.OneWireContainer05
DS2405 container class with part specific commands.
Constructor Summary | |
OneWireContainer05()
Default constructor |
|
OneWireContainer05(DSPortAdapter sourceAdapter,
byte[] newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer05(DSPortAdapter sourceAdapter,
long newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer05(DSPortAdapter sourceAdapter,
java.lang.String newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
Method Summary | |
void |
clearActivity()
Clears the activity latches the next time possible. |
java.lang.String |
getAlternateNames()
Retrieve the alternate Dallas Semiconductor part numbers or names. |
java.lang.String |
getDescription()
Retrieve a short description of the function of the iButton type. |
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. |
java.lang.String |
getName()
Retrieve the Dallas Semiconductor part number of the iButton as a string. |
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. |
byte[] |
readDevice()
This method retrieves the 1-Wire device sensor state. |
void |
setLatchState(int channel,
boolean latchState,
boolean doSmart,
byte[] state)
This method sets the latch state of the indicated channel in the state data. |
void |
writeDevice(byte[] state)
This method write the 1-Wire device sensor state that have been changed by the 'set' methods. |
Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getMaxSpeed, getMemoryBanks, isAlarming, isPresent, setSpeed, setupContainer, setupContainer, setupContainer |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OneWireContainer05()
public OneWireContainer05(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer05(DSPortAdapter sourceAdapter, long newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer05(DSPortAdapter sourceAdapter, java.lang.String newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire deviceMethod Detail |
public java.lang.String getName()
getName
in class OneWireContainer
public java.lang.String getAlternateNames()
getAlternateNames
in class OneWireContainer
String
representation of the alternate names.public java.lang.String getDescription()
getDescription
in class OneWireContainer
String
representation of the function description.public int getNumberChannels(byte[] state)
getNumberChannels
in interface SwitchContainer
state
- public boolean isHighSideSwitch()
isHighSideSwitch
in interface SwitchContainer
public boolean hasActivitySensing()
hasActivitySensing
in interface SwitchContainer
public boolean hasLevelSensing()
hasLevelSensing
in interface SwitchContainer
public boolean hasSmartOn()
hasSmartOn
in interface SwitchContainer
public boolean onlySingleChannelOn()
onlySingleChannelOn
in interface SwitchContainer
public boolean getLevel(int channel, byte[] state)
getLevel
in interface SwitchContainer
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)
getLatchState
in interface SwitchContainer
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
getSensedActivity
in interface SwitchContainer
channel
- state
- - byte array of device stateboolean<\code> true if activity was detected
and false if no activity was detected.
public void clearActivity() throws OneWireException
clearActivity
in interface SwitchContainer
public void setLatchState(int channel, boolean latchState, boolean doSmart, byte[] state)
setLatchState
in interface SwitchContainer
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 byte[] readDevice() throws OneWireIOException, OneWireException
readDevice
in interface OneWireSensor
byte[]<\code> 1-Wire device sensor state *- Throws:
OneWireIOException
- OneWireException
-
public void writeDevice(byte[] state) throws OneWireIOException, OneWireException
writeDevice
in interface OneWireSensor
state
- - byte array of clock register page contentsOneWireIOException
- OneWireException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |