FileDocCategorySizeDatePackage
NeighboringCellInfo.javaAPI DocAndroid 1.5 API3073Wed May 06 22:42:00 BST 2009android.telephony

NeighboringCellInfo

public class NeighboringCellInfo extends Object implements android.os.Parcelable
Represents the neighboring cell information, including Received Signal Strength and Cell ID location.

Fields Summary
public static final int
UNKNOWN_RSSI
Signal strength is not available
public static final int
UNKNOWN_CID
Cell location is not available
private int
mRssi
private int
mCid
public static final Parcelable.Creator
CREATOR
Constructors Summary
public NeighboringCellInfo()
Empty constructor. Initializes the RSSI and CID.


                 
      
        mRssi = UNKNOWN_RSSI;
        mCid = UNKNOWN_CID;
    
public NeighboringCellInfo(int rssi, int cid)
Initialize the object from rssi and cid.

        mRssi = rssi;
        mCid = cid;
    
public NeighboringCellInfo(android.os.Parcel in)
Initialize the object from a parcel.

        mRssi = in.readInt();
        mCid = in.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public intgetCid()

return
cell id, UNKNOWN_CID if unknown, 0xffffffff max legal value

        return mCid;
    
public intgetRssi()

return
received signal strength in "asu", ranging from 0 - 31, or UNKNOWN_RSSI if unknown For GSM, dBm = -113 + 2*asu, 0 means "-113 dBm or less" and 31 means "-51 dBm or greater"

        return mRssi;
    
public voidsetCid(int cid)
Set the cell id.

        mCid = cid;
    
public voidsetRssi(int rssi)
Set the signal strength of the cell.

        mRssi = rssi;
    
public java.lang.StringtoString()

        return "["+ ((mCid == UNKNOWN_CID) ? "/" : Integer.toHexString(mCid)) 
        + " at " + ((mRssi == UNKNOWN_RSSI)? "/" : mRssi) + "]";
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeInt(mRssi);
        dest.writeInt(mCid);