|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface Port adapter class for com.iButton package.
History:
| Method Summary | |
boolean |
Adapter5VActivate(int interval)
Activate the strong-5volts operation now. |
boolean |
Adapter5VCancel()
Cancel the current strong-5volts operation. |
boolean |
Adapter5VPrime()
Prime the strong-5volts operation to occur after the next iBDataBit. |
boolean |
Adapter5VPrimeByte()
Prime the strong-5volts operation to occur after the next iBDataBit. |
boolean |
iBAccess()
Initialize communications with the currently selected iButton. |
boolean |
iBDataBit(int databit)
Read/Write a single bit of data from/to the currently selected iButton. |
boolean |
iBDataBlock(int[] input,
int start,
int length)
Read/Write a block of data from/to the currently selected iButton. |
int |
iBDataByte(int databyte)
Read/Write a single byte of data from/to the currently selected iButton. |
boolean |
iBDOWCheck()
Loads the hardware specific drivers needed to perform One-Wire communications. |
java.lang.String |
iBFailReason()
Returns the reason for the previous fail. |
boolean |
iBFastAccess()
Resets and initializes communications with the currently selected iButton without verifying that it is still connected to the One-Wire bus. |
boolean |
iBFirst()
Find the first iButton on the One-Wire bus. |
boolean |
iBGndTest()
Test to see if the One-Wire bus is grounded. |
boolean |
iBKeyClose()
Closes a One-Wire communications session on the currently selected port. |
boolean |
iBKeyOpen()
Opens a One-Wire communications session on the currently selected port. |
boolean |
iBNext()
Find the next iButton on the One-Wire bus in the current enumeration. |
boolean |
iBOverdriveOff()
Shifts the One-Wire bus to normal speed. |
boolean |
iBOverdriveOn()
Shifts the One-Wire bus to Overdrive speed. |
boolean |
iBReset()
Resets communications for all devices on the One-Wire bus. |
int[] |
iBROMData()
Retrieve the ROM Id of the currently selected iButton. |
boolean |
iBROMData(int[] romId)
Sets the internal ROM Id buffer to the given array. |
boolean |
iBSetup(int portNumber)
Select the port that hosts the One-Wire adapter by specifying the port number. |
boolean |
iBStream(int[] data,
int len)
This method does following operations: Access the current button using fast access. |
boolean |
iBStrongAccess()
Verifies that the currently selected iButton is still on the One-Wire bus and resets it. |
java.lang.String |
iBVersion()
Returns the version of the iButton library. |
boolean |
releasePort()
Release the port handle in javax.comm. |
boolean |
SetAdapter5VTime(int interval)
Set the strong-5volts interval time. |
boolean |
setAdapterSpeed(int baud)
Attempt to set the data transfer rate of the currently selected port. |
boolean |
SetAdapterSpeed(int baud)
Deprecated. replaced by setAdapterSpeed(int baud). |
void |
setAdapterSpeedOptimum()
Attempt to set the data transfer rate of the currently selected port to its operating system's optimum baud rate. |
boolean |
SetAdapterType(int type,
java.lang.String ad)
Sets the adapter type using the type (PORT_TYPE_PARALLEL, PORT_TYPE_SERIAL,...) and a device name ("com1", "/dev/ttya",...). |
void |
setPortDeviceName(int typeCode,
java.lang.String portDevice)
Set the port device name as a string. |
| Method Detail |
public boolean iBSetup(int portNumber)
portNumber - Port number that the One-Wire adapter
is on.public boolean iBGndTest()
public boolean iBDOWCheck()
public boolean iBKeyOpen()
public boolean iBKeyClose()
public boolean iBFirst()
public boolean iBNext()
public boolean iBAccess()
public boolean iBFastAccess()
public boolean iBStrongAccess()
public int[] iBROMData()
public boolean iBROMData(int[] romId)
romId - the id to be set.public boolean iBReset()
public int iBDataByte(int databyte)
databyte - Data to be written for write operations. Must be set
to 0xFF for Read operations. Lower 8 bits of integer
provided used.public boolean iBDataBit(int databit)
databit - Data to be written for write operations. Must be set
to 1 for Read operations.
public boolean iBDataBlock(int[] input,
int start,
int length)
input - Data buffer to be written for write operations.
All elements must be set to 0xFF for Read
operations.start - Offset of data in input.length - Length of data to transfer.public boolean iBOverdriveOn()
public boolean iBOverdriveOff()
public boolean SetAdapter5VTime(int interval)
interval - strong 5 volt interval in microsecondspublic boolean Adapter5VPrime()
public boolean Adapter5VPrimeByte()
public boolean Adapter5VCancel()
public boolean Adapter5VActivate(int interval)
interval - strong 5 volt interval in microseconds
public boolean iBStream(int[] data,
int len)
data - Data buffer to be written for write operations.
All elements must be set to 0xFF for Read
operations.len - length of data buffer (0.21)public java.lang.String iBVersion()
public java.lang.String iBFailReason()
public boolean setAdapterSpeed(int baud)
baud - Speed desired in bits per second
(values depend on adapter type).public void setAdapterSpeedOptimum()
public boolean SetAdapterSpeed(int baud)
setAdapterSpeed(int baud).baud - Speed desired in bits per second
(values depend on adapter type).
public void setPortDeviceName(int typeCode,
java.lang.String portDevice)
typeCode - Device port type code. (not always used) (0.23)portDevice - Device name for the port being accessed.
(0.21)public boolean releasePort()
public boolean SetAdapterType(int type,
java.lang.String ad)
type - Type of port being accessed.ad - Device name for the port being accessed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||