]> git.basschouten.com Git - openhab-addons.git/blob
ad5e6e9802bf53a3e7aaf30847468bcb7ca5859a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.atlona.internal.pro3;
14
15 /**
16  *
17  * @author Tim Roberts - Initial contribution
18  */
19 public class AtlonaPro3Utilities {
20     /**
21      * Helper method to create a channel id from a group with no port number attached
22      *
23      * @param group a group name
24      * @param channelId the channel id
25      * @return group + "#" + channelId
26      */
27     public static String createChannelID(String group, String channelId) {
28         return group + "#" + channelId;
29     }
30
31     /**
32      * Helper method to create a channel id from a group, port number and channel id
33      *
34      * @param group the group name
35      * @param portNbr the port number
36      * @param channelId the channel id
37      * @return group + portNbr + "#" + channelId
38      */
39     public static String createChannelID(String group, int portNbr, String channelId) {
40         return group + portNbr + "#" + channelId;
41     }
42 }