1. NVR 和 BallCamera 添加 Status 功能
This commit is contained in:
		
							
								
								
									
										8
									
								
								Nvr.go
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Nvr.go
									
									
									
									
									
								
							| @@ -28,7 +28,7 @@ func NewNvr(Ip string, Port int, Username, Password string) (*Nvr, error) { | ||||
| 	}, nil | ||||
| } | ||||
|  | ||||
| func (this *Nvr) getNvrUTCDiff() (int, error) { | ||||
| func (this *Nvr) GetTimeZone() (int, error) { | ||||
| 	var data Core.NET_DVR_NETAPPCFG | ||||
| 	var dataPtr = unsafe.Pointer(data.GetCPtr()) | ||||
| 	err := Core.GetDVRConfig(this.userId, 222, 0, dataPtr, Core.DWORD(unsafe.Sizeof(data.GetC()))) | ||||
| @@ -105,7 +105,7 @@ func (this *Nvr) CheckTimeRegionWithDay(Year, Month, Day, Channel uint16) ([]Tim | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	ByUTCDiff, err := this.getNvrUTCDiff() | ||||
| 	ByUTCDiff, err := this.GetTimeZone() | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| @@ -166,6 +166,10 @@ func (this *Nvr) Logout() error { | ||||
| 	return Core.Logout(this.userId) | ||||
| } | ||||
|  | ||||
| func (this *Nvr) Status() bool { | ||||
| 	return Core.NET_DVR_RemoteControl(this.userId) | ||||
| } | ||||
|  | ||||
| type TimeRange struct { | ||||
| 	StartTime time.Time | ||||
| 	EndTime   time.Time | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kunmeng
					kunmeng