Ejemplo n.º 1
0
        private void OnPacketResendLoad()
        {
            // TODO: check GigE part
            if (!IsGEV())
            {
                return;
            }

            GigEConfig        currConfig;
            ManagedGigECamera camera = (ManagedGigECamera)m_camera;

            try
            {
                currConfig = camera.GetGigEConfig();
            }
            catch (FC2Exception ex)
            {
                // TODO: Print error
                Debug.WriteLine(ex.Message);
                ex.Dispose();
                return;
            }

            m_enableGigEPacketResendCheckBox.Checked = currConfig.enablePacketResend;
        }
Ejemplo n.º 2
0
        private void m_enableGigEPacketResendCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            // TODO: check GigE part
            if (!IsGEV())
            {
                return;
            }

            GigEConfig        currConfig;
            ManagedGigECamera camera = (ManagedGigECamera)m_camera;

            try
            {
                currConfig = camera.GetGigEConfig();
            }
            catch (FC2Exception ex)
            {
                // TODO: Print error
                Debug.WriteLine(ex.Message);
                return;
            }

            currConfig.enablePacketResend = m_enableGigEPacketResendCheckBox.Checked;

            try
            {
                camera.SetGigEConfig(currConfig);
            }
            catch (FC2Exception ex)
            {
                // TODO: Print error
                Debug.WriteLine(ex.Message);
                return;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 设置丢帧重传
        /// </summary>
        void SetGigEPacketResend()
        {
            try
            {
#if (SDK)
                ManagedGigECamera managedGigECamera = (ManagedGigECamera)g_ManagedCameraBase;
                GigEConfig        gigEConfig        = managedGigECamera.GetGigEConfig();
                gigEConfig.enablePacketResend = true;
                managedGigECamera.SetGigEConfig(gigEConfig);//设置丢帧重传
#endif
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(NameClass, ex);
            }
        }