2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.bluetooth.bluegiga.internal.command.attributeclient;
15 import java.util.UUID;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaDeviceResponse;
21 * Class to implement the BlueGiga command <b>findInformationFoundEvent</b>.
23 * This event is generated when characteristics type mappings are found. This happens
24 * typically after Find Information command has been issued to discover all attributes of a
27 * This class provides methods for processing BlueGiga API commands.
29 * Note that this code is autogenerated. Manual changes may be overwritten.
31 * @author Chris Jackson - Initial contribution of Java code generator
34 public class BlueGigaFindInformationFoundEvent extends BlueGigaDeviceResponse {
35 public static int COMMAND_CLASS = 0x04;
36 public static int COMMAND_METHOD = 0x04;
39 * Characteristics handle
41 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
43 private int chrHandle;
46 * Characteristics type (UUID)
48 * BlueGiga API type is <i>uuid</i> - Java type is {@link UUID}
55 public BlueGigaFindInformationFoundEvent(int[] inputBuffer) {
56 // Super creates deserializer and reads header fields
59 event = (inputBuffer[0] & 0x80) != 0;
61 // Deserialize the fields
62 connection = deserializeUInt8();
63 chrHandle = deserializeUInt16();
64 uuid = deserializeUuid();
68 * Characteristics handle
70 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
72 * @return the current chr_handle as {@link int}
74 public int getChrHandle() {
79 * Characteristics type (UUID)
81 * BlueGiga API type is <i>uuid</i> - Java type is {@link UUID}
83 * @return the current uuid as {@link UUID}
85 public UUID getUuid() {
90 public String toString() {
91 final StringBuilder builder = new StringBuilder();
92 builder.append("BlueGigaFindInformationFoundEvent [connection=");
93 builder.append(connection);
94 builder.append(", chrHandle=");
95 builder.append(chrHandle);
96 builder.append(", uuid=");
99 return builder.toString();