2 * Copyright (c) 2010-2021 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;
17 * @author Tim Roberts - Initial contribution
19 public class AtlonaPro3Utilities {
21 * Helper method to create a channel id from a group with no port number attached
23 * @param group a group name
24 * @param channelId the channel id
25 * @return group + "#" + channelId
27 public static String createChannelID(String group, String channelId) {
28 return group + "#" + channelId;
32 * Helper method to create a channel id from a group, port number and channel id
34 * @param group the group name
35 * @param portNbr the port number
36 * @param channelId the channel id
37 * @return group + portNbr + "#" + channelId
39 public static String createChannelID(String group, int portNbr, String channelId) {
40 return group + portNbr + "#" + channelId;