/*
 * Copyright 2022-2024, Digi International Inc.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
class CCIMX6ULSBC extends ConnectCoreDevice {

    // Public constants.
    static DEVICE_TYPE = "ccimx6ulsbc";
    static PLATFORM_NAME = "ConnectCore 6UL SBC Pro";

    // Variables.
    BOARD_IMAGE = "ccimx6ulsbc_board.png";
    BOARD_IMAGE_SCALE = 70;

    CPU_COMPONENT_VISIBLE = true;
    CPU_COMPONENT_HAS_PANEL = true;
    CPU_COMPONENT_HAS_ARROW = true;
    CPU_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    CPU_COMPONENT_PANEL_ORIENTATION = VALUE_LEFT;
    CPU_COMPONENT_PANEL_HORIZONTAL_PERCENT = 83;
    CPU_COMPONENT_PANEL_VERTICAL_PERCENT = 18;
    CPU_COMPONENT_ARROW_PERCENT = 32;
    CPU_COMPONENT_AREA_TOP_PERCENT = 29;
    CPU_COMPONENT_AREA_LEFT_PERCENT = 74;
    CPU_COMPONENT_AREA_WIDTH_PERCENT = 7.5;
    CPU_COMPONENT_AREA_HEIGHT_PERCENT = 10;

    MEMORY_COMPONENT_VISIBLE = true;
    MEMORY_COMPONENT_HAS_PANEL = true;
    MEMORY_COMPONENT_HAS_ARROW = true;
    MEMORY_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    MEMORY_COMPONENT_PANEL_ORIENTATION = VALUE_RIGHT;
    MEMORY_COMPONENT_PANEL_HORIZONTAL_PERCENT = 40.5;
    MEMORY_COMPONENT_PANEL_VERTICAL_PERCENT = 28;
    MEMORY_COMPONENT_ARROW_PERCENT = 32;
    MEMORY_COMPONENT_AREA_TOP_PERCENT = 25.5;
    MEMORY_COMPONENT_AREA_LEFT_PERCENT = 61.25;
    MEMORY_COMPONENT_AREA_WIDTH_PERCENT = 8.5;
    MEMORY_COMPONENT_AREA_HEIGHT_PERCENT = 17;

    WIFI_BT_COMPONENT_VISIBLE = true;
    WIFI_BT_COMPONENT_HAS_PANEL = true;
    WIFI_BT_COMPONENT_HAS_ARROW = true;
    WIFI_BT_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    WIFI_BT_COMPONENT_PANEL_ORIENTATION = VALUE_LEFT;
    WIFI_BT_COMPONENT_PANEL_HORIZONTAL_PERCENT = 83;
    WIFI_BT_COMPONENT_PANEL_VERTICAL_PERCENT = 42;
    WIFI_BT_COMPONENT_ARROW_PERCENT = 47;
    WIFI_BT_COMPONENT_AREA_TOP_PERCENT = 43;
    WIFI_BT_COMPONENT_AREA_LEFT_PERCENT = 72.75;
    WIFI_BT_COMPONENT_AREA_WIDTH_PERCENT = 8.7;
    WIFI_BT_COMPONENT_AREA_HEIGHT_PERCENT = 11.5;

    ETHERNET0_COMPONENT_VISIBLE = true;
    ETHERNET0_COMPONENT_HAS_PANEL = true;
    ETHERNET0_COMPONENT_HAS_ARROW = true;
    ETHERNET0_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    ETHERNET0_COMPONENT_PANEL_ORIENTATION = VALUE_BOTTOM;
    ETHERNET0_COMPONENT_PANEL_HORIZONTAL_PERCENT = -4;
    ETHERNET0_COMPONENT_PANEL_VERTICAL_PERCENT = 36;
    ETHERNET0_COMPONENT_ARROW_PERCENT = 18;
    ETHERNET0_COMPONENT_AREA_TOP_PERCENT = 66;
    ETHERNET0_COMPONENT_AREA_LEFT_PERCENT = 11.5;
    ETHERNET0_COMPONENT_AREA_WIDTH_PERCENT = 17.25;
    ETHERNET0_COMPONENT_AREA_HEIGHT_PERCENT = 29;

    ETHERNET1_COMPONENT_VISIBLE = true;
    ETHERNET1_COMPONENT_HAS_PANEL = true;
    ETHERNET1_COMPONENT_HAS_ARROW = true;
    ETHERNET1_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    ETHERNET1_COMPONENT_PANEL_ORIENTATION = VALUE_BOTTOM;
    ETHERNET1_COMPONENT_PANEL_HORIZONTAL_PERCENT = 33;
    ETHERNET1_COMPONENT_PANEL_VERTICAL_PERCENT = 36;
    ETHERNET1_COMPONENT_ARROW_PERCENT = 35;
    ETHERNET1_COMPONENT_AREA_TOP_PERCENT = 66;
    ETHERNET1_COMPONENT_AREA_LEFT_PERCENT = 28.5;
    ETHERNET1_COMPONENT_AREA_WIDTH_PERCENT = 16.5;
    ETHERNET1_COMPONENT_AREA_HEIGHT_PERCENT = 29;

    CONSOLE_COMPONENT_VISIBLE = true;
    CONSOLE_COMPONENT_HAS_PANEL = false;
    CONSOLE_COMPONENT_HAS_ARROW = false;
    CONSOLE_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    CONSOLE_COMPONENT_AREA_TOP_PERCENT = 20;
    CONSOLE_COMPONENT_AREA_LEFT_PERCENT = 10;
    CONSOLE_COMPONENT_AREA_WIDTH_PERCENT = 4.25;
    CONSOLE_COMPONENT_AREA_HEIGHT_PERCENT = 9.5;

    VIDEO_COMPONENT_VISIBLE = true;
    VIDEO_COMPONENT_HAS_PANEL = true;
    VIDEO_COMPONENT_HAS_ARROW = true;
    VIDEO_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    VIDEO_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
    VIDEO_COMPONENT_PANEL_HORIZONTAL_PERCENT = 19;
    VIDEO_COMPONENT_PANEL_VERTICAL_PERCENT = 16;
    VIDEO_COMPONENT_ARROW_PERCENT = 25.5;
    VIDEO_COMPONENT_AREA_TOP_PERCENT = 6;
    VIDEO_COMPONENT_AREA_LEFT_PERCENT = 16.75;
    VIDEO_COMPONENT_AREA_WIDTH_PERCENT = 21;
    VIDEO_COMPONENT_AREA_HEIGHT_PERCENT = 8;

    AUDIO_COMPONENT_VISIBLE = true;
    AUDIO_COMPONENT_HAS_PANEL = true;
    AUDIO_COMPONENT_HAS_ARROW = true;
    AUDIO_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    AUDIO_COMPONENT_PANEL_ORIENTATION = VALUE_LEFT;
    AUDIO_COMPONENT_PANEL_HORIZONTAL_PERCENT = 76.5;
    AUDIO_COMPONENT_PANEL_VERTICAL_PERCENT = 76;
    AUDIO_COMPONENT_ARROW_PERCENT = 81.5;
    AUDIO_COMPONENT_AREA_TOP_PERCENT = 74;
    AUDIO_COMPONENT_AREA_LEFT_PERCENT = 66;
    AUDIO_COMPONENT_AREA_WIDTH_PERCENT = 9.5;
    AUDIO_COMPONENT_AREA_HEIGHT_PERCENT = 18.5;

    LED_COMPONENT_VISIBLE = true;
    LED_COMPONENT_HAS_PANEL = true;
    LED_COMPONENT_HAS_ARROW = false;
    LED_COMPONENT_PANEL_ALWAYS_VISIBLE = true;
    LED_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
    LED_COMPONENT_PANEL_HORIZONTAL_PERCENT = 14.5;
    LED_COMPONENT_PANEL_VERTICAL_PERCENT = 21;
    LED_COMPONENT_AREA_TOP_PERCENT = 16;
    LED_COMPONENT_AREA_LEFT_PERCENT = 15.5;
    LED_COMPONENT_AREA_WIDTH_PERCENT = 4.5;
    LED_COMPONENT_AREA_HEIGHT_PERCENT = 4;

    FLASH_MEMORY_COMPONENT_VISIBLE = true;
    FLASH_MEMORY_COMPONENT_HAS_PANEL = true;
    FLASH_MEMORY_COMPONENT_HAS_ARROW = true;
    FLASH_MEMORY_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
    FLASH_MEMORY_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
    FLASH_MEMORY_COMPONENT_PANEL_HORIZONTAL_PERCENT = 49;
    FLASH_MEMORY_COMPONENT_PANEL_VERTICAL_PERCENT = 58.5;
    FLASH_MEMORY_COMPONENT_ARROW_PERCENT = 65.3;
    FLASH_MEMORY_COMPONENT_AREA_TOP_PERCENT = 43;
    FLASH_MEMORY_COMPONENT_AREA_LEFT_PERCENT = 61.25;
    FLASH_MEMORY_COMPONENT_AREA_WIDTH_PERCENT = 11;
    FLASH_MEMORY_COMPONENT_AREA_HEIGHT_PERCENT = 12.5;


    // Capabilities
    SUPPORTS_VIDEO_BRIGHTNESS = false;
    SUPPORTS_NUM_ETHERNET = 2;

    // Misc info
    PCB_COLOR = ID_COLOR_BLUE;

    // Constructor.
    constructor(deviceData) {
        super(CCIMX6ULSBC.DEVICE_TYPE, CCIMX6ULSBC.PLATFORM_NAME, deviceData);
    }
}
