public PanTiltControlManager(string webApiBaseUri) { ClientHub = new CCTVDefaultInfoSync(webApiBaseUri); _control = new CameraControlManager(ClientHub, CCTV1Info); ClientHub.RegisterDefault(CCTVInfoType.GlobalInfo, TimeSpan.Zero, onGlobalInfoUpdate); ClientHub.RegisterDefault(CCTVInfoType.StaticInfo, TimeSpan.FromSeconds(60)); ClientHub.RegisterDefault(CCTVInfoType.ControlConfig, TimeSpan.FromSeconds(60)); ClientHub.UpdateAllDefault(); }
private void init() { string webApiBaseUri = ConfigHandler.GetValue <VideoInfoPlugin>("WebApiBaseUri"); ClientHub = new CCTVDefaultInfoSync(webApiBaseUri); ClientHub.RegisterDefault(CCTVInfoType.GlobalInfo, TimeSpan.Zero, onGlobalInfoUpdate); ClientHub.RegisterDefaultWithoutUpdate(CCTVInfoType.StaticInfo); ClientHub.RegisterDefaultWithoutUpdate(CCTVInfoType.ControlConfig); _lastSITick = _lastCCTick = Environment.TickCount; ClientHub.UpdateAllDefault(); }