]> git.basschouten.com Git - openhab-addons.git/blob
6a859d5e9e7e78e8a2dbdb36d868a6ba0a1ae75b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.paradoxalarm.internal.communication.messages;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * {@link HeaderCommand}
19  * From Jean's(Jean_Henning from community) excel sheet:
20  * 0x00: Serial/pass through command any other: IP module command
21  * 0xF0: Connect to IP module
22  * 0xF2: (unknown, part of login sequence)
23  * 0xF3: (unknown, part of login sequence)
24  * 0xF4: (unknown)
25  * 0xF8: (unknown, occurs after serial connection is initiated with the panel)
26  * 0xFB: Multicommand
27  * 0xFF: Disconnect from IP module (byte 00 in the response payload MUST be 01 to indicate a successful disconnect)
28  *
29  * @author Konstantin Polihronov - Initial contribution
30  */
31 @NonNullByDefault
32 public enum HeaderCommand {
33     SERIAL((byte) 0x00),
34     CONNECT_TO_IP_MODULE((byte) 0xF0),
35     LOGIN_COMMAND1((byte) 0xF2),
36     LOGIN_COMMAND2((byte) 0xF3),
37     UNKNOWN1((byte) 0xF4),
38     SERIAL_CONNECTION_INITIATED((byte) 0xF8),
39     MULTI_COMMAND((byte) 0xFB),
40     DISCONNECT((byte) 0xFF);
41
42     private byte value;
43
44     HeaderCommand(byte value) {
45         this.value = value;
46     }
47
48     public byte getValue() {
49         return value;
50     }
51 }