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.system;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.bluetooth.bluegiga.internal.BlueGigaCommand;
19 * Class to implement the BlueGiga command <b>whitelistAppend</b>.
21 * Add an entry to the running white list. By the white list you can define for example the remote
22 * devices which are allowed to establish a connection. See also Set Filtering Connect
23 * Selective and (if the white list is empty they will not be active). Do not use this command
24 * while advertising, scanning, or while being connected. The current list is discarded upon
25 * reset or power-cycle.
27 * This class provides methods for processing BlueGiga API commands.
29 * Note that this code is autogenerated. Manual changes may be overwritten.
31 * @author Chris Jackson - Initial contribution of Java code generator
34 public class BlueGigaWhitelistAppendCommand extends BlueGigaCommand {
35 public static int COMMAND_CLASS = 0x00;
36 public static int COMMAND_METHOD = 0x0A;
39 * Bluetooth device address to add to the running white list. Maximum of 8 can be stored before
40 * you must clear or remove entries.
42 * BlueGiga API type is <i>bd_addr</i> - Java type is {@link String}
44 private String address = "";
47 * Bluetooth device address to add to the running white list. Maximum of 8 can be stored before
48 * you must clear or remove entries.
50 * @param address the address to set as {@link String}
52 public void setAddress(String address) {
53 this.address = address;
57 public int[] serialize() {
58 // Serialize the header
59 serializeHeader(COMMAND_CLASS, COMMAND_METHOD);
61 // Serialize the fields
62 serializeAddress(address);
68 public String toString() {
69 final StringBuilder builder = new StringBuilder();
70 builder.append("BlueGigaWhitelistAppendCommand [address=");
71 builder.append(address);
73 return builder.toString();