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.satel.internal.types;
16 * Available Integra types.
18 * @author Krzysztof Goworek - Initial contribution
20 public enum IntegraType {
21 UNKNOWN(-1, "Unknown", 0, 0, 0),
22 I24(0, "Integra 24", 4, 24, 4),
23 I32(1, "Integra 32", 16, 32, 8),
24 I64(2, "Integra 64", 32, 64, 16),
25 I128(3, "Integra 128", 32, 128, 16),
26 I128_SIM300(4, "Integra 128-WRL SIM300", 32, 128, 8),
27 I128_LEON(132, "Integra 128-WRL LEON", 32, 128, 8),
28 I64_PLUS(66, "Integra 64 Plus", 32, 64, 16),
29 I128_PLUS(67, "Integra 128 Plus", 32, 128, 16),
30 I256_PLUS(72, "Integra 256 Plus", 32, 256, 16, true);
34 private int partitions;
36 private int onMainboard;
37 private boolean extPayload;
39 IntegraType(int code, String name, int partitions, int zones, int onMainboard) {
40 this(code, name, partitions, zones, onMainboard, false);
43 IntegraType(int code, String name, int partitions, int zones, int onMainboard, boolean extPayload) {
46 this.partitions = partitions;
48 this.onMainboard = onMainboard;
49 this.extPayload = extPayload;
53 * @return name of Integra type
55 public String getName() {
60 * @return max number of partitions
62 public int getPartitions() {
67 * @return max number of zones
69 public int getZones() {
74 * @return wired zones/outputs available on mainboard
76 public int getOnMainboard() {
81 * @return <code>true</code> if this Integra requires extended message payload
83 public boolean hasExtPayload() {
84 return this.extPayload;
88 * Returns Integra type for given code.
90 * @param code code to get type for
91 * @return Integra type object
93 public static IntegraType valueOf(int code) {
94 for (IntegraType val : IntegraType.values()) {
95 if (val.code == code) {