2 * Copyright (c) 2010-2024 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.denonmarantz.internal.xml.entities.commands;
15 import javax.xml.bind.annotation.XmlAccessType;
16 import javax.xml.bind.annotation.XmlAccessorType;
17 import javax.xml.bind.annotation.XmlAttribute;
18 import javax.xml.bind.annotation.XmlRootElement;
19 import javax.xml.bind.annotation.XmlValue;
22 * Individual commands that can be sent to a Denon/Marantz receiver to request specific information.
24 * @author Jeroen Idserda - Initial contribution
26 @XmlRootElement(name = "cmd")
27 @XmlAccessorType(XmlAccessType.FIELD)
28 public class CommandTx {
30 private static final String DEFAULT_ID = "1";
32 public static final CommandTx CMD_ALL_POWER = of("GetAllZonePowerStatus");
34 public static final CommandTx CMD_VOLUME_LEVEL = of("GetVolumeLevel");
36 public static final CommandTx CMD_MUTE_STATUS = of("GetMuteStatus");
38 public static final CommandTx CMD_SOURCE_STATUS = of("GetSourceStatus");
40 public static final CommandTx CMD_SURROUND_STATUS = of("GetSurroundModeStatus");
42 public static final CommandTx CMD_ZONE_NAME = of("GetZoneName");
44 public static final CommandTx CMD_NET_STATUS = of("GetNetAudioStatus");
46 public static final CommandTx CMD_RENAME_SOURCE = of("GetRenameSource");
48 public static final CommandTx CMD_DELETED_SOURCE = of("GetDeletedSource");
50 @XmlAttribute(name = "id")
59 public CommandTx(String value) {
63 public String getId() {
67 public void setId(String id) {
71 public static CommandTx of(String command) {
72 CommandTx cmdTx = new CommandTx(command);
73 cmdTx.setId(DEFAULT_ID);