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 RssiPacketCountInfo() {
38        rssi = txgood = txbad = 0;
39    }
40
41    private RssiPacketCountInfo(Parcel in) {
42        rssi = in.readInt();
43        txgood = in.readInt();
44        txbad = in.readInt();
45    }
46
47    @Override
48    public void writeToParcel(Parcel out, int flags) {
49        out.writeInt(rssi);
50        out.writeInt(txgood);
51        out.writeInt(txbad);
52    }
53
54    @Override
55    public int describeContents() {
56        return 0;
57    }
58
59    public static final Parcelable.Creator<RssiPacketCountInfo> CREATOR =
60            new Parcelable.Creator<RssiPacketCountInfo>() {
61        @Override
62        public RssiPacketCountInfo createFromParcel(Parcel in) {
63            return new RssiPacketCountInfo(in);
64        }
65
66        @Override
67        public RssiPacketCountInfo[] newArray(int size) {
68            return new RssiPacketCountInfo[size];
69        }
70    };
71}
72