AForge.Robotics.Surveyor.SRV1.SetResolution C# (CSharp) Method

SetResolution() public method

Set video resolution.

Setting higher quality level and resolution may increase delays for other requests sent to SRV-1. So if robot is used not only for video, but also for controlling servos/motors, and higher response level is required, then do not set very high quality and resolution.

Invalid resolution was specified.
public SetResolution ( VideoResolution resolution ) : void
resolution VideoResolution Video resolution to set.
return void
        public void SetResolution( VideoResolution resolution )
        {
            if ( !Enum.IsDefined( typeof( VideoResolution ), resolution ) )
            {
                throw new ArgumentException( "Invalid resolution was specified." );
            }

            Send( new byte[] { (byte) resolution } );
        }

Usage Example

Esempio n. 1
0
 /// <summary>
 /// Set video resolution.
 /// </summary>
 ///
 /// <param name="resolution">Video resolution to set.</param>
 ///
 /// <remarks>
 /// <para><note>Setting higher <see cref="SetQuality">quality level</see> and resolution
 /// may increase delays for other requests processed by <see cref="SRV1"/> class. So if
 /// robot is used not only for video, but also for controlling servos/motors, and higher
 /// response level is required, then do not set very high quality and resolution.
 /// </note></para>
 /// </remarks>
 ///
 public void SetResolution(SRV1.VideoResolution resolution)
 {
     communicator.SetResolution(resolution);
 }