# Copyright (c) 2021 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. ##################################################### # below is the format of defining event # ##################################################### #domain: domain name. [Only one domain name can be defined at the top] # #author: the author name who defined this event. #date: the date when this event was defined, format is YYYY-MM-DD. #logged: source file which refer to this event. #usage: the usage of this event. #//Define event name and event properties. #@EVENT_NAME: the event definition part begin. # // __BASE is used for defining the basic info of the event. # // "type" optional values are: FAULT, STATISTICS, SECURITY, BEHAVIOR. # // "level" optional values are: CRITICAL, MINOR. # // "tag" set tags with may used by subscriber of this event, multiple tags devided by space. # // "desc" full description of this event. # @PARAMETER: {type: parameter type, arrsize: array length(optional), desc: parameter description}. # // follow the __BASE block, each line defines a parameter of this event. # // "type" optional values are: INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, STRING. # // "arrsize" of the parameter is an array, set a non-zero value. # // "desc" full description of this parameter. ##################################################### # Example of some hiviewdfx events definition # ##################################################### domain: MULTIMODALINPUT APPLICATION_BLOCK_INPUT: __BASE: {type: FAULT, level: CRITICAL, desc: The event is not consumed } PID: {type: INT32, desc: session pid} UID: {type: INT32, desc: session uid} PACKAGE_NAME: {type: STRING, desc: package name} PROCESS_NAME: {type: STRING, desc: process name} MSG: {type: STRING, desc: multimodalinput event message} INPUT_DEV_CONNECTION_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: input device connection success} DEVICE_ID: {type: INT32, desc: device id} DEVICE_PHYS: {type: STRING, desc: device physics} DEVICE_NAME: {type: STRING, desc: device name} DEVICE_TYPE: {type: INT32, desc: device type} MSG: {type: STRING, desc: message} INPUT_DEV_CONNECTION_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: input device connection failure} DEVICE_ID: {type: INT32, desc: device id} DEVICE_PHYS: {type: STRING, desc: device physics} DEVICE_NAME: {type: STRING, desc: device name} DEVICE_TYPE: {type: INT32, desc: device type} MSG: {type: STRING, desc: message} INPUT_DEV_DISCONNECTION_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: input device disconnection success} DEVICE_ID: {type: INT32, desc: device id} DEVICE_PHYS: {type: STRING, desc: device physics} DEVICE_NAME: {type: STRING, desc: device name} DEVICE_TYPE: {type: INT32, desc: device type} MSG: {type: STRING, desc: message} INPUT_DEV_DISCONNECTION_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: input device disconnection failure} MSG: {type: STRING, desc: message} CLIENT_CONNECTION_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: client connection event success} PID: {type: INT32, desc: pid} UID: {type: INT32, desc: uid} MODULE_TYPE: {type: INT32, desc: module type} FD: {type: INT32, desc: server fd} PROGRAMNAME: {type: STRING, desc: program name} MSG: {type: STRING, desc: message} CLIENT_CONNECTION_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: client connection event failure} PID: {type: INT32, desc: pid} UID: {type: INT32, desc: uid} MODULE_TYPE: {type: INT32, desc: module type} PROGRAMNAME: {type: STRING, desc: program name} MSG: {type: STRING, desc: message} CLIENT_DISCONNECTION_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: client disconnection event success} PID: {type: INT32, desc: pid} UID: {type: INT32, desc: uid} MODULE_TYPE: {type: INT32, desc: module type} FD: {type: INT32, desc: server fd} PROGRAMNAME: {type: STRING, desc: program name} MSG: {type: STRING, desc: message} CLIENT_DISCONNECTION_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: client disconnection event failure} MSG: {type: STRING, desc: message} TARGET_POINTER_EVENT_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: target pointer event success} EVENTTYPE: {type: INT32, desc: event type} AGENT_WINDOWID: {type: INT32, desc: agent windowid} TARGET_WINDOWID: {type: INT32, desc: target windowid} PID: {type: INT32, desc: pid} FD: {type: INT32, desc: target fd} MSG: {type: STRING, desc: message} TARGET_POINTER_EVENT_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: target pointer event failure} EVENTTYPE: {type: INT32, desc: event type} MSG: {type: STRING, desc: message} TARGET_KEY_EVENT_SUCCESS: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: target key event success} EVENTTYPE: {type: INT32, desc: event type} KEYCODE: {type: INT32, desc: keycode} ACTION: {type: INT32, desc: action} ACTION_TIME: {type: UINT64, desc: action time} ACTION_STARTTIME: {type: UINT64, desc: action start time} FLAG: {type: INT32, desc: flag} KEYACTION: {type: INT32, desc: keyaction} FD: {type: INT32, desc: target fd} AGENT_WINDOWID: {type: INT32, desc: agent windowid} TARGET_WINDOWID: {type: INT32, desc: target windowid} PID: {type: INT32, desc: pid} MSG: {type: STRING, desc: message} TARGET_KEY_EVENT_FAILURE: __BASE: {type: FAULT, level: MINOR, tag: PowerStats, desc: target key event failure} EVENTTYPE: {type: INT32, desc: event type} KEYCODE: {type: INT32, desc: keycode} ACTION: {type: INT32, desc: action} ACTION_TIME: {type: UINT64, desc: action time} ACTION_STARTTIME: {type: UINT64, desc: action start time} FLAG: {type: INT32, desc: flag} KEYACTION: {type: INT32, desc: keyaction} MSG: {type: STRING, desc: message} FOCUS_WINDOW_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: foucs window change} OLD_FOCUS_WINDOWID: {type: INT32, desc: old focus windowid} NEW_FOCUS_WINDOWID: {type: INT32, desc: new focus windowid} OLD_FOCUS_WINDOWPID: {type: INT32, desc: old focus windowpid} NEW_FOCUS_WINDOWPID: {type: INT32, desc: new focus windowpid} MSG: {type: STRING, desc: message} Z_ORDER_WINDOW_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: zorder window change} OLD_ZORDER_FIRST_WINDOWID: {type: INT32, desc: old zorder first windowid} NEW_ZORDER_FIRST_WINDOWID: {type: INT32, desc: new zorder first windowid} OLD_ZORDER_FIRST_WINDOWPID: {type: INT32, desc: old zorder first windowpid} NEW_ZORDER_FIRST_WINDOWPID: {type: INT32, desc: new zorder first windowpid} MSG: {type: STRING, desc: message} INPUT_DISPATCH_TIME: __BASE: {type: STATISTIC, level: MINOR, desc: input dispatch time} BELOW10MS: {type: UINT32, desc: times below 10ms} BELOW25MS: {type: UINT32, desc: times below 25ms} BELOW50MS: {type: UINT32, desc: times below 50ms} ABOVE50MS: {type: UINT32, desc: times above 50ms} MSG: {type: STRING, desc: message} COMBO_START_TIME: __BASE: {type: STATISTIC, level: MINOR, desc: combo start time} BELOW10MS: {type: UINT32, desc: times below 10ms} BELOW30MS: {type: UINT32, desc: times below 30ms} BELOW50MS: {type: UINT32, desc: times below 50ms} ABOVE50MS: {type: UINT32, desc: times above 50ms} MSG: {type: STRING, desc: message}