• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# GeofencePolygonRequest
2
3
4## 概述
5
6定义添加多边形地理围栏的数据结构。
7
8**起始版本:** 4.0
9
10**相关模块:**[HdiLpfenceGeofence](_hdi_lpfence_geofence.md)
11
12
13## 汇总
14
15
16### Public 属性
17
18| 名称 | 描述 |
19| -------- | -------- |
20| int [geofenceId](#geofenceid) | 地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 |
21| struct [Point](lpfence_point.md)[] [points](#points) | 多边形地理围栏的边界坐标,仅支持凸多边形。详见[Point](lpfence_point.md)。 |
22| unsigned short [accuracy](#accuracy) | 多边形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 |
23| unsigned int [loiterTimeMs](#loitertimems) | 徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。若设备在多边形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。 |
24| unsigned char [monitorTransitions](#monitortransitions) | 关注的多边形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 |
25| unsigned int [attribute](#attribute) | 设置多边形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 |
26
27
28## 类成员变量说明
29
30
31### accuracy
32
33```
34unsigned short GeofencePolygonRequest::accuracy
35```
36
37**描述**
38
39多边形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。
40
41
42### attribute
43
44```
45unsigned int GeofencePolygonRequest::attribute
46```
47
48**描述**
49
50设置多边形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。
51
52
53### geofenceId
54
55```
56int GeofencePolygonRequest::geofenceId
57```
58
59**描述**
60
61地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。
62
63
64### loiterTimeMs
65
66```
67unsigned int GeofencePolygonRequest::loiterTimeMs
68```
69
70**描述**
71
72徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。若设备在多边形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。
73
74
75### monitorTransitions
76
77```
78unsigned char GeofencePolygonRequest::monitorTransitions
79```
80
81**描述**
82
83关注的多边形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。
84
85
86### points
87
88```
89struct Point [] GeofencePolygonRequest::points
90```
91
92**描述**
93
94多边形地理围栏的边界坐标,仅支持凸多边形。详见[Point](lpfence_point.md)。
95