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>userWriteResponse</b>.
21 * This command is used by the GATT server to acknowledge to the remote device that the
22 * attribute's value was written. This feature again allows the user application to
23 * acknowledged the attribute write operations instead of the Smart stack doing it
24 * automatically. Bluetooth The command should be used when an event is received where the
25 * reason why value has changed Value corresponds to
26 * attributes_attribute_change_reason_write_request_user. This response must be sent
27 * within 30 seconds or otherwise a timeout will occur.
29 * This class provides methods for processing BlueGiga API commands.
31 * Note that this code is autogenerated. Manual changes may be overwritten.
33 * @author Chris Jackson - Initial contribution of Java code generator
36 public class BlueGigaUserWriteResponseResponse extends BlueGigaResponse {
37 public static int COMMAND_CLASS = 0x02;
38 public static int COMMAND_METHOD = 0x04;
41 * Response constructor
43 public BlueGigaUserWriteResponseResponse(int[] inputBuffer) {
44 // Super creates deserializer and reads header fields
47 event = (inputBuffer[0] & 0x80) != 0;
49 // Deserialize the fields
53 public String toString() {
54 return "BlueGigaUserWriteResponseResponse []";