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.attributedb;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
19 * Class to implement the BlueGiga command <b>userReadResponse</b>.
21 * This command is used to respond to an attribute Read request by a remote device, but only for
22 * attributes which have been configured with the user property. Attributes which have the
23 * user property enabled allow the attribute value to be requested from the application
24 * instead of the Smart stack automatically responding with Bluetooth the data in it's local
25 * GATT database. This command is normally used in response to a User Read Request event, which
26 * is generated when a remote device tries to read an attribute with a user property enabled. The
27 * response to User Read Request events must happen within 30 seconds or otherwise a timeout
30 * This class provides methods for processing BlueGiga API commands.
32 * Note that this code is autogenerated. Manual changes may be overwritten.
34 * @author Chris Jackson - Initial contribution of Java code generator
37 public class BlueGigaUserReadResponseResponse extends BlueGigaResponse {
38 public static int COMMAND_CLASS = 0x02;
39 public static int COMMAND_METHOD = 0x03;
42 * Response constructor
44 public BlueGigaUserReadResponseResponse(int[] inputBuffer) {
45 // Super creates deserializer and reads header fields
48 event = (inputBuffer[0] & 0x80) != 0;
50 // Deserialize the fields
54 public String toString() {
55 return "BlueGigaUserReadResponseResponse []";