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 40多边形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 41 42 43### attribute 44 45``` 46unsigned int GeofencePolygonRequest::attribute 47``` 48 49**描述** 50 51 52设置多边形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 53 54 55### geofenceId 56 57``` 58int GeofencePolygonRequest::geofenceId 59``` 60 61**描述** 62 63 64地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 65 66 67### loiterTimeMs 68 69``` 70unsigned int GeofencePolygonRequest::loiterTimeMs 71``` 72 73**描述** 74 75 76徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。若设备在多边形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md)事件。 77 78 79### monitorTransitions 80 81``` 82unsigned char GeofencePolygonRequest::monitorTransitions 83``` 84 85**描述** 86 87 88关注的多边形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 89 90 91### points 92 93``` 94struct Point [] GeofencePolygonRequest::points 95``` 96 97**描述** 98 99 100多边形地理围栏的边界坐标,仅支持凸多边形。详见[Point](lpfence_point.md)。 101