当前位置:网站首页>What is the reason why the video intelligent analysis platform easycvr is locally controllable but the superior equipment cannot control the subordinate equipment?

What is the reason why the video intelligent analysis platform easycvr is locally controllable but the superior equipment cannot control the subordinate equipment?

2022-06-24 12:24:00 Tsingsee green rhino video

As we all know EasyCVR It is a video platform that supports a wide range of protocols , Therefore, it is compatible with the advantages of many protocols , For example, support PTZ control equipment , It also supports cascading platforms through different protocols . In the near future EasyCVR During the test, it appears that the local platform can control the subordinate equipment through the PTZ , However, the superior equipment cannot control the situation of the subordinate equipment .

In view of this situation , We did packet capturing analysis .

Through packet capturing analysis , You can view the control messages sent by the superior , It is normally sent and responded to at this level , But when it is forwarded to the lower level through the current level , Subordinate replies 400 error .

At this point, the problem is found , because EasyCVR Cascaded channels and the reality of lower level devices id Dissimilarity , So when sending control commands to subordinates through superiors , You need to convert again at the lower level , Add the following code :

gbDevID := gbsChns[0].DeviceID
sipDev := uas.Server.GetDevice(gbDevID)
if sipDev == nil {
   log.Println(" cascade MakePTZControlRequest error ")
   return
}
reqControl, _, err = uas.Server.MakeDragZoomInControlRequest(code, uas.Server.Realm, length, width, midPointX, midPointY, lengthX, lengthY)
if err != nil {
   log.Println(" cascade MakeDragZoomInControlRequest error ", err)
   return
}
err = reqControl.SendByTransport(sipDev.Transport)
if err != nil {
   log.Println(" Cascade transmission MakePTZControlRequest error ", err)
   return
}

Send the control message through the superior again , And grab the bag to check , It is found that the information can be sent normally .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210602191027293l.html