示例#1
0
        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();
        }
示例#2
0
        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();
        }