1313// http://www.cas.eu
1414//_______________________________________________________________
1515
16- using CAS . Lib . CommServerConsoleInterface ;
17- using CAS . Lib . CommServerConsoleInterface . Properties ;
16+ using CAS . CommServer . ProtocolHub . MonitorInterface . Properties ;
1817using CAS . Lib . RTLib . Management ;
18+ using CAS . Lib . RTLib . Processes ;
1919using CAS . Lib . RTLib . Utils ;
2020using System ;
21+ using System . Collections ;
2122using System . Text ;
2223using CommunicationDSC = CAS . NetworkConfigLib . ComunicationNet ;
2324
24- namespace BaseStation . Management
25+ namespace CAS . CommServer . ProtocolHub . MonitorInterface
2526{
2627
2728 /// <summary>
@@ -39,16 +40,16 @@ public abstract class SegmentStatistics: Metronom.RefreshAble, IHtmlOutput, ISeg
3940
4041 #region PRIVATE
4142 private readonly DateTime startTime = DateTime . Now ;
42- private System . Collections . ArrayList interfaceList = new System . Collections . ArrayList ( ) ;
43+ private ArrayList interfaceList = new ArrayList ( ) ;
4344 private ChannelStatistics myChannel ;
44- private CAS . Lib . RTLib . Processes . Stopwatch SW_WriteDelay = new CAS . Lib . RTLib . Processes . Stopwatch ( ) ;
45- private CAS . Lib . RTLib . Processes . Stopwatch SW_ReadDelay = new CAS . Lib . RTLib . Processes . Stopwatch ( ) ;
46- private CAS . Lib . RTLib . Processes . Stopwatch SW_ConnectTime = new CAS . Lib . RTLib . Processes . Stopwatch ( ) ;
45+ private Stopwatch SW_WriteDelay = new Stopwatch ( ) ;
46+ private Stopwatch SW_ReadDelay = new Stopwatch ( ) ;
47+ private Stopwatch SW_ConnectTime = new Stopwatch ( ) ;
4748 //this region is used for updating OPC tags
4849 /// <summary>
4950 /// connect time
5051 /// </summary>
51- private CAS . Lib . RTLib . Processes . Stopwatch connectTime = new CAS . Lib . RTLib . Processes . Stopwatch ( ) ;
52+ private Stopwatch connectTime = new Stopwatch ( ) ;
5253 /// <summary>
5354 /// MinMaxAvr Read Delay
5455 /// </summary>
@@ -143,8 +144,8 @@ public States NewStateUpdateStatistics
143144 myStat . ConnMadeCount ++ ;
144145 voidV = SW_ReadDelay . Stop ;
145146 voidV = SW_WriteDelay . Stop ;
146- mmaReadDelay . Add = ( long ) CAS . Lib . RTLib . Processes . Stopwatch . ConvertTo_ms ( SW_ReadDelay . Reset ) ;
147- mmaWriteDelay . Add = ( long ) CAS . Lib . RTLib . Processes . Stopwatch . ConvertTo_ms ( SW_WriteDelay . Reset ) ;
147+ mmaReadDelay . Add = ( long ) Stopwatch . ConvertTo_ms ( SW_ReadDelay . Reset ) ;
148+ mmaWriteDelay . Add = ( long ) Stopwatch . ConvertTo_ms ( SW_WriteDelay . Reset ) ;
148149 voidV = connectTime . Start ;
149150 SW_ConnectTime . StartReset ( ) ;
150151 break ;
@@ -507,10 +508,10 @@ void IInterface2SegmentLink.GetProtocolStatistics( ref uint[] counters, out bool
507508 /// <summary>
508509 /// Adds the interface.
509510 /// </summary>
510- /// <param name="intr">The intr .</param>
511- void IInterface2SegmentLink . AddInterface ( InterfaceStatistics intr )
511+ /// <param name="interfaceStatistics">An object encapsulating interface statistic .</param>
512+ void IInterface2SegmentLink . AddInterface ( InterfaceStatistics interfaceStatistics )
512513 {
513- interfaceList . Add ( intr ) ;
514+ interfaceList . Add ( interfaceStatistics ) ;
514515 }
515516 /// <summary>
516517 /// Gets the get OPC prefix.
@@ -520,7 +521,7 @@ void IInterface2SegmentLink.AddInterface( InterfaceStatistics intr )
520521 #endregion
521522 #region HMI
522523 /// <summary>
523- /// Dalegate that is used when state is changed
524+ /// Delegate that is used when state is changed
524525 /// </summary>
525526 public delegate void StateChanged ( States currState ) ;
526527 /// <summary>
@@ -535,7 +536,7 @@ public ulong ConnectTime
535536 {
536537 get
537538 {
538- myStat . ConnectTime = CAS . Lib . RTLib . Processes . Stopwatch . ConvertTo_s ( connectTime . Read ) ;
539+ myStat . ConnectTime = Stopwatch . ConvertTo_s ( connectTime . Read ) ;
539540 return myStat . ConnectTime ;
540541 }
541542 }
@@ -585,9 +586,9 @@ public bool Connected
585586 get { return myStat . Connected ; }
586587 }
587588 /// <summary>
588- /// Gets the get made (successfull connections) count.
589+ /// Gets the get made (successful connections) count.
589590 /// </summary>
590- /// <value>The get made(successfull connections) count.</value>
591+ /// <value>The get made(successful connections) count.</value>
591592 public string GetMadeCount
592593 {
593594 get { return myStat . GetMadeCount ; }
@@ -611,6 +612,7 @@ public string GetOvertimeCoefficient
611612 return myStat . GetOvertimeCoefficient ;
612613 }
613614 }
615+
614616 #region MinMaxAvgReaders
615617 //WriteDelay
616618 /// <summary>
@@ -736,6 +738,7 @@ void ISegmentStatistics.SetOvertimeCoefficient( long min, long max, long avr )
736738 myStat . SetOvertimeCoefficient ( min , max , avr ) ;
737739 }
738740 #endregion
741+
739742 #region creator
740743 /// <summary>
741744 /// Initializes a new instance of the <see cref="SegmentStatistics"/> class.
@@ -765,6 +768,7 @@ public SegmentStatistics( CommunicationDSC.SegmentsRow currDsc, ChannelStatistic
765768 }
766769
767770 #endregion
771+
768772 #endregion PUBLIC
769773
770774 #region IHtmlOutput Members
0 commit comments