Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
@@ -0,0 +1,45 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
using System.Net;
using System.Collections.Generic;
using System.Xml.Serialization;
using Config.Entities;
using TBF.Rig.Generic;
namespace TBF.Rig.Network.Comet.Ambient
{
public class AmbientCfg : ComponentCfgBase, IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new AmbientCfgCtrl(); }
///
/// Serialized parameters
///
public string IPAddress;
public int TcpPort;
public string SerialNr;
/// Private parameterless constructor invoked by all other (public) constructors
AmbientCfg() { }
public AmbientCfg(string name, IComponentFactory factory)
: this()
{
this.Name = name;
this.Factory = factory;
IPAddress = "192.168.0.123";
TcpPort = 502;
SerialNr = string.Empty;
}
public string ToString(int i)
{
return string.Format("Name={0}, IP={1}, Port={2}, s/n={3}", Name, IPAddress, TcpPort, SerialNr);
}
}
}