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.paradoxalarm.internal.model;
16 * The {@link PanelType} Enum of all panel types
18 * @author Konstantin Polihronov - Initial contribution
20 public enum PanelType {
23 EVO192(8, 192, 5, 16),
34 private int partitions;
36 private int pgms; // Programmable outputs
37 private int ramPagesNumber; // Ram pages 64 bytes each
43 private PanelType(int numberPartitions, int numberZones, int pgms, int ramPages) {
44 this.partitions = numberPartitions;
45 this.zones = numberZones;
47 this.ramPagesNumber = ramPages;
50 public static PanelType from(String panelTypeStr) {
51 if (panelTypeStr == null) {
52 return PanelType.UNKNOWN;
56 return PanelType.valueOf(panelTypeStr);
57 } catch (IllegalArgumentException e) {
58 return PanelType.UNKNOWN;
62 public int getPartitions() {
66 public int getZones() {
71 public String toString() {
75 public int getPgms() {
79 public int getRamPagesNumber() {
80 return ramPagesNumber;