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.atlona.internal.pro3;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
19 * @author Tim Roberts - Initial contribution
22 public class AtlonaPro3Utilities {
24 * Helper method to create a channel id from a group with no port number attached
26 * @param group a group name
27 * @param channelId the channel id
28 * @return group + "#" + channelId
30 public static String createChannelID(String group, String channelId) {
31 return group + "#" + channelId;
35 * Helper method to create a channel id from a group, port number and channel id
37 * @param group the group name
38 * @param portNbr the port number
39 * @param channelId the channel id
40 * @return group + portNbr + "#" + channelId
42 public static String createChannelID(String group, int portNbr, String channelId) {
43 return group + portNbr + "#" + channelId;