52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
///
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
///
|
|
using System.Net;
|
|
using System.Net.Sockets;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
using TBF.Resources;
|
|
|
|
namespace TBF.BenchControl.Network.Camera.CLP1611
|
|
{
|
|
public class CameraCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(CameraCfg) })[0];
|
|
protected override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new CameraCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int HardwareAddress;
|
|
public bool DisplayTerminal;
|
|
public bool UseTestImages;
|
|
public int TestImagesCount;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
CameraCfg() { }
|
|
|
|
public CameraCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
ParentName = "Network.Adapter";
|
|
HardwareAddress = 1;
|
|
UseTestImages = false;
|
|
TestImagesCount = 0;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, s/n={1}, Terminal={2}, Use test images={3}, Parent={4}",
|
|
Name,
|
|
HardwareAddress,
|
|
DisplayTerminal ? Strings.yes : Strings.no,
|
|
UseTestImages ? Strings.yes : Strings.no,
|
|
ParentName);
|
|
}
|
|
}
|
|
}
|