isapi_system_motionDetection.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package isapi
  2. type MotionDetection struct {
  3. Enabled string `xml:"enabled"`
  4. EnableHighlight string `xml:"enableHighlight"`
  5. SamplingInterval string `xml:"samplingInterval"`
  6. StartTriggerTime string `xml:"startTriggerTime"`
  7. EndTriggerTime string `xml:"endTriggerTime"`
  8. RegionType string `xml:"regionType"`
  9. Grid struct {
  10. RowGranularity string `xml:"rowGranularity"`
  11. ColumnGranularity string `xml:"columnGranularity"`
  12. } `xml:"Grid"`
  13. MotionDetectionLayout struct {
  14. SensitivityLevel string `xml:"sensitivityLevel"`
  15. Layout struct {
  16. GridMap string `xml:"gridMap"`
  17. RegionList struct {
  18. Text string `xml:",chardata"`
  19. Size string `xml:"size,attr"`
  20. Region struct {
  21. ID string `xml:"id"`
  22. RegionCoordinatesList struct {
  23. RegionCoordinates []struct {
  24. PositionX string `xml:"positionX"`
  25. PositionY string `xml:"positionY"`
  26. } `xml:"RegionCoordinates"`
  27. } `xml:"RegionCoordinatesList"`
  28. } `xml:"Region"`
  29. } `xml:"RegionList"`
  30. } `xml:"layout"`
  31. TargetType string `xml:"targetType"`
  32. } `xml:"MotionDetectionLayout"`
  33. }
  34. func (c *Client) GetMotionDetection() ([]byte, error) {
  35. return c.CommonGet("/ISAPI/System/Video/inputs/channels/1/motionDetection")
  36. }
  37. func (c *Client) PutMotionDetection(data []byte) ([]byte, error) {
  38. return c.CommonPut(data, "/ISAPI/System/Video/inputs/channels/1/motionDetection")
  39. }