OWLIFT Library for Android: UsbOwliftDev Class Reference
OWLIFT Library for Android  1.8.0.0
Top Page
List of all members | Classes | Public Member Functions | Static Public Attributes
UsbOwliftDev Class Reference

Classes

class  Collection
 

Public Member Functions

String getDevicePath ()
 
int getVID ()
 
int getPID ()
 
UsbOwliftFunc.Collection getFuncs ()
 
int getUsbVersion ()
 
int getFrimwareVersion ()
 
int [] getSerialNumber ()
 
long getConfig ()
 
void setConfig (long cfg)
 
int commandGet (int moduleID, int cmdIDBase, int[] data, int ndata)
 
int commandSet (int moduleID, int cmdIDBase, int[] data, int ndata)
 
int commandRun (int moduleID, int cmdIDBase)
 
int getTempResolution ()
 
int getRefTempRegion ()
 

Static Public Attributes

static final int OWLIB_CONFIG_F_ALWAYS_ON = (1 << 0)
 

Detailed Description

USB device class.

Member Function Documentation

◆ commandGet()

int commandGet ( int  moduleID,
int  cmdIDBase,
int []  data,
int  ndata 
)

Executes the sensor's command as command type "GET", and reads registers as a result. See this document about sensor's commands.

Parameters
moduleIDThe Module ID.
cmdIDBaseThe Command ID Base.
dataThe array that receives registers' values. The array size must be greater than or equal to 'ndata'.
ndata[in] The number of the registers to read in WORDs. DATA 0 Register .. DATA 15 Register are readable. 'ndata' means the number of registers to read counting from DATA 0 Register. The byte order is host endian.
Returns
ErrorCode

◆ commandRun()

int commandRun ( int  moduleID,
int  cmdIDBase 
)

Executes the sensor's command as command type "RUN". See this document about sensor's commands.

Parameters
moduleIDThe Module ID.
cmdIDBaseThe Command ID Base.
Returns
ErrorCode

◆ commandSet()

int commandSet ( int  moduleID,
int  cmdIDBase,
int []  data,
int  ndata 
)

Writes the specified value to the register, and executes the sensor's command as command type "SET". See this document about sensor's commands.

Parameters
moduleIDThe Module ID.
cmdIDBaseThe Command ID Base.
dataThe array that stores registers' values. The array size must be greater than or equal to 'ndata'.
ndataThe number of the registers to write in WORDs. DATA 0 Register .. DATA 15 Register are writable. 'ndata' means the number of registers to write counting from DATA 0 Register. The byte order is host endian.
Returns
ErrorCode

◆ getConfig()

long getConfig ( )

Gets the device configuration.

Returns
The pointer that receives the device configuration. The value is constructed with following flags.

◆ getDevicePath()

String getDevicePath ( )

Returns device path on OS under /dev/bus/usb.

Returns
device path.

◆ getFrimwareVersion()

int getFrimwareVersion ( )

Gets the device firmware version number.

Returns
The corresponding value. If the version number is X.Y X is assigned to b15..8, Y is assigned to b7..b0.

◆ getFuncs()

UsbOwliftFunc.Collection getFuncs ( )

Returns a list of UsbOwliftFunc.

Returns
UsbOwliftFunc.Collection : list of UsbOwliftFunc.

◆ getPID()

int getPID ( )

Returns product ID of USB device.

Returns
product ID.

◆ getRefTempRegion()

int getRefTempRegion ( )

[Type-D] Returns the width of the reference temperature region.

Returns
The width of the reference temperature region

◆ getSerialNumber()

int [] getSerialNumber ( )

Gets the serial number of the sensor module.

Returns
Serial number.

◆ getTempResolution()

int getTempResolution ( )

Gets tempareture resolutions.

Returns
Temparature resolutions. 100 : 0.01 units 10 : 0.1 units

◆ getUsbVersion()

int getUsbVersion ( )

Returns bcdUSB(usb version) of device descriptor.

Returns
value of bcdUSB.

◆ getVID()

int getVID ( )

Returns vender ID of USB device.

Returns
vender ID.

◆ setConfig()

void setConfig ( long  cfg)

Sets the device configuration.

Returns
The device configuration value. See UsbOwliftDev#getConfig() about the value.

Member Data Documentation

◆ OWLIB_CONFIG_F_ALWAYS_ON

final int OWLIB_CONFIG_F_ALWAYS_ON = (1 << 0)
static

Device Configuration: Always turn on the sensor's power while not playing (default value).