de.unikassel.android.sdcframework.data.independent
Class BluetoothSampleData

Package class diagram package BluetoothSampleData
java.lang.Object
  extended by de.unikassel.android.sdcframework.data.independent.AbstractSampleData
      extended by de.unikassel.android.sdcframework.data.independent.BluetoothSampleData
All Implemented Interfaces:
SampleData, SerializableData

public final class BluetoothSampleData
extends AbstractSampleData

The device specific sample data of a bluetooth sensor device are the received signal strength indicator, the friendly bluetooth name, the hardware adress and the bluetooth class.

See Also:
BluetoothDevice, BluetoothDeviceScanner

Field Summary
private  String address
          The bluetooth hardware address as string
private  String bluetoothClass
          The Android bluetooth class ( can be null if unknown ).
private  String name
          The friendly bluetooth name of the device ( can be null if unknown )
private  Short rssi
          The received signal strength indicator of the device ( usually a value in the range 0 to 255 ).
 
Constructor Summary
BluetoothSampleData()
          Constructor
BluetoothSampleData(BluetoothSampleData sampleData)
          Constructor
 
Method Summary
 SampleData doClone()
          Method to clone sample data
 boolean equals(Object o)
           
 String getAddress()
          Getter for the hardware address
 String getBluetoothClass()
          Getter for the bluetoothClass
 String getName()
          Getter for the friendly bluetooth name
 Short getRSSI()
          Getter for the received signal strength indicator ( RSSI )
 void setAddress(String address)
          Setter for the hardware address
 void setBluetoothClass(String bluetoothClass)
          Setter for the bluetooth class
 void setName(String name)
          Setter for the friendly bluetooth name
 void setRSSI(Short rssi)
          Setter for the received signal strength indicator ( RSSI )
 
Methods inherited from class de.unikassel.android.sdcframework.data.independent.AbstractSampleData
clone, getRelatedData, toXML, updateRelatedData
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rssi

private Short rssi
The received signal strength indicator of the device ( usually a value in the range 0 to 255 ). Here it's just the short extra information provided by the Android-Api.


name

private String name
The friendly bluetooth name of the device ( can be null if unknown )


address

private String address
The bluetooth hardware address as string


bluetoothClass

private String bluetoothClass
The Android bluetooth class ( can be null if unknown ). The class describes general characteristics and capabilities of a device.

Constructor Detail

BluetoothSampleData

public BluetoothSampleData()
Constructor


BluetoothSampleData

public BluetoothSampleData(BluetoothSampleData sampleData)
Constructor

Parameters:
sampleData - the sample data to copy construct from
Method Detail

doClone

public final SampleData doClone()
Description copied from interface: SampleData
Method to clone sample data

Returns:
a copy of the sample data

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

getRSSI

public final Short getRSSI()
Getter for the received signal strength indicator ( RSSI )

Returns:
the RSSI

setRSSI

public final void setRSSI(Short rssi)
Setter for the received signal strength indicator ( RSSI )

Parameters:
rssi - the RSSI to set

getName

public final String getName()
Getter for the friendly bluetooth name

Returns:
the name

setName

public final void setName(String name)
Setter for the friendly bluetooth name

Parameters:
name - the name to set

getAddress

public final String getAddress()
Getter for the hardware address

Returns:
the hardware address

setAddress

public final void setAddress(String address)
Setter for the hardware address

Parameters:
address - the hardware address to set

getBluetoothClass

public final String getBluetoothClass()
Getter for the bluetoothClass

Returns:
the bluetoothClass

setBluetoothClass

public final void setBluetoothClass(String bluetoothClass)
Setter for the bluetooth class

Parameters:
bluetoothClass - the bluetooth class to set