package kr.co.icontrols.iotplatform.Protocol;

public class bleProtocol {
    public static final byte BLE_HEADER                                                 = (byte) 0xF2;

    public static final byte DEVICE_ID_TYPE                                             = (byte) 0x01;
    public static final byte MODEL_ID_TYPE                                              = (byte) 0x02;
    public static final byte MAC_TYPE                                                   = (byte) 0x03;
    public static final byte NO_ERROR_TYPE                                              = (byte) 0x00;

    public static final byte BLE_COMMAND_LTOA_BLINK_LIGHT_RSP_TO_APP                    = (byte) 0xA0;
    public static final byte BLE_COMMAND_LTOA_FACTORY_RESET_RSP_TO_APP                  = (byte) 0xA1;
    public static final byte BLE_COMMAND_LTOA_AWS_ONBOARDING_RSP_TO_APP                 = (byte) 0xA2;
    public static final byte BLE_COMMAND_ATOL_AWS_ONBOARDING_INFO_RSP_TO_LIGHT          = (byte) 0xA3;
    public static final byte BLE_COMMAND_LTOA_USER_REGISTERATION_RSP_TO_APP             = (byte) 0xA4;
    public static final byte BLE_COMMAND_ATOL_USER_REGISTERATION_COMPLETE_RSP_TO_LIGHT  = (byte) 0xA5;
    public static final byte BLE_COMMAND_LTOA_LIGHT_VERSION_RSP_TO_APP                  = (byte) 0xA6;
    public static final byte BLE_COMMAND_LTOA_LIGHT_STATUS_RSP_TO_APP                   = (byte) 0xA7;
    public static final byte BLE_COMMAND_ATOL_APP_STATUS_RESPONSE_TO_LIGHT                  = (byte) 0xA8;
    public static final byte BLE_COMMAND_ATOL_APP_MAPPING_READY_TO_LIGHT                = (byte) 0xA9;

    public static final byte BLE_COMMAND_STOA_BUZZER_PLAY_RSP_TO_APP                    = (byte) 0xC0;
    public static final byte BLE_COMMAND_STOA_FACTORYRESET_RSP_TO_APP                   = (byte) 0xC1;
    public static final byte BLE_COMMAND_STOA_MAC_ADDR_RSP_TO_APP                       = (byte) 0xC2;
    public static final byte BLE_COMMAND_STOA_VERSION_RSP_TO_APP                        = (byte) 0xC3;

    public static final byte BLE_COMMAND_LTOA_LIGHT_GROUPING_RSP_TO_APP                 = (byte) 0xE0;
    public static final byte BLE_COMMAND_STOA_SWITCH_SCANRSP_TO_APP                     = (byte) 0xE1;
    public static final byte BLE_COMMAND_STOA_SWITCH_GROUPING_RSP_TO_APP                = (byte) 0xE2;
    public static final byte BLE_COMMAND_LTOA_INIT_LIGHT_GROUPING_RSP_TO_APP            = (byte) 0xE3;
    public static final byte BLE_COMMAND_STOA_INIT_SWITCH_GROUPING_RSP_TO_APP           = (byte) 0xE4;

    public static final byte BLE_COMMAND_ATOL_BLINK_LIGHT_REQ_TO_LIGHT                  = (byte) 0x20;
    public static final byte BLE_COMMAND_ATOL_FACTORY_RESET_REQ_TO_LIGHT                = (byte) 0x21;
    public static final byte BLE_COMMAND_ATOL_AWS_ONBOARDING_REQ_TO_LIGHT               = (byte) 0x22;
    public static final byte BLE_COMMAND_LTOA_AWS_ONBOARDING_INFO_REQ_TO_APP            = (byte) 0x23;
    public static final byte BLE_COMMAND_ATOL_USER_REGISTERATION_REQ_TO_LIGHT           = (byte) 0x24;
    public static final byte BLE_COMMAND_LTOA_USER_REGISTERATION_COMPLETE_REQ_TO_APP    = (byte) 0x25;
    public static final byte BLE_COMMAND_ATOL_LIGHT_VERSION_REQ_TO_LIGHT                = (byte) 0x26;
    public static final byte BLE_COMMAND_ATOL_LIGHT_STATUS_REQ_TO_LIGHT                 = (byte) 0x27;
    public static final byte BLE_COMMAND_ATOL_APP_STATUS_REQ_TO_LIGHT                   = (byte) 0x28;
    public static final byte BLE_COMMAND_LTOA_LIGHT_MAPPING_READY_TO_APP                = (byte) 0x29;

    public static final byte BLE_COMMAND_ATOS_BUZZER_PLAY_REQ_TO_SWITCH                 = (byte) 0x40;
    public static final byte BLE_COMMAND_ATOS_FACTORYRESET_REQ_TO_SWITCH                = (byte) 0x41;
    public static final byte BLE_COMMAND_ATOS_MAC_ADDR_REQ_TO_SWITCH                    = (byte) 0x42;
    public static final byte BLE_COMMAND_ATOS_VERSION_REQ_TO_SWITCH                     = (byte) 0x43;

    public static final byte BLE_COMMAND_ATOL_APP_GROUPING_REQ_TO_LIGHT                 = (byte) 0x60;
    public static final byte BLE_COMMAND_ATOS_APP_SCAN_REQ_TO_SWITCH                    = (byte) 0x61;

    public static final byte BLE_COMMAND_ATOL_APP_INIT_GROUPING_REQ_TO_LIGHT            = (byte) 0x63;
    public static final byte BLE_COMMAND_ATOS_APP_INIT_GROUPING_REQ_TO_SWITCH           = (byte) 0x64;


    public static final byte[] blinkLightProtocol                   = {BLE_HEADER, BLE_COMMAND_ATOL_BLINK_LIGHT_REQ_TO_LIGHT, (byte) (0x01), (byte) (0x03)};
    public static final byte[] lightVersionProtocol                 = {BLE_HEADER, BLE_COMMAND_ATOL_LIGHT_VERSION_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] FactoryResetLightProtocol            = {BLE_HEADER, BLE_COMMAND_ATOL_FACTORY_RESET_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] onBoardingFailProtocol               = {BLE_HEADER, (byte) (0x81), (byte) (0x01), (byte) (0x02)};
    public static final byte[] onBoardingRequestProtocol            = {BLE_HEADER, BLE_COMMAND_ATOL_AWS_ONBOARDING_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] onBoardingGetIdDataSuccessProtocol   = {BLE_HEADER, BLE_COMMAND_ATOL_AWS_ONBOARDING_INFO_RSP_TO_LIGHT, (byte) (0x01), (byte) (0x01)};
    public static final byte[] onBoardingGetIdDataFailProtocol      = {BLE_HEADER, BLE_COMMAND_ATOL_AWS_ONBOARDING_INFO_RSP_TO_LIGHT, (byte) (0x01), (byte) (0x02)};
    public static final byte[] userRegisterRequestProtocol          = {BLE_HEADER, BLE_COMMAND_ATOL_USER_REGISTERATION_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] userRegisterCompleteSuccessProtocol  = {BLE_HEADER, BLE_COMMAND_ATOL_USER_REGISTERATION_COMPLETE_RSP_TO_LIGHT, (byte) (0x01), (byte) (0x01)};
    public static final byte[] userRegisterCompleteFailProtocol     = {BLE_HEADER, BLE_COMMAND_ATOL_USER_REGISTERATION_COMPLETE_RSP_TO_LIGHT, (byte) (0x01), (byte) (0x02)};
    public static final byte[] buzzerSwitchProtocol                 = {BLE_HEADER, BLE_COMMAND_ATOS_BUZZER_PLAY_REQ_TO_SWITCH, (byte) (0x01), (byte) (0x01)};
    public static final byte[] FactoryResetSwitchProtocol           = {BLE_HEADER, BLE_COMMAND_ATOS_MAC_ADDR_REQ_TO_SWITCH, (byte) (0x00)};
    public static final byte[] getMacSwitchProtocol                 = {BLE_HEADER, BLE_COMMAND_ATOS_MAC_ADDR_REQ_TO_SWITCH, (byte) (0x00)};
    public static final byte[] switchVersionProtocol                = {BLE_HEADER, BLE_COMMAND_ATOS_VERSION_REQ_TO_SWITCH, (byte) (0x00)};
    public static       byte[] scanRequestSwitchProtocol            = {BLE_HEADER, BLE_COMMAND_ATOS_APP_SCAN_REQ_TO_SWITCH, (byte) (0x01), (byte) (0x00)};
    public static final byte[] request_provion_status               = {BLE_HEADER, BLE_COMMAND_ATOL_LIGHT_STATUS_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] userMappingReadyRequestProtocol      = {BLE_HEADER, BLE_COMMAND_ATOL_APP_STATUS_REQ_TO_LIGHT, (byte) (0x00)};
    public static final byte[] userMappingReadySuccessProtocol      = {BLE_HEADER, BLE_COMMAND_ATOL_APP_MAPPING_READY_TO_LIGHT, (byte) (0x01), (byte) (0x01)};
    public static final byte[] userMappingReadyFailProtocol         = {BLE_HEADER, BLE_COMMAND_ATOL_APP_MAPPING_READY_TO_LIGHT, (byte) (0x01), (byte) (0x02)};

    public static final byte[] LightFactoryReset_Success_Command    = {BLE_HEADER, (byte)(0xA9), (byte) (0x01), (byte) (0x01)};
    public static final byte[] LightFactoryReset_Fail_Command       = {BLE_HEADER, (byte)(0xA9), (byte) (0x01), (byte) (0x01)};

    public static final byte[] lightStatusSuccessResponseProtocol   = {BLE_HEADER, BLE_COMMAND_ATOL_APP_STATUS_RESPONSE_TO_LIGHT, (byte) (0x01), (byte) (0x01)};
    public static final byte[] lightStatusFailResponseProtocol      = {BLE_HEADER, BLE_COMMAND_ATOL_APP_STATUS_RESPONSE_TO_LIGHT, (byte) (0x01), (byte) (0x02)};

    public static final byte[] initGroupDateSwitchProtocol          = {BLE_HEADER, BLE_COMMAND_ATOS_APP_INIT_GROUPING_REQ_TO_SWITCH, (byte) (0x00)};
    public static final byte[] initGroupDateLightProtocol           = {BLE_HEADER, BLE_COMMAND_ATOL_APP_INIT_GROUPING_REQ_TO_LIGHT, (byte) (0x00)};
}
