UserDriverManager
public
class
UserDriverManager
extends Object
java.lang.Object | |
↳ | com.google.android.things.userdriver.UserDriverManager |
Manager for all Android Things user drivers. This class is used to register/unregister user-defined drivers.
Summary
Public methods | |
---|---|
static
UserDriverManager
|
getInstance()
Get a UserDriverManager object. |
void
|
registerGnssDriver(GnssDriver driver)
Register a GNSS driver with the user driver manager. |
void
|
registerInputDriver(InputDriver driver)
Register a input driver with the user driver manager. |
void
|
registerLowpanDriver(LowpanDriver driver)
Register a LoWPAN Driver and start the network interface. |
void
|
registerSensor(UserSensor sensor)
Register a user sensor with the user driver manager. |
void
|
unregisterGnssDriver()
Unregister the GNSS driver. |
void
|
unregisterInputDriver(InputDriver driver)
Unregister an input driver. |
void
|
unregisterLowpanDriver(LowpanDriver driver)
Unregister a LoWPAN Driver |
void
|
unregisterSensor(UserSensor sensor)
Unregister a sensor driver. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public methods
getInstance
UserDriverManager getInstance ()
Get a UserDriverManager object.
Returns | |
---|---|
UserDriverManager |
An instance of a UserDriverManager. If one doesn't exist, it will be created. |
registerGnssDriver
void registerGnssDriver (GnssDriver driver)
Register a GNSS driver with the user driver manager. There can only be one GNSS sensor per device. If the device has a built-in GNSS sensor, this method will fail.
Parameters | |
---|---|
driver |
GnssDriver : Driver to register.
|
registerInputDriver
void registerInputDriver (InputDriver driver)
Register a input driver with the user driver manager.
Parameters | |
---|---|
driver |
InputDriver : Driver to register.
|
registerLowpanDriver
void registerLowpanDriver (LowpanDriver driver)
Register a LoWPAN Driver and start the network interface.
Parameters | |
---|---|
driver |
LowpanDriver : Driver to register.
|
registerSensor
void registerSensor (UserSensor sensor)
Register a user sensor with the user driver manager.
Parameters | |
---|---|
sensor |
UserSensor : Sensor to register.
|
unregisterGnssDriver
void unregisterGnssDriver ()
Unregister the GNSS driver. Only user-defined GNSS drivers can be unregistered.
unregisterInputDriver
void unregisterInputDriver (InputDriver driver)
Unregister an input driver.
Parameters | |
---|---|
driver |
InputDriver : Driver to register.
|
unregisterLowpanDriver
void unregisterLowpanDriver (LowpanDriver driver)
Unregister a LoWPAN Driver
Parameters | |
---|---|
driver |
LowpanDriver : Driver to unregister.
|
unregisterSensor
void unregisterSensor (UserSensor sensor)
Unregister a sensor driver.
Parameters | |
---|---|
sensor |
UserSensor : Sensor to unregister.
|
Classes