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 package com.android.server.uwb.data; 17 18 import java.util.Arrays; 19 20 public class UwbTlvData { 21 public final int status; 22 public final int length; 23 public final byte[] tlvs; 24 UwbTlvData(int status, int length, byte[] tlvs)25 public UwbTlvData(int status, int length, byte[] tlvs) { 26 this.status = status; 27 this.length = length; 28 this.tlvs = tlvs; 29 } 30 getStatus()31 public int getStatus() { 32 return status; 33 } 34 getLength()35 public int getLength() { 36 return length; 37 } 38 getTlv()39 public byte[] getTlv() { 40 return tlvs; 41 } 42 43 @Override toString()44 public String toString() { 45 return "UwbTlvData { " 46 + " status = " + status 47 + " length = " + length 48 + ", tlvs = [" + Arrays.toString(tlvs) 49 + "] }"; 50 } 51 } 52