< Summary - ReFlex - Library

Information
Class: ReFlex.Core.Tuio.Util.TuioConfiguration
Assembly: ReFlex.Core.Tuio
File(s): D:\a\reflex\reflex\library\src\Core\Tuio\Util\TuioConfiguration.cs
Line coverage
100%
Covered lines: 23
Uncovered lines: 0
Coverable lines: 23
Total lines: 76
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_SensorWidth()100%11100%
get_SensorHeight()100%11100%
get_SensorDescription()100%11100%
get_SessionId()100%11100%
get_ServerAddress()100%11100%
get_ServerPort()100%11100%
get_Protocol()100%11100%
get_Transport()100%11100%
get_Interpretation()100%11100%
GetTuioConfigurationString()100%44100%

File(s)

D:\a\reflex\reflex\library\src\Core\Tuio\Util\TuioConfiguration.cs

#LineLine coverage
 1using System;
 2
 3namespace ReFlex.Core.Tuio.Util
 4{
 5    /// <summary>
 6    /// Storage class for all "static" values needed to establish TUIO communication.
 7    /// Includes Meta data about Sensor, Connection and Message Encoding.
 8    /// </summary>
 9    public class TuioConfiguration
 10    {
 11        /// <summary>
 12        /// Horizontal Pixel Resolution of the Sensor for computation of Dimension
 13        /// </summary>
 4914        public int SensorWidth { get; set; }
 15
 16        /// <summary>
 17        /// Vertical Pixel Resolution of the Sensor for computation of Dimension
 18        /// </summary>
 4919        public int SensorHeight { get; set; }
 20
 21        /// <summary>
 22        /// Name of the Sensor for Specifying the Source.
 23        /// </summary>
 4924        public string SensorDescription { get; set; }
 25
 26        /// <summary>
 27        /// Session Id for Alive Messages.
 28        /// </summary>
 4929        public int SessionId { get; set; }
 30
 31        /// <summary>
 32        /// IP of the TUIO Server. Default: "127.0.0.1".
 33        /// </summary>
 11034        public string ServerAddress { get; set; } = "127.0.0.1";
 35
 36        /// <summary>
 37        /// Port number for the TUIO Server. Default: 3333
 38        /// </summary>
 10739        public int ServerPort { get; set; } = 3333;
 40
 41        /// <summary>
 42        /// Specify which Message Format will be used. Default: <see cref="ProtocolVersion.TUIO_VERSION_2_0"/>
 43        /// </summary>
 7344        public ProtocolVersion Protocol { get; set; } = ProtocolVersion.TUIO_VERSION_2_0;
 45
 46        /// <summary>
 47        /// Specify which Transport Protocol to be used for communication with the TUIO Server. Default: <see cref="Tran
 48        /// </summary>
 10449        public TransportProtocol Transport { get; set; } = TransportProtocol.Udp;
 50
 51        /// <summary>
 52        /// Specify which TUIO Type is used to encode the ReFelx interactions. Default: <see cref="TuioInterpretation.To
 53        /// </summary>
 17354        public TuioInterpretation Interpretation { get; set; } = TuioInterpretation.TouchPoint2DwithPressure;
 55
 56        /// <summary>
 57        /// For logging purposes, this returns a well-formed extended string representation of the instance, containing 
 58        /// </summary>
 59        public string GetTuioConfigurationString()
 1460        {
 1461            var result = $"=====  {nameof(TuioConfiguration)}  ====={Environment.NewLine}";
 1462            result += $"  {nameof(SessionId)}: {SessionId}{Environment.NewLine}";
 1463            result +=
 1464                $"  {nameof(SensorDescription)}: {SensorDescription ?? "NONE"} ({nameof(SensorWidth)}: {SensorWidth}, {n
 1465            result +=
 1466                $"  {nameof(ServerAddress)}: {ServerAddress ?? "NONE"} | {nameof(ServerPort)}: {ServerPort}{Environment.
 1467            result += $"  {nameof(ProtocolVersion)}: {Enum.GetName(typeof(ProtocolVersion), Protocol)}{Environment.NewLi
 1468            result +=
 1469                $"  {nameof(TransportProtocol)}: {Enum.GetName(typeof(TransportProtocol), Transport)}{Environment.NewLin
 1470            result +=
 1471                $"  {nameof(TuioInterpretation)}: {Enum.GetName(typeof(TuioInterpretation), Interpretation)}{Environment
 72
 1473            return result;
 1474        }
 75    }
 76}