# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

domain: NFC

FIRMWARE_UPDATE:
  __BASE: {type: STATISTIC, level: MINOR, desc: record the event of updating firmware}
  FAILED_FIRMWARE_UPDATE_CNT: {type: INT16, desc: count when fail to update firmware}
  REQUEST_FIRMWARE_UPDATE_CNT: {type: INT16, desc: count when update firmware}

OPEN_AND_CLOSE:
  __BASE: {type: STATISTIC, level: MINOR, desc: record the event of opening and closing NFC}
  CLOSE_FAILED_CNT: {type: INT16, desc: count when fail to close NFC}
  CLOSE_REQUEST_CNT: {type: INT16, desc: count when close NFC}
  OPEN_FAILED_CNT: {type: INT16, desc: count when fail to open NFC}
  OPEN_REQUEST_CNT: {type: INT16, desc: count when open NFC}

OPERATION_FAILED:
  __BASE: {type: FAULT, level: CRITICAL, desc: record when NFC functions fail}
  APP_PACKAGE_NAME: {type: STRING, desc: app triggered by current event}
  CURRENT_DEFAULT_ROUTE: {type: INT16, desc: current default route}
  CURRENT_FIRMWARE_VERSION: {type: STRING, desc: current version of firmware}
  CURRENT_NFC_STATE: {type: INT16, desc: current status of NFC}
  CURRENT_PASSIVE_LISTEN_STATE: {type: INT16, desc: current status of passive listen}
  CURRENT_SCREEN_STATE: {type: INT16, desc: current status of screen}
  MAIN_ERROR_CODE: {type: INT16, desc: refer to different types of failed events}
  SUB_ERROR_CODE: {type: INT16, desc: refer to different reasons of failed events}

PASSIVE_LISTEN:
  __BASE: {type: STATISTIC, level: MINOR, desc: record the event of turning on NFC passive listen mode}
  FAILED_PASSIVE_LISTEN_CNT: {type: INT16, desc: count when fail to turn on NFC passive listen mode}
  REQUEST_PASSIVE_LISTEN_CNT: {type: INT16, desc: count when turn on NFC passive listen mode}

TAG_FOUND:
  __BASE: {type: STATISTIC, level: MINOR, desc: record the event and types when NFC tag found}
  TOTAL_TAG_FOUND_CNT: {type: INT16, desc: count when NFC tag found}
  TYPE_A_TAG_FOUND: {type: INT16, desc: count when the found NFC tag is type A}
  TYPE_B_TAG_FOUND: {type: INT16, desc: count when the found NFC tag is type B}
  TYPE_F_TAG_FOUND: {type: INT16, desc: count when the found NFC tag is type F}
  TYPE_V_TAG_FOUND: {type: INT16, desc: count when the found NFC tag is type V}
