diff --git a/en/device-dev/subsystems/subsys-dfx-hisysevent-query.md b/en/device-dev/subsystems/subsys-dfx-hisysevent-query.md
index 32946d0d0eef37a259f1de38fdbe78726a42c38f..aae1271974522bdb4293252e165f173231aaf8e1 100644
--- a/en/device-dev/subsystems/subsys-dfx-hisysevent-query.md
+++ b/en/device-dev/subsystems/subsys-dfx-hisysevent-query.md
@@ -17,7 +17,7 @@ HiSysEvent provides an API for you to query system events. You can query concern
| API| Description|
| -------- | --------- |
-| bool HiSysEventManager::QueryHiSysEvent(struct QueryArg& queryArg, std::vector<struct QueryRule>& queryRules, std::shared_ptr<HiSysEventQueryCallBackBase> queryCallBack) | Queries system events by specifying search criteria such as the time segment, event domain, and event name.
Input arguments:
- **queryArg**: event query parameter.
- **queryRules**: event filtering rules.
- **queryRules**: callback object for query results.
Return value:- **true**: The query is successful.
- **false**: The query has failed.
|
+| bool HiSysEventManager::QueryHiSysEvent(struct QueryArg& queryArg, std::vector<QueryRule>& queryRules, std::shared_ptr<HiSysEventQueryCallBackBase> queryCallBack) | Queries system events by specifying search criteria such as the time segment, event domain, and event name.
Input arguments:- **queryArg**: event query parameter.
- **queryRules**: event filtering rules.
- **queryRules**: callback object for query results.
Return value:- **true**: The query is successful.
- **false**: The query has failed.
|
**Table 2** Description of QueryArg
@@ -30,11 +30,9 @@ HiSysEvent provides an API for you to query system events. You can query concern
**Table 3** Description of QueryRule
-| Attribute| Description|
+| API| Description|
| -------- | --------- |
-| ruleType | Rule type, in the **uint32_t** format. The default value is **0**.|
-| domain | Domain to which the event belongs, in the **string** format. By default, an empty string indicates that the domain is successfully matched.|
-| eventList | Event name list, in the std::vector<std::string> format. By default, an empty string indicates that the event names on the list are successfully matched.|
+| QueryRule(const std::string& domain, const std::vector<std::string>& eventList) | Constructor used to create a **QueryRule** object based on domain and event name list.
Input arguments:- domain:Domain to which the event belongs, in the **string** format. By default, an empty string indicates that the domain is successfully matched.
- eventList:Event name list, in the std::vector<std::string> format. By default, an empty string indicates that the event names on the list are successfully matched.
|
**Table 4** Description of HiSysEventQueryCallBackBase
@@ -61,7 +59,7 @@ C++
- Invoke the query API in the corresponding service logic.
- HiSysEventManager::QueryHiSysEvent\(struct QueryArg& queryArg, std::vector& queryRules, std::shared\_ptr queryCallBack\)
+ HiSysEventManager::QueryHiSysEvent\(struct QueryArg& queryArg, std::vector& queryRules, std::shared\_ptr queryCallBack\)
```
@@ -90,7 +88,7 @@ C++
// Invoke the query callback API to obtain system events.
auto queryCallBack = std::make_shared();
struct QueryArg args(clientCmdArg.beginTime, clientCmdArg.endTime, clientCmdArg.maxEvents);
- std::vector mRules;
+ std::vector mRules;
HiSysEventManager::QueryHiSysEvent(args, mRules, queryCallBack);
```
diff --git a/zh-cn/device-dev/subsystems/subsys-dfx-hisysevent-query.md b/zh-cn/device-dev/subsystems/subsys-dfx-hisysevent-query.md
index 48867c40c869535913b25cf344fd16b7d80b5c3c..60ffefa6e229e360586778fcd78155086a7619bd 100644
--- a/zh-cn/device-dev/subsystems/subsys-dfx-hisysevent-query.md
+++ b/zh-cn/device-dev/subsystems/subsys-dfx-hisysevent-query.md
@@ -17,7 +17,7 @@ HiSysEvent提供了查询接口,支持开发者设置条件查询HiSysEvent事
| 接口名称 | 描述 |
| -------- | --------- |
-| bool HiSysEventManager::QueryHiSysEvent(struct QueryArg& queryArg, std::vector<struct QueryRule>& queryRules, std::shared_ptr<HiSysEventQueryCallBack> queryCallBack) | 接口功能:
支持设置查询时间段,事件领域,事件名称等,查询满足条件的HiSysEvent事件。
输入参数:- queryArg:查询参数。
- queryRules:事件过滤规则。
- queryCallBack:查询接口回调对象。
返回值: |
+| bool HiSysEventManager::QueryHiSysEvent(struct QueryArg& queryArg, std::vector<QueryRule>& queryRules, std::shared_ptr<HiSysEventQueryCallBack> queryCallBack) | 接口功能:
支持设置查询时间段,事件领域,事件名称等,查询满足条件的HiSysEvent事件。
输入参数:- queryArg:查询参数。
- queryRules:事件过滤规则。
- queryCallBack:查询接口回调对象。
返回值: |
**表 2** QueryArg查询参数对象
@@ -30,11 +30,9 @@ HiSysEvent提供了查询接口,支持开发者设置条件查询HiSysEvent事
**表 3** QueryRule查询规则对象
-| 属性名称 | 描述 |
+| 接口名称 | 描述 |
| -------- | --------- |
-| ruleType | uint32_t类型,用来标识查询规则对象的规则类型,默认是0。 |
-| domain | string类型,用来标识查询规则对象的事件所属领域,如果传入的是空字符串,则默认事件领域字段匹配成功。 |
-| eventList | std::vector<std::string>类型,事件名称的列表,如果传入的是空字符串,则默认事件名称字段匹配成功。 |
+| QueryRule(const std::string& domain, const std::vector<std::string>& eventList) | 接口功能:查询规则构造函数,创建查询规则对象。
输入参数:- domain:string类型,用来标识查询规则对象的事件所属领域,如果传入的是空字符串,则默认事件领域字段匹配成功。
- eventList:std::vector<std::string>类型,事件名称的列表,如果传入的是空字符串,则默认事件名称字段匹配成功。
|
**表 4** HiSysEventQueryCallBack查询回调对象
@@ -61,7 +59,7 @@ C++接口实例。
- 在相应的业务逻辑里面调用查询接口:
- HiSysEventManager::QueryHiSysEvent\(struct QueryArg& queryArg, std::vector& queryRules, std::shared\_ptr queryCallBack\)
+ HiSysEventManager::QueryHiSysEvent\(struct QueryArg& queryArg, std::vector& queryRules, std::shared\_ptr queryCallBack\)
```
@@ -90,7 +88,7 @@ C++接口实例。
// 调用查询接口获取HiSysEvent事件
auto queryCallBack = std::make_shared();
struct QueryArg args(clientCmdArg.beginTime, clientCmdArg.endTime, clientCmdArg.maxEvents);
- std::vector mRules;
+ std::vector mRules;
HiSysEventManager::QueryHiSysEvent(args, mRules, queryCallBack);
```