# LowpanDriverCallback

Summary: [Methods](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#inhmethods) \| [\[Expand All\]](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#)  

# LowpanDriverCallback


`
public


class
LowpanDriverCallback
`


`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


`

`


`

|---|------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | com.google.android.things.userdriver.lowpan.LowpanDriverCallback |

<br />

*** ** * ** ***

Callback interface for LowpanDriver.

An instance of this class is passed to the [LowpanDriver](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver) instance via [start(LowpanDriverCallback)](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver#start(com.google.android.things.userdriver.lowpan.LowpanDriverCallback)). It is used by the driver and not subclassed.

<br />

**See also:**

- [start(LowpanDriverCallback)](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver#start(com.google.android.things.userdriver.lowpan.LowpanDriverCallback))

## Summary

|                                                                                                                            ### Public methods                                                                                                                            ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onError](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#onError(int))`(int error) ` Called by @{link LowpanDriver} instance when an error has been detected.                                      |
| ` void` | ` `[onReceiveFrame](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#onReceiveFrame(byte[]))`(byte[] frame) ` Called by @{link LowpanDriver} instance whenever a Spinel frame is received from the NCP. |
| ` void` | ` `[onReset](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#onReset())`() ` Called by @{link LowpanDriver} instance when the driver has detected a NCP reset.                                         |
| ` void` | ` `[onStarted](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#onStarted())`() ` Called by @{link LowpanDriver} instance when the driver has opened and is ready to transport frames.                  |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback#)From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                                                                                                                                                                                                                                          | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                                                                                                                                                                                                                                               | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                                                                                                                                                                                                                                              | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                                                                                                                                                                                                                                   | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                                                                                                                                                                                                                                     | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                                                                                                                                                                                                                                                | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                                                                                                                                                                                                                                             | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                                                                                                                                                | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long, int))`(long millis, int nanos) ` Causes the current thread to wait until another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long millis) ` Causes the current thread to wait until either another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) method for this object, or a specified amount of time has elapsed.                                                                 | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until another thread invokes the [notify()](https://developer.android.com/reference/java/lang/Object.html#notify()) method or the [notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) method for this object.                                                                                                                                  | ||

## Public methods

### onError

```
void onError (int error)
```

Called by @{link LowpanDriver} instance when an error has been detected.

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `error` | `int` <br /> |

**See also:**

- [ERROR_TOOBIG](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver#ERROR_TOOBIG)
- [ERROR_IOFAIL](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver#ERROR_IOFAIL)
- [ERROR_GARBAGE](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver#ERROR_GARBAGE)  

### onReceiveFrame

```
void onReceiveFrame (byte[] frame)
```

Called by @{link LowpanDriver} instance whenever a Spinel frame is received from the NCP.

<br />

|                    Parameters                    ||
|---------|-----------------------------------------|
| `frame` | `byte`: Frame received from NCP. <br /> |

### onReset

```
void onReset ()
```

Called by @{link LowpanDriver} instance when the driver has detected a NCP reset.

<br />

### onStarted

```
void onStarted ()
```

Called by @{link LowpanDriver} instance when the driver has opened and is ready to transport
frames.

<br />

-

  ## Classes

  - [LowpanDriver](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriver)
  - [LowpanDriverCallback](https://developer.android.com/reference/com/google/android/things/userdriver/lowpan/LowpanDriverCallback)