1 /* 2 * Copyright (C) 2021 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 17 /* UwbTestRxResult is unused now*/ 18 /*package com.android.server.uwb.test; 19 20 import com.android.server.uwb.util.UwbUtil; 21 22 public class UwbTestRxResult { 23 public int mStatus; 24 public long mRxDoneTsInt; 25 public int mRxDoneTsFrac; 26 public float mAoaAzimuth; 27 public float mAoaElevation; 28 public int mToaGap; 29 public int mPhr; 30 public byte[] mPsduData; 31 public byte[] mVendorExtnData; 32 33 public UwbTestRxResult(int status, long rxDoneTsInt, int rxDoneTsFrac, 34 int aoaAzimuth, int aoaElevation, int toaGap, int phr, byte[] psduData, 35 byte[] vendorExtnData) { 36 37 this.mStatus = status; 38 this.mRxDoneTsInt = rxDoneTsInt; 39 this.mRxDoneTsFrac = rxDoneTsFrac; 40 this.mAoaAzimuth = 41 UwbUtil.convertQFormatToFloat(UwbUtil.twos_compliment(aoaAzimuth, 16), 9, 7); 42 this.mAoaElevation = 43 UwbUtil.convertQFormatToFloat(UwbUtil.twos_compliment(aoaElevation, 16), 9, 7); 44 this.mToaGap = toaGap; 45 this.mPhr = phr; 46 this.mPsduData = psduData; 47 48 *//* Vendor Specific Data *//* 49 this.mVendorExtnData = vendorExtnData; 50 51 } 52 53 public int getStatus() { 54 return mStatus; 55 } 56 57 public long getRxDoneTsInt() { 58 return mRxDoneTsInt; 59 } 60 61 public int getRxDoneTsFrac() { 62 return mRxDoneTsFrac; 63 } 64 65 public float getAoaAzimuth() { 66 return mAoaAzimuth; 67 } 68 69 public float getAoaElevation() { 70 return mAoaElevation; 71 } 72 73 public int getToaGap() { 74 return mToaGap; 75 } 76 77 public int getPhr() { 78 return mPhr; 79 } 80 81 public byte[] getPsduData() { 82 return mPsduData; 83 } 84 85 *//* Vendor Specific Data *//* 86 87 public byte[] getVendorExtnData() { 88 return mVendorExtnData; 89 } 90 91 @Override 92 public String toString() { 93 return " UwbTestRxResult { " 94 + " Status = " + mStatus 95 + ", RxDoneTsInt = " + mRxDoneTsInt 96 + ", RxDoneTsFrac = " + mRxDoneTsFrac 97 + ", AoaAzimuth = " + mAoaAzimuth 98 + ", AoaElevation = " + mAoaElevation 99 + ", ToaGap = " + mToaGap 100 + ", Phr = " + mPhr 101 + ", PsduData = " + UwbUtil.toHexString(mPsduData) 102 + ", VendorExtnData = " + UwbUtil.toHexString(mVendorExtnData) 103 + '}'; 104 } 105 }*/ 106