FileDocCategorySizeDatePackage
BluetoothActivityEnergyInfo.javaAPI DocAndroid 5.1 API4442Thu Mar 12 22:22:10 GMT 2015android.bluetooth

BluetoothActivityEnergyInfo

public final class BluetoothActivityEnergyInfo extends Object implements android.os.Parcelable
Record of energy and activity information from controller and underlying bt stack state.Timestamp the record with system time
hide

Fields Summary
private final int
mBluetoothStackState
private final int
mControllerTxTimeMs
private final int
mControllerRxTimeMs
private final int
mControllerIdleTimeMs
private final int
mControllerEnergyUsed
private final long
timestamp
public static final int
BT_STACK_STATE_INVALID
public static final int
BT_STACK_STATE_STATE_ACTIVE
public static final int
BT_STACK_STATE_STATE_SCANNING
public static final int
BT_STACK_STATE_STATE_IDLE
public static final Parcelable.Creator
CREATOR
Constructors Summary
public BluetoothActivityEnergyInfo(int stackState, int txTime, int rxTime, int idleTime, int energyUsed)


          
                
        mBluetoothStackState = stackState;
        mControllerTxTimeMs = txTime;
        mControllerRxTimeMs = rxTime;
        mControllerIdleTimeMs = idleTime;
        mControllerEnergyUsed = energyUsed;
        timestamp = System.currentTimeMillis();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public intgetBluetoothStackState()

return
bt stack reported state

        return mBluetoothStackState;
    
public intgetControllerEnergyUsed()
product of current(mA), voltage(V) and time(ms)

return
energy used

        return mControllerEnergyUsed;
    
public intgetControllerIdleTimeMillis()

return
idle time in ms

        return mControllerIdleTimeMs;
    
public intgetControllerRxTimeMillis()

return
rx time in ms

        return mControllerRxTimeMs;
    
public intgetControllerTxTimeMillis()

return
tx time in ms

        return mControllerTxTimeMs;
    
public longgetTimeStamp()

return
timestamp(wall clock) of record creation

        return timestamp;
    
public booleanisValid()

return
if the record is valid

        return ((getControllerTxTimeMillis() !=0) ||
                (getControllerRxTimeMillis() !=0) ||
                (getControllerIdleTimeMillis() !=0));
    
public java.lang.StringtoString()

        return "BluetoothActivityEnergyInfo{"
            + " timestamp=" + timestamp
            + " mBluetoothStackState=" + mBluetoothStackState
            + " mControllerTxTimeMs=" + mControllerTxTimeMs
            + " mControllerRxTimeMs=" + mControllerRxTimeMs
            + " mControllerIdleTimeMs=" + mControllerIdleTimeMs
            + " mControllerEnergyUsed=" + mControllerEnergyUsed
            + " }";
    
public voidwriteToParcel(android.os.Parcel out, int flags)


          
        out.writeInt(mBluetoothStackState);
        out.writeInt(mControllerTxTimeMs);
        out.writeInt(mControllerRxTimeMs);
        out.writeInt(mControllerIdleTimeMs);
        out.writeInt(mControllerEnergyUsed);