|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The DSPortAdapter class is the interface base class of all port adapter objects. An implementation class of this type is therefore independent of the adapter type.
| Method Summary | |
boolean |
adapterDetected()
Retrieve a list of the platform apropriate port names for this adapter. |
void |
addBusPowerStateListener(BusPowerStateListener listener)
The following method is used to notify interested applications of the change in Bus Power state. |
void |
addMicroLanActivityListener(MicroLanActivityListener listener)
The following method is used to notify interested applications of the change in Bus Power state. |
void |
beginExclusive()
Gets exclusive use of the bus to communicate with an iButton. |
boolean |
beginExclusiveNonBlocking()
Gets exclusive use of the bus to communicate with an iButton. |
boolean |
canDeliverPower()
Returns whether adapter can physically support strong 5 volt power mode. |
boolean |
canDeliverSmartPower()
Returns whether adapter can physically support "smart" strong 5 volt power mode. |
boolean |
canHyperdrive()
Returns whether adapter can physically support hyperdrive mode. |
boolean |
canOverdrive()
Returns whether adapter can physically support overdrive mode. |
boolean |
canProgram()
Returns whether adapter can physically support 12 volt power mode. |
char[] |
dataBlock(char[] dataBlock,
int off,
int len)
Sends a block of data and returns the data received in the same array. |
void |
endExclusive()
Relinquishes exclusive control of the MicroLan. |
void |
excludeFamily(int FamilyID)
Takes an integer to selectively avoid searching for this family. |
void |
excludeFamily(int[] FamilyID)
Takes an array of ints to selectively avoid finding iButtons several acceptable family codes. |
void |
freePort()
Free ownership of the selected port if it is currently owned. |
java.lang.String |
getAdapterID()
Retrieve the ID number of the adapter if it has one. |
java.lang.String |
getAdapterName()
Retrieve the name of the port adapter as a string. |
java.lang.String |
getAdapterVersion()
Retrieve the version of the adapter |
java.util.Enumeration |
getAlliButtons()
Returns an enumeration of iButtonContainer objects corresponding to all of the iButton found on the MicroLan. |
boolean |
getBit()
Gets a bit from the MicroLan. |
char[] |
getBlock(int len)
Get a block of data and return it in an array. |
char |
getByte()
Gets a byte from the MicroLan. |
java.lang.String |
getClassVersion()
Retrieve a version string for this class |
iButtonContainer |
getFirstiButton()
Returns an iButtonContainer object corresponding to the first iButton found on the MicroLan. |
iButtonContainer |
getNextiButton()
Returns an iButtonContainer object corresponding to the next iButton found. |
java.lang.String |
getPortName()
Retrieve the name of the selected port as a string. |
java.util.Enumeration |
getPortNames()
Retrieve a list of the platform apropriate port names for this adapter. |
java.lang.String |
getPortTypeDescription()
Retrieve a description of the port required by this port adapter. |
int |
getSpeed()
This method returns the current data transfer speed through a port to a MicroLan. |
boolean |
isAlarming(iButtonContainer ibutton)
Verifies that the iButton specified is present on the MicroLAN and in an alarm state. |
boolean |
isPresent(iButtonContainer ibutton)
Verifies that the iButton specified is present on the MicroLAN. |
iButtonContainer |
newContainer()
Constucts a blank iButtonContainer object attached to this port. |
boolean |
portOwned()
Query to see if the selected port is currently owned by this class |
void |
putBit(boolean bitValue)
Sends a bit to the MicroLan. |
void |
putByte(char byteValue)
Sends a byte to the MicroLan. |
void |
removeBusPowerStateListener(BusPowerStateListener listener)
The following method is used to remove notification of the Bus Power state changes. |
void |
removeMicroLanActivityListener(MicroLanActivityListener listener)
The following method is used to remove notification of MicroLan activity. |
int |
reset()
Sends a Reset to the MicroLan. |
boolean |
select(iButtonContainer ibutton)
Selects the specified iButton by broadcasting the serial number ID. |
boolean |
selectPort(java.lang.String portName)
Specify a platform apropriate port name for this adapter. |
void |
setBusPowerNormal()
Sets the MicroLan voltage to normal level. |
void |
setPowerDuration(int timeFactor)
Sets the MicroLan voltage to supply power duration. |
void |
setProgramPulseDuration(int timeFactor)
Sets the MicroLan voltage to supply power duration. |
void |
setSearchAlliButtons()
Set the Button search to find all iButtons whether they are in an 'Alarm' state or not. |
void |
setSearchOnlyAlarmingiButtons()
Set the Button search to find only iButtons that are in an 'Alarm' state that signals a need for attention. |
void |
setSpeed(int desiredSpeed)
This method takes an int representing the desired speed of data transfer on the MicroLan. |
void |
startBusBreak()
Sets the MicroLan voltage to 0 volts. |
boolean |
startPowerDelivery(int changeCondition)
Sets the MicroLan voltage to supply power to an iButton device. |
boolean |
startProgramPulse(int changeCondition)
Sets the MicroLan voltage to eprom programming level. |
void |
targetAllFamilies()
Removes any selectivity during a search for iButtons by family type. |
void |
targetFamily(int familyID)
Takes an integer to selectively search for this desired family type. |
void |
targetFamily(int[] familyID)
Takes an array of ints to selectively search for several acceptable family codes. |
| Method Detail |
public java.lang.String getAdapterName()
public java.lang.String getPortTypeDescription()
public java.lang.String getClassVersion()
public java.util.Enumeration getPortNames()
public boolean selectPort(java.lang.String portName)
throws PortInUseException
portName - name of the target port, retrieved from
getPortNames()
public java.lang.String getPortName()
throws PortNotSelectedException
public void freePort()
throws PortNotSelectedException
public boolean portOwned()
throws PortNotSelectedException
public boolean adapterDetected()
throws PortNotSelectedException,
PortInUseException
public java.lang.String getAdapterVersion()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
public java.lang.String getAdapterID()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
public boolean canOverdrive()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException
public boolean canHyperdrive()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException
public boolean canProgram()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException
public boolean canDeliverPower()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException
public boolean canDeliverSmartPower()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException
public java.util.Enumeration getAlliButtons()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
public iButtonContainer getFirstiButton()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
public iButtonContainer getNextiButton()
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
public boolean isPresent(iButtonContainer ibutton)
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
ibutton - iButton to verify is present
public boolean isAlarming(iButtonContainer ibutton)
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
ibutton - iButton to verify is present and alarming
public boolean select(iButtonContainer ibutton)
throws PortNotSelectedException,
PortInUseException,
AdapterNotDetectedException,
MicroLanIOException
ibutton - iButton to select
public void addMicroLanActivityListener(MicroLanActivityListener listener)
throws HardwareOptionNotAvailException
listener - the class that implements the 'MicroLanActivityListener'
interfacepublic void removeMicroLanActivityListener(MicroLanActivityListener listener)
The addMicroLanActivityListener() method must have been called previously.
listener - the class that implements the 'MicroLanActivityListener'
interfacepublic void setSearchOnlyAlarmingiButtons()
public void setSearchAlliButtons()
public void targetAllFamilies()
public void targetFamily(int familyID)
familyID - the code of the family type to target for searchespublic void targetFamily(int[] familyID)
familyID - array of family code of the family types to target
for searchespublic void excludeFamily(int FamilyID)
familyID - the code of the family type to NOT target in searchespublic void excludeFamily(int[] FamilyID)
familyID - array of family code of the family types to NOT target
for searches
public void beginExclusive()
throws PortInUseException
It can be called through the iButtonContainer class by the end application if they want to ensure exclusive use. If it is not called around several methods then it will be called inside each method.
public boolean beginExclusiveNonBlocking()
throws PortInUseException
public void endExclusive()
public void putBit(boolean bitValue)
throws MicroLanIOException
bitValue - the bit value to send to the MicroLan.
public boolean getBit()
throws MicroLanIOException
public void putByte(char byteValue)
throws MicroLanIOException
byteValue - the byte value to send to the MicroLan.
public char getByte()
throws MicroLanIOException
public char[] getBlock(int len)
throws MicroLanIOException
len - length of data bytes receive
public char[] dataBlock(char[] dataBlock,
int off,
int len)
throws MicroLanIOException
dataBlock - array of data (ints) to transfer to and from the
MicroLan. Only the least significant 8 bits of
each array element is used.off - offset into the array of data to startlen - length of data to send / receive starting at 'off'
public int reset()
throws MicroLanIOException
public void addBusPowerStateListener(BusPowerStateListener listener)
listener - the class that implements the 'BusPowerStateListener'
interface that wants to get these eventspublic void removeBusPowerStateListener(BusPowerStateListener listener)
The addBusPowerStateListener() method must have been called previously.
listener - the class that implements the 'BusPowerStateListener'
interface that wants to remove notification
public void setPowerDuration(int timeFactor)
throws HardwareOptionNotAvailException
Note: to avoid getting the HardwareOptionNotAvailException exception, use the canDeliverPower() and canDeliverSmartPower() method to check it's availability.
timeFactor -
public boolean startPowerDelivery(int changeCondition)
throws MicroLanIOException,
HardwareOptionNotAvailException
Note: to avoid getting the HardwareOptionNotAvailException exception, use the canDeliverPower() and canDeliverSmartPower() method to check it's availability.
changeCondition - public void setProgramPulseDuration(int timeFactor)
Note: to avoid getting the HardwareOptionNotAvailException exception, use the canDeliverPower() method to check it's availability.
timeFactor -
public boolean startProgramPulse(int changeCondition)
throws MicroLanIOException,
HardwareOptionNotAvailException
Note: to avoid getting the HardwareOptionNotAvailException exception, use the canProgram() method to check it's availability.
changeCondition -
public void startBusBreak()
throws MicroLanIOException,
HardwareOptionNotAvailException
public void setBusPowerNormal()
throws MicroLanIOException
public void setSpeed(int desiredSpeed)
throws HardwareOptionNotAvailException
desiredSpeed - public int getSpeed()
public iButtonContainer newContainer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||