]> git.basschouten.com Git - openhab-addons.git/blob
8a2d5b7478a1ef0910355a35a4d7157fb08b6ace
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.bluetooth.bluegiga.internal.command.attributedb;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaResponse;
17
18 /**
19  * Class to implement the BlueGiga command <b>userWriteResponse</b>.
20  * <p>
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.
28  * <p>
29  * This class provides methods for processing BlueGiga API commands.
30  * <p>
31  * Note that this code is autogenerated. Manual changes may be overwritten.
32  *
33  * @author Chris Jackson - Initial contribution of Java code generator
34  */
35 @NonNullByDefault
36 public class BlueGigaUserWriteResponseResponse extends BlueGigaResponse {
37     public static final int COMMAND_CLASS = 0x02;
38     public static final int COMMAND_METHOD = 0x04;
39
40     /**
41      * Response constructor
42      */
43     public BlueGigaUserWriteResponseResponse(int[] inputBuffer) {
44         // Super creates deserializer and reads header fields
45         super(inputBuffer);
46
47         event = (inputBuffer[0] & 0x80) != 0;
48
49         // Deserialize the fields
50     }
51
52     @Override
53     public String toString() {
54         return "BlueGigaUserWriteResponseResponse []";
55     }
56 }