1. 增加 GetDVRDeviceConfig函数

2. 增加 NET_DVR_FindNextFile_V30 函数
3. 增加 NET_DVR_FindFile_V30 函数
4. 增加 新的 Go 数据模型
5. 规范化 Go 数据模型
6. 调整部分的 C 头文件中的结构体,以修复 CGo 无法识别函数参数类型的问题(https://stackoverflow.com/questions/59353668/get-the-struct-from-c-to-golang)
7. 简化球机退出登陆
8. 实现 NVR 相关接口
9. 编写 NVR 接口测试用例
This commit is contained in:
kunmeng
2025-03-21 10:06:00 +08:00
parent 7fa66f4bae
commit fc62a966db
6 changed files with 717 additions and 92 deletions

33
Nvr_test.go Normal file
View File

@@ -0,0 +1,33 @@
package HikSDK
import (
"gitea.com/kunmeng/HikNetSDKPkg/Core"
"testing"
)
func TestNewNvr(t *testing.T) {
err := Core.Init()
if err != nil {
t.Error(err)
return
}
nvr, err := NewNvr("192.168.211.124", 8000, "admin", "guanyaokeji8520")
if err != nil {
t.Error(err)
}
diff, err := nvr.getNvrUTCDiff()
if err != nil {
return
}
t.Log(diff)
month, err := nvr.CheckTimeRegionWithMonth(2025, 3, 1)
if err != nil {
return
}
t.Log(month)
timeList, err := nvr.CheckTimeRegionWithDay(2025, 3, 20, 1)
if err != nil {
return
}
t.Log(timeList)
}