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.souliss.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Network constants. The class {@link SoulissUDPConstants} contains Souliss constants. Original version is
19 * taken from SoulissApp. For scope of this binding not all constants are used.
21 * @author Tonino Fazio - Initial contribution
22 * @author Luca Calcaterra - Refactor for OH3
23 * @author Alessandro Del Pex - @since 1.7.0
26 public class SoulissUDPConstants {
28 public static final String TAG = "SoulissApp";
30 public static final int SOULISS_BINDING_LOCAL_PORT = 0;
31 public static final int SOULISS_GATEWAY_DEFAULT_PORT = 230;
33 public static final Integer SOULISS_DEFAULT_NODE_INDEX = 70;
34 public static final Integer SOULISS_DEFAULT_USER_INDEX = 120;
36 public static final String BROADCASTADDR = "255.255.255.255";
38 public static final byte SOULISS_UDP_FUNCTION_FORCE = 0x33;
39 public static final byte SOULISS_UDP_FUNCTION_FORCE_MASSIVE = 0x34;
41 public static final byte SOULISS_UDP_FUNCTION_SUBSCRIBE_REQ = 0x21;
42 public static final byte SOULISS_UDP_FUNCTION_SUBSCRIBE_RESP = 0x31;
43 public static final byte SOULISS_UDP_FUNCTION_POLL_REQ = 0x27;
44 public static final byte SOULISS_UDP_FUNCTION_POLL_RESP = 0x37;
45 public static final byte SOULISS_UDP_FUNCTION_TYP_REQ = 0x22;
46 public static final byte SOULISS_UDP_FUNCTION_TYP_RESP = 0x32;
47 public static final byte SOULISS_UDP_FUNCTION_HEALTHY_REQ = 0x25;
48 public static final byte SOULISS_UDP_FUNCTION_HEALTHY_RESP = 0x35;
50 public static final byte SOULISS_UDP_FUNCTION_PING_REQ = 0x8;
51 public static final byte SOULISS_UDP_FUNCTION_PING_RESP = 0x18;
53 public static final byte SOULISS_UDP_FUNCTION_DISCOVER_GW_NODE_BCAST_REQ = 0x28;
54 public static final byte SOULISS_UDP_FUNCTION_DISCOVER_GW_NODE_BCAST_RESP = 0x38;
56 public static final int SOULISS_UDP_FUNCTION_DBSTRUCT_REQ = 0x26;
57 public static final int SOULISS_UDP_FUNCTION_DBSTRUCT_RESP = 0x36;
59 public static final int SOULISS_UDP_FUNCTION_ACTION_MESSAGE = 0x72;
61 protected static final Byte[] PING_PAYLOAD = { SOULISS_UDP_FUNCTION_PING_REQ, 0, 0, 0, 0 };
62 protected static final Byte[] PING_DISCOVER_BCAST_PAYLOAD = { SOULISS_UDP_FUNCTION_DISCOVER_GW_NODE_BCAST_REQ, 0, 0,
64 protected static final Byte[] DBSTRUCT_PAYLOAD = { SOULISS_UDP_FUNCTION_DBSTRUCT_REQ, 0, 0, 0, 0 };
66 // private constructor
67 private SoulissUDPConstants() {