12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package isapi
- import (
- "github.com/gin-gonic/gin"
- v1 "lc-fangdaosha/api/v1"
- "lc-fangdaosha/middleware"
- )
- type IsApiRouter struct {
- }
- // InitInfoRouter 初始化isapi路由
- func (i *IsApiRouter) InitInfoRouter(Router *gin.RouterGroup) {
- var is = v1.ApiGroupApp.IsApiGroup
- //摄像头系统相关
- sys := Router.Group("/ISAPI/System/")
- {
- sys.GET("deviceInfo", is.GetInfo) //获取设备信息
- sys.GET("capabilities", is.GetCap) //获取设备能力集
- sys.PUT("Network/mailing/1", is.PutEmail) //设置邮件通知
- }
- //摄像头智能事件
- smart := Router.Group("/ISAPI/Smart/").Use(middleware.OperationRecord())
- smartNoRecord := Router.Group("/ISAPI/Smart/")
- {
- //区域入侵
- smartNoRecord.GET("FieldDetection/1/capabilities", is.GetFieldDetection) //获取单个通道区域入侵能力集
- smartNoRecord.GET("channels/1/calibrations/FieldDetection", is.GetSizeFd) //获取区域入侵尺寸
- smart.PUT("channels/1/calibrations/FieldDetection", is.PutSizeFd) //设置区域入侵尺寸
- smartNoRecord.GET("FieldDetection/1", is.GetFieldDetection) //获取单个通道区域入侵规则
- smart.PUT("FieldDetection/1", is.PutFieldDetection) //设置单个通道区域入侵规则
- //越界侦测
- smartNoRecord.GET("LineDetection/1/capabilities", is.GetLineDetectionCap) //获取越界侦测能力集
- smartNoRecord.GET("channels/1/calibrations/linedetection", is.GetSizeLd) //获取越界侦测尺寸
- smart.PUT("channels/1/calibrations/linedetection", is.PutSizeLd) //配置越界侦测的尺寸
- smartNoRecord.GET("LineDetection/1", is.GetLineDetection) //获取越界侦测
- smart.PUT("LineDetection/1", is.PutLineDetection) //设置越界侦测
- //进入区域
- smartNoRecord.GET("regionEntrance/1/capabilities", is.GetRegionEntranceCap) //获取单个通道进入区域能力集
- smartNoRecord.GET("channels/1/calibrations/regionEntrance", is.GetSizeRe) //获取侦测目标的尺寸
- smart.PUT("channels/1/calibrations/regionEntrance", is.PutSizeRe)
- smartNoRecord.GET("regionEntrance/1", is.GetRegionEntrance) //获取单个通道进入区域侦测规则
- smart.PUT("regionEntrance/1", is.PutRegionEntrance) //配置单个通道进入区域侦测规则
- }
- }
|