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>groupFoundEvent</b>.
23 * This event is produced when an attribute group (a service) is found. Typically this event is
24 * produced after Read by Group Type command.
26 * This class provides methods for processing BlueGiga API commands.
28 * Note that this code is autogenerated. Manual changes may be overwritten.
30 * @author Chris Jackson - Initial contribution of Java code generator
33 public class BlueGigaGroupFoundEvent extends BlueGigaDeviceResponse {
34 public static int COMMAND_CLASS = 0x04;
35 public static int COMMAND_METHOD = 0x02;
40 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
47 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
52 * UUID of a service. Length is 0 if no services are found.
54 * BlueGiga API type is <i>uuid</i> - Java type is {@link UUID}
61 public BlueGigaGroupFoundEvent(int[] inputBuffer) {
62 // Super creates deserializer and reads header fields
65 event = (inputBuffer[0] & 0x80) != 0;
67 // Deserialize the fields
68 connection = deserializeUInt8();
69 start = deserializeUInt16();
70 end = deserializeUInt16();
71 uuid = deserializeUuid();
77 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
79 * @return the current start as {@link int}
81 public int getStart() {
88 * BlueGiga API type is <i>uint16</i> - Java type is {@link int}
90 * @return the current end as {@link int}
97 * UUID of a service. Length is 0 if no services are found.
99 * BlueGiga API type is <i>uuid</i> - Java type is {@link UUID}
101 * @return the current uuid as {@link UUID}
103 public UUID getUuid() {
108 public String toString() {
109 final StringBuilder builder = new StringBuilder();
110 builder.append("BlueGigaGroupFoundEvent [connection=");
111 builder.append(connection);
112 builder.append(", start=");
113 builder.append(start);
114 builder.append(", end=");
116 builder.append(", uuid=");
117 builder.append(uuid);
119 return builder.toString();