Skip to content

Commit 01729d9

Browse files
author
Mariusz
committed
CommServer.DA.Server - create installation package - working on ProtocolHub.MonitorInterface - refactoring
- changed namespaces to meet common rules - changed version - updated log files Issue #: 4862
1 parent c5bb4e2 commit 01729d9

16 files changed

Lines changed: 77 additions & 73 deletions

File tree

ProtocolHub.Communication/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
[assembly: AssemblyCulture("")]
2929
[assembly: ComVisible(false)]
3030
[assembly: Guid("11b3c9ce-9001-4aaa-bab1-407e3d74dc50")]
31-
[assembly: AssemblyVersion("4.00.24.*")]
32-
[assembly: AssemblyFileVersion("4.00.24")]
31+
[assembly: AssemblyVersion("4.01.0.*")]
32+
[assembly: AssemblyFileVersion("4.01.0")]
3333
[assembly: CAS.Lib.CodeProtect.AssemblyKey( "2D0C30B3-ED45-4292-8CB3-ADB0E739E03E" )]
3434
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
3535
[assembly: CAS.Lib.CodeProtect.AssemblyHelper

ProtocolHub.Communication/ProtocolHub.Communication.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>CAS.CommServer.ProtocolHub.Communication</id>
5-
<version>4.00.24</version>
5+
<version>4.01.0</version>
66
<title>Redundant, multi-protocol, multi-channel communication hub for large scale distributed systems.</title>
77
<authors>CAS</authors>
88
<owners>commsvr.com</owners>

ProtocolHub.CommunicationUnitTests/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
[assembly: AssemblyCulture("")]
2828
[assembly: ComVisible(false)]
2929
[assembly: Guid( "4bdff8b4-038c-44e4-a1c2-6191ba0c591d" )]
30-
[assembly: AssemblyVersion("4.00.24.*")]
31-
[assembly: AssemblyFileVersion("4.00.24")]
30+
[assembly: AssemblyVersion("4.01.0.*")]
31+
[assembly: AssemblyFileVersion("4.01.0")]
3232

ProtocolHub.GraphGUI/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
[assembly: AssemblyCulture("")]
2828
[assembly: Guid("18d193f3-7b85-4c46-8571-d607882cf969")]
2929
[assembly: ComVisible(false)]
30-
[assembly: AssemblyVersion("4.00.24.*")]
31-
[assembly: AssemblyFileVersion("4.00.24")]
30+
[assembly: AssemblyVersion("4.01.0.*")]
31+
[assembly: AssemblyFileVersion("4.01.0")]
3232

ProtocolHub.Monitor/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
[assembly: AssemblyCulture("")]
2828
[assembly: ComVisible(false)]
2929
[assembly: Guid( "f185cedf-d0b6-4762-9d27-385764dff679" )]
30-
[assembly: AssemblyVersion("4.00.24.*")]
31-
[assembly: AssemblyFileVersion("4.00.24")]
30+
[assembly: AssemblyVersion("4.01.0.*")]
31+
[assembly: AssemblyFileVersion("4.01.0")]
3232

ProtocolHub.MonitorInterface/BaseStation/Management/Statistics.InterfaceStatistics.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
// http://www.cas.eu
1414
//_______________________________________________________________
1515

16-
using CAS.Lib.CommServerConsoleInterface;
1716
using CAS.Lib.RTLib.Management;
1817
using System;
1918

20-
namespace BaseStation.Management
19+
namespace CAS.CommServer.ProtocolHub.MonitorInterface
2120
{
2221
/// <summary>
2322
/// Communication statistics management class
@@ -428,22 +427,22 @@ public InterfaceStatistics(string name, ulong interfaceNumber, IInterface2Segmen
428427
/// <summary>
429428
/// variable resposible for row color changing
430429
/// </summary>
431-
private static bool changecolor = true;
430+
private static bool changeColor = true;
432431
/// <summary>
433432
/// returns row color class
434433
/// </summary>
435434
private string RowClass
436435
{
437436
get
438437
{
439-
changecolor = !changecolor;
440-
if (changecolor)
438+
changeColor = !changeColor;
439+
if (changeColor)
441440
return "k41";
442441
return "k4";
443442
}
444443
}
445444
/// <summary>
446-
/// this function is for retreiving description fot this object in the HTML
445+
/// this function is for retrieving description fot this object in the HTML
447446
/// </summary>
448447
/// <returns>string with HTML output</returns>
449448
public string GetHtmlTableRowDescription()
@@ -476,7 +475,7 @@ public string ToHtmlTableRow()
476475
return ret;
477476
}
478477
/// <summary>
479-
/// this function is for retreiving data that represens that object (data + description)
478+
/// this function is for retrieving data that represents that object (data + description)
480479
/// </summary>
481480
/// <returns>string with HTML data</returns>
482481
public string ToHtml()

ProtocolHub.MonitorInterface/BaseStation/Management/Statistics.SegmentStatistics.cs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
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;
1817
using CAS.Lib.RTLib.Management;
18+
using CAS.Lib.RTLib.Processes;
1919
using CAS.Lib.RTLib.Utils;
2020
using System;
21+
using System.Collections;
2122
using System.Text;
2223
using 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

ProtocolHub.MonitorInterface/BaseStation/Management/Statistics.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
using CAS.Lib.RTLib.Management;
1818
using CAS.Lib.RTLib.Processes;
1919
using System;
20+
using System.Threading;
2021
using CommunicationDSC = CAS.NetworkConfigLib.ComunicationNet;
2122

22-
namespace BaseStation.Management
23+
namespace CAS.CommServer.ProtocolHub.MonitorInterface
2324
{
2425
/// <summary>
2526
/// class that allows logging from statistics related classes - source "CAS.BaseStation.Management.Statistics"
@@ -105,7 +106,7 @@ static Metronom()
105106
new System.Threading.ThreadStart( MonitoringMet ),
106107
"Metronom",
107108
true,
108-
System.Threading.ThreadPriority.Normal
109+
ThreadPriority.Normal
109110
);
110111
}
111112
#endregion

ProtocolHub.MonitorInterface/IInterface2SegmentLink.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,39 @@
77
// $LastChangedBy$
88
// $URL$
99
// $Id$
10-
// History :
11-
// MPostol: created
10+
1211
//
1312
// Copyright (C)2006, CAS LODZ POLAND.
1413
// TEL: +48 (42) 686 25 47
1514
// mailto:techsupp@cas.com.pl
1615
// http:\\www.cas.eu
1716
//</summary>
18-
using System;
19-
namespace CAS.Lib.CommServerConsoleInterface
17+
18+
namespace CAS.CommServer.ProtocolHub.MonitorInterface
2019
{
20+
2121
/// <summary>
2222
/// Interlink between the Interface and Segment statistic object
2323
/// </summary>
2424
public interface IInterface2SegmentLink
2525
{
26+
2627
/// <summary>
2728
/// Adds the interface.
2829
/// </summary>
29-
/// <param name="iNtrerface">The intrerface.</param>
30-
void AddInterface( BaseStation.Management.Statistics.InterfaceStatistics iNtrerface );
30+
/// <param name="interfaceStatistics">The interface statistics.</param>
31+
void AddInterface(Statistics.InterfaceStatistics interfaceStatistics);
3132
/// <summary>
3233
/// Gets the protocol statistics.
3334
/// </summary>
3435
/// <param name="counters">The counters.</param>
3536
/// <param name="isAnySuccess">if set to <c>true</c> means any success.</param>
36-
void GetProtocolStatistics( ref uint[] counters, out bool isAnySuccess );
37+
void GetProtocolStatistics(ref uint[] counters, out bool isAnySuccess);
3738
/// <summary>
3839
/// Gets the get OPC prefix.
3940
/// </summary>
4041
/// <value>The get OPC prefix.</value>
41-
string GetOPCPrefix { get;}
42+
string GetOPCPrefix { get; }
43+
4244
}
4345
}
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
//<summary>
2-
// Title : Interface of the Segment Statistics
3-
// System : Microsoft Visual C# .NET 2005
1+
//_______________________________________________________________
2+
// Title : ISegmentStatistics
3+
// System : Microsoft VisualStudio 2015 / C#
44
// $LastChangedDate$
55
// $Rev$
66
// $LastChangedBy$
77
// $URL$
88
// $Id$
9-
// History :
10-
// MPostol creatyed
119
//
12-
// Copyright (C)2006, CAS LODZ POLAND.
13-
// TEL: +48 (42) 686 25 47
14-
// mailto:techsupp@cas.com.pl
15-
// http:\\www.cas.eu
16-
//</summary>
17-
using System;
18-
namespace CAS.Lib.CommServerConsoleInterface
10+
// Copyright (C) 2017, CAS LODZ POLAND.
11+
// TEL: +48 608 61 98 99
12+
// mailto://techsupp@cas.eu
13+
// http://www.cas.eu
14+
//_______________________________________________________________
15+
16+
namespace CAS.CommServer.ProtocolHub.MonitorInterface
1917
{
18+
2019
/// <summary>
2120
/// Interface of the Segment Statistics
2221
/// </summary>
2322
public interface ISegmentStatistics: IInterface2SegmentLink
2423
{
24+
2525
/// <summary>
2626
/// Marks the Segment connection failure.
2727
/// </summary>
@@ -30,13 +30,14 @@ public interface ISegmentStatistics: IInterface2SegmentLink
3030
/// Sets the new state.
3131
/// </summary>
3232
/// <value>The new state.</value>
33-
BaseStation.Management.Statistics.SegmentStatistics.States NewState { set; }
33+
Statistics.SegmentStatistics.States NewState { set; }
3434
/// <summary>
3535
/// Sets the overtime coefficients.
3636
/// </summary>
3737
/// <param name="min">The min. value</param>
3838
/// <param name="max">The max. value</param>
3939
/// <param name="avr">The average value</param>
4040
void SetOvertimeCoefficient( long min, long max, long avr );
41+
4142
}
4243
}

0 commit comments

Comments
 (0)