]> git.basschouten.com Git - openhab-addons.git/blob
c47b0ef7651b9eb396ff3ad6aabda432cb87cf51
[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;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Container class to hold {@link BlueGigaCommand} and transaction id.
19  *
20  * @author Pauli Anttila - Initial contribution
21  *
22  */
23 @NonNullByDefault
24 public class BlueGigaUniqueCommand {
25     private BlueGigaCommand msg;
26     private int transactionId;
27
28     BlueGigaUniqueCommand(BlueGigaCommand message, int transactionId) {
29         this.msg = message;
30         this.transactionId = transactionId;
31     }
32
33     int getTransactionId() {
34         return transactionId;
35     }
36
37     BlueGigaCommand getMessage() {
38         return msg;
39     }
40
41     @Override
42     public String toString() {
43         final StringBuilder builder = new StringBuilder();
44         builder.append("BlueGigaUniqueCommand [transactionId=");
45         builder.append(transactionId);
46         builder.append(", BlueGigaCommand=");
47         builder.append(msg);
48         builder.append(']');
49         return builder.toString();
50     }
51 }