package isapi //能力 //http://192.168.110.165/ISAPI/Smart/LineDetection/1/capabilities //http://192.168.110.165/ISAPI/Smart/channels/1/calibrations/capabilities // LineDetection 越界侦测 type LineDetection struct { ID string `xml:"id"` Enabled string `xml:"enabled"` NormalizedScreenSize struct { NormalizedScreenWidth string `xml:"normalizedScreenWidth"` NormalizedScreenHeight string `xml:"normalizedScreenHeight"` } `xml:"normalizedScreenSize"` LineItemList struct { Size string `xml:"size,attr"` LineItem []struct { ID string `xml:"id"` Enabled string `xml:"enabled"` SensitivityLevel string `xml:"sensitivityLevel"` DirectionSensitivity string `xml:"directionSensitivity"` DetectionTarget string `xml:"detectionTarget"` AlarmConfidence struct { Text string `xml:",chardata"` Opt string `xml:"opt,attr"` } `xml:"alarmConfidence"` CoordinatesList struct { Coordinates []struct { PositionX string `xml:"positionX"` PositionY string `xml:"positionY"` } `xml:"Coordinates"` } `xml:"CoordinatesList"` } `xml:"LineItem"` } `xml:"LineItemList"` IsSupportMultiScene string `xml:"isSupportMultiScene"` RecogRuleType string `xml:"recogRuleType"` } func (c *Client) GetLineDetectionCap() ([]byte, error) { return c.CommonGet("/ISAPI/Smart/LineDetection/1/capabilities") } func (c *Client) GetSizeLd() ([]byte, error) { return c.CommonGet("/ISAPI/Smart/channels/1/calibrations/linedetection") } func (c *Client) PutSizeLd(data []byte) ([]byte, error) { return c.CommonPut(data, "/ISAPI/Smart/channels/1/calibrations/linedetection") } // GetLineDetection 获取单个通道越界侦测规则 func (c *Client) GetLineDetection() ([]byte, error) { return c.CommonGet("/ISAPI/Smart/LineDetection/1") } // PutLineDetection 配置单个通道越界侦测规则 func (c *Client) PutLineDetection(data []byte) ([]byte, error) { return c.CommonPut(data, "/ISAPI/Smart/LineDetection/1") }