1/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.net.wifi;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21
22/**
23 * Bundle of RSSI and packet count information, for WiFi watchdog
24 *
25 * @see WifiWatchdogStateMachine
26 *
27 * @hide
28 */
29public class RssiPacketCountInfo implements Parcelable {
30
31    public int rssi;
32
33    public int txgood;
34
35    public int txbad;
36
37    public int rxgood;
38
39    public RssiPacketCountInfo() {
40        rssi = txgood = txbad = rxgood = 0;
41    }
42
43    private RssiPacketCountInfo(Parcel in) {
44        rssi = in.readInt();
45        txgood = in.readInt();
46        txbad = in.readInt();
47        rxgood = in.readInt();
48    }
49
50    @Override
51    public void writeToParcel(Parcel out, int flags) {
52        out.writeInt(rssi);
53        out.writeInt(txgood);
54        out.writeInt(txbad);
55        out.writeInt(rxgood);
56    }
57
58    @Override
59    public int describeContents() {
60        return 0;
61    }
62
63    public static final Parcelable.Creator<RssiPacketCountInfo> CREATOR =
64            new Parcelable.Creator<RssiPacketCountInfo>() {
65        @Override
66        public RssiPacketCountInfo createFromParcel(Parcel in) {
67            return new RssiPacketCountInfo(in);
68        }
69
70        @Override
71        public RssiPacketCountInfo[] newArray(int size) {
72            return new RssiPacketCountInfo[size];
73        }
74    };
75}
76