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.yamahareceiver.internal.protocol;
16 * Performs conversion logic between canonical input names and underlying Yamaha protocol.
18 * For example, AVRs when setting input 'AUDIO_X' (or HDMI_X) need the input to be sent in this form.
19 * However, what comes back in the status update from the AVR is 'AUDIOX' (and 'HDMIX') respectively.
21 * @author Tomasz Maruszak - Initial contribution
23 public interface InputConverter {
26 * Converts the canonical input name to name used by the protocol
28 * @param name canonical name
29 * @return command name
31 String toCommandName(String name);
34 * Converts the state name used by the protocol to canonical input name
36 * @param name state name
37 * @return canonical name
39 String fromStateName(String name);