mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-24 01:09:51 +00:00
add dfx
Signed-off-by: xzh457 <xiaozihan4@h-partners.com> Change-Id: Ib6ccb36ef883cdeb96daef111b835c20010cbe62
This commit is contained in:
parent
aaa7062294
commit
cac899707a
@ -64,8 +64,10 @@ TRANS_ASSIGNER(Int32, FirstTokenType, firstTokenType)
|
||||
TRANS_ASSIGNER(LongString, TrafficStats, trafficStats)
|
||||
TRANS_ASSIGNER(Int32, OsType, osType)
|
||||
TRANS_ASSIGNER(Int32, DeviceState, deviceState)
|
||||
TRANS_ASSIGNER(Int32, BusinessId, businessId)
|
||||
TRANS_ASSIGNER(Int32, BusinessType, businessType)
|
||||
|
||||
#define TRANS_ASSIGNER_SIZE 30 // Size of TRANS_ASSIGNERS
|
||||
#define TRANS_ASSIGNER_SIZE 32 // Size of TRANS_ASSIGNERS
|
||||
static const HiSysEventParamAssigner TRANS_ASSIGNERS[] = {
|
||||
{ "STAGE_RES", HISYSEVENT_INT32, TransAssignerResult },
|
||||
{ "ERROR_CODE", HISYSEVENT_INT32, TransAssignerErrcode },
|
||||
@ -95,8 +97,10 @@ static const HiSysEventParamAssigner TRANS_ASSIGNERS[] = {
|
||||
{ "FIRST_TOKEN_ID", HISYSEVENT_UINT32, TransAssignerFirstTokenId },
|
||||
{ "FIRST_TOKEN_TYPE", HISYSEVENT_INT32, TransAssignerFirstTokenType},
|
||||
{ "TRAFFIC_STATS", HISYSEVENT_STRING, TransAssignerTrafficStats },
|
||||
{ "OS_TYPE", HISYSEVENT_INT32, TransAssignerOsType },
|
||||
{ "DEVICE_STATE", HISYSEVENT_INT32, TransAssignerDeviceState },
|
||||
{ "OS_TYPE", HISYSEVENT_INT32, TransAssignerOsType },
|
||||
{ "DEVICE_STATE", HISYSEVENT_INT32, TransAssignerDeviceState },
|
||||
{ "BUSINESS_ID", HISYSEVENT_INT32, TransAssignerBusinessId },
|
||||
{ "BUSINESS_TYPE", HISYSEVENT_INT32, TransAssignerBusinessType },
|
||||
// Modification Note: remember updating TRANS_ASSIGNER_SIZE
|
||||
};
|
||||
|
||||
|
@ -99,6 +99,8 @@ typedef struct {
|
||||
const char *trafficStats; // TRAFFIC_STATS
|
||||
int32_t osType; // OS_TYPE
|
||||
int32_t deviceState; // DEVICE_STATE
|
||||
int32_t businessId; // BUSSINESS_ID
|
||||
int32_t businessType; // BUSINESS_TYPE
|
||||
} TransEventExtra;
|
||||
|
||||
typedef enum {
|
||||
|
@ -86,6 +86,8 @@ MATCHER_P2(TransValidParamArrayMatcher, inExtra, validSize, "trans valid param a
|
||||
MatchTransEventNameTypeExtraStrParam(params, ++index, extra.trafficStats);
|
||||
MatchTransEventNameTypeExtraInt32Param(params, ++index, extra.osType);
|
||||
MatchTransEventNameTypeExtraInt32Param(params, ++index, extra.deviceState);
|
||||
MatchTransEventNameTypeExtraInt32Param(params, ++index, extra.businessId);
|
||||
MatchTransEventNameTypeExtraInt32Param(params, ++index, extra.businessType);
|
||||
EXPECT_EQ(++index, validSize);
|
||||
return true;
|
||||
}
|
||||
|
@ -89,6 +89,8 @@ HWTEST_F(TransEventTest, TransEventTest002, TestSize.Level0)
|
||||
.trafficStats = "localpdaihw1f6nknjd2hkfhxljxypkr6kvjsbhnhpp16974uo4fvsrpfa6t50fm",
|
||||
.osType = 10,
|
||||
.deviceState = 1,
|
||||
.businessId = 1,
|
||||
.businessType = 1,
|
||||
};
|
||||
constexpr int32_t VALID_EXTRA_SIZE = TRANS_ASSIGNER_SIZE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user