]> git.basschouten.com Git - openhab-addons.git/blob
c119436ee2844a8a242c1c62849c4b3be489582d
[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.silvercrestwifisocket.internal.enums;
14
15 /**
16  * This enum represents the available Wifi Socket request types.
17  *
18  * @author Jaime Vaz - Initial contribution
19  *
20  */
21 public enum SilvercrestWifiSocketRequestType {
22     /** Request ON. */
23     ON("010000FFFF04040404"),
24     /** Request OFF. */
25     OFF("01000000FF04040404"),
26     /** Request Status. */
27     GPIO_STATUS("020000000004040404"),
28     /** Discover socket. The command has one placeholder for the mac address. */
29     DISCOVERY("23%s0202");
30
31     private String command;
32
33     private SilvercrestWifiSocketRequestType(final String command) {
34         this.command = command;
35     }
36
37     /**
38      * Gets the hexadecimal command/format for include in request messages.
39      *
40      * @return the hexadecimal command/format
41      */
42     public String getCommand() {
43         return this.command;
44     }
45 }