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.pjlinkdevice.internal.device.command.identification;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.pjlinkdevice.internal.device.PJLinkDevice;
17 import org.openhab.binding.pjlinkdevice.internal.device.command.AbstractCommand;
18 import org.openhab.binding.pjlinkdevice.internal.device.command.ResponseException;
21 * This command is used for retrieving device information as described in
22 * <a href="https://pjlink.jbmia.or.jp/english/data_cl2/PJLink_5-1.pdf">[PJLinkSpec]</a> chapters:
23 * 4.8. Lamp number/ lighting hour query
24 * 4.10. Projector/Display name query
25 * 4.11. Manufacture name information query
26 * 4.12. Product name information query
27 * 4.13. Other information query
28 * 4.14. Class information query
30 * @author Nils Schnabel - Initial contribution
33 public class IdentificationCommand extends AbstractCommand<IdentificationRequest, IdentificationResponse> {
35 public enum IdentificationProperty {
40 OTHER_INFORMATION("INFO"),
43 private String prefix;
45 private IdentificationProperty(String prefix) {
49 public String getPJLinkCommandPrefix() {
54 private IdentificationProperty identificationProperty;
56 public IdentificationCommand(PJLinkDevice pjLinkDevice, IdentificationProperty identificationProperty) {
58 this.identificationProperty = identificationProperty;
61 public IdentificationProperty getIdentificationProperty() {
62 return identificationProperty;
66 protected IdentificationRequest createRequest() {
67 return new IdentificationRequest(this);
71 protected IdentificationResponse parseResponse(String response) throws ResponseException {
72 return new IdentificationResponse(this, response);