1# HapticEvent 2 3 4## 概述 5 6表示振动事件。 7 8参数包含振动时间,强度,频率等等。 9 10**起始版本:** 4.1 11 12**相关模块:**[Vibrator](_vibrator_v12.md) 13 14 15## 汇总 16 17 18### Public 属性 19 20| 名称 | 描述 | 21| -------- | -------- | 22| enum [EVENT_TYPE](_vibrator_v12.md#event_type)[type](#type) | 振动类型。 | 23| int [time](#time) | 时间。 | 24| int [duration](#duration) | 振动延时。 | 25| int [intensity](#intensity) | 振动强度。 | 26| int [frequency](#frequency) | 振动频率。 | 27| int [index](#index) | 马达id。表示振动的是哪个马达。 | 28| int [pointNum](#pointnum) | 振动点数量。 | 29| struct [CurvePoint](_curve_point_v12.md)[] [points](#points) | 振动点数组。 | 30 31 32## 类成员变量说明 33 34 35### duration 36 37``` 38int HapticEvent::duration 39``` 40**描述** 41 42振动延时。 43 44 45### frequency 46 47``` 48int HapticEvent::frequency 49``` 50**描述** 51 52振动频率。 53 54 55### index 56 57``` 58int HapticEvent::index 59``` 60**描述** 61 62马达id。表示振动的是哪个马达。 63 64 65### intensity 66 67``` 68int HapticEvent::intensity 69``` 70**描述** 71 72振动强度。 73 74 75### pointNum 76 77``` 78int HapticEvent::pointNum 79``` 80**描述** 81 82振动点数量。 83 84 85### points 86 87``` 88struct CurvePoint [] HapticEvent::points 89``` 90**描述** 91 92振动点数组。 93 94 95### time 96 97``` 98int HapticEvent::time 99``` 100**描述** 101 102时间。 103 104 105### type 106 107``` 108enum EVENT_TYPE HapticEvent::type 109``` 110**描述** 111 112振动类型。 113