Treehopper C# API
OneWire Interface Reference

Represents a OneWire-capable host. More...

Inheritance diagram for OneWire:
HardwareUart

Public Member Functions

Task StartOneWireAsync ()
 Start OneWire mode on this host More...
 
Task OneWireResetAndMatchAddressAsync (ulong address)
 Reset all devices on the OneWire bus and send the supplied address More...
 
Task< List< ulong > > OneWireSearchAsync ()
 Search all attached devices to discover addresses More...
 
Task< bool > OneWireResetAsync ()
 Reset the OneWire bus to put all devices in a known state. More...
 
Task< byte[]> ReceiveAsync (int numBytes)
 Receive data from the OneWire bus More...
 
Task SendAsync (byte[] dataToSend)
 Send an array of bytes to the OneWire bus More...
 
Task SendAsync (byte data)
 Send a single byte to the OneWire bus More...
 

Detailed Description

Represents a OneWire-capable host.

Member Function Documentation

◆ StartOneWireAsync()

Task StartOneWireAsync ( )

Start OneWire mode on this host

Implemented in HardwareUart.

◆ OneWireResetAndMatchAddressAsync()

Task OneWireResetAndMatchAddressAsync ( ulong  address)

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

Parameters
addressThe address to address
Returns
An awaitable Task that completes upon success.

Implemented in HardwareUart.

◆ OneWireSearchAsync()

Task<List<ulong> > OneWireSearchAsync ( )

Search all attached devices to discover addresses

Returns
A list of addresses of devices on the OneWire bus

Implemented in HardwareUart.

◆ OneWireResetAsync()

Task<bool> OneWireResetAsync ( )

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

Returns
True if the reset was successful

Implemented in HardwareUart.

◆ ReceiveAsync()

Task<byte[]> ReceiveAsync ( int  numBytes)

Receive data from the OneWire bus

Parameters
numBytesThe number of bytes to receive
Returns
The bytes received

Implemented in HardwareUart.

◆ SendAsync() [1/2]

Task SendAsync ( byte []  dataToSend)

Send an array of bytes to the OneWire bus

Parameters
dataToSendA byte array of the data to send
Returns
An awaitable task that completes when the send is finished.

Implemented in HardwareUart.

◆ SendAsync() [2/2]

Task SendAsync ( byte  data)

Send a single byte to the OneWire bus

Parameters
dataThe byte to send
Returns
An awaitable task that completes when the send is finished.

Implemented in HardwareUart.


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