Treehopper Java API
io.treehopper.interfaces.IOneWire Interface Reference

One-wire bus. More...

Inheritance diagram for io.treehopper.interfaces.IOneWire:
io.treehopper.HardwareUart

Public Member Functions

void startOneWire ()
 Start OneWire mode on this host. More...
 
void oneWireResetAndMatchAddress (long address)
 Reset all devices on the OneWire bus and send the supplied address. More...
 
List< Long > oneWireSearch ()
 Search all attached devices to discover addresses. More...
 
boolean oneWireReset ()
 Reset the OneWire bus to put all devices in a known state. More...
 
byte [] receive (int numBytes)
 receive data from the OneWire bus More...
 
void send (byte[] dataToSend)
 send an array of bytes to the OneWire bus More...
 
void send (byte data)
 send a single byte to the OneWire bus More...
 

Detailed Description

One-wire bus.

Member Function Documentation

◆ oneWireReset()

boolean io.treehopper.interfaces.IOneWire.oneWireReset ( )

Reset the OneWire bus to put all devices in a known state.

Returns
True if the reset was successful

Implemented in io.treehopper.HardwareUart.

◆ oneWireResetAndMatchAddress()

void io.treehopper.interfaces.IOneWire.oneWireResetAndMatchAddress ( long  address)

Reset all devices on the OneWire bus and send the supplied address.

Parameters
addressThe address to address

Implemented in io.treehopper.HardwareUart.

◆ oneWireSearch()

List<Long> io.treehopper.interfaces.IOneWire.oneWireSearch ( )

Search all attached devices to discover addresses.

Returns
a list of addresses of devices on the OneWire bus

Implemented in io.treehopper.HardwareUart.

◆ receive()

byte [] io.treehopper.interfaces.IOneWire.receive ( int  numBytes)

receive data from the OneWire bus

Parameters
numBytesThe number of bytes to receive
Returns
The bytes received

Implemented in io.treehopper.HardwareUart.

◆ send() [1/2]

void io.treehopper.interfaces.IOneWire.send ( byte []  dataToSend)

send an array of bytes to the OneWire bus

Parameters
dataToSendbyte array of the data to send

Implemented in io.treehopper.HardwareUart.

◆ send() [2/2]

void io.treehopper.interfaces.IOneWire.send ( byte  data)

send a single byte to the OneWire bus

Parameters
dataThe byte to send

Implemented in io.treehopper.HardwareUart.

◆ startOneWire()

void io.treehopper.interfaces.IOneWire.startOneWire ( )

Start OneWire mode on this host.

Implemented in io.treehopper.HardwareUart.


The documentation for this interface was generated from the following file: