Clean-up, minor changes.
This commit is contained in:
@@ -76,6 +76,7 @@ namespace TBF.Rig
|
|||||||
Busy, /// Useful when waiting in state until at least one is busy (all are done)
|
Busy, /// Useful when waiting in state until at least one is busy (all are done)
|
||||||
Done, /// Useful when waiting in state until the first is done, the rest miht still be busy
|
Done, /// Useful when waiting in state until the first is done, the rest miht still be busy
|
||||||
MakeSecondPass, /// Test completed OK but 2nd pass (evaluation) is required
|
MakeSecondPass, /// Test completed OK but 2nd pass (evaluation) is required
|
||||||
|
EndSession, /// Test completed OK (similarly to Event.Done), 'End session' button click is automatically invoked
|
||||||
///
|
///
|
||||||
ModelessFormIsOpen,
|
ModelessFormIsOpen,
|
||||||
ModelessFormClosed,
|
ModelessFormClosed,
|
||||||
|
|||||||
@@ -98,15 +98,8 @@ namespace TBF.Rig.RegisterReaders.DataStream.Reader
|
|||||||
/// <param name="repetitionNr">Currently executed repetition number</param>
|
/// <param name="repetitionNr">Currently executed repetition number</param>
|
||||||
public void TestIsGoingToStartSoon(Config.Entities.Test test, int repetitionNr)
|
public void TestIsGoingToStartSoon(Config.Entities.Test test, int repetitionNr)
|
||||||
{
|
{
|
||||||
/// Store/update values to be used as a part of the opto-data log file name
|
/// Nothing needs to be updated
|
||||||
testName = test.Name;
|
|
||||||
testRepeats = test.Repeats;
|
|
||||||
this.repetitionNr = repetitionNr;
|
|
||||||
}
|
}
|
||||||
///
|
|
||||||
string testName;
|
|
||||||
int testRepeats;
|
|
||||||
int repetitionNr;
|
|
||||||
|
|
||||||
|
|
||||||
/// To be used at the beginning of a test
|
/// To be used at the beginning of a test
|
||||||
|
|||||||
@@ -1,52 +1,61 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using Common;
|
using Common;
|
||||||
|
using Config.Entities;
|
||||||
using TBF.Rig.Generic;
|
using TBF.Rig.Generic;
|
||||||
|
|
||||||
namespace TBF.Rig.RegisterReaders.SerialStream
|
namespace TBF.Rig.RegisterReaders.SerialStream
|
||||||
{
|
{
|
||||||
public class SerialStreamCfg : ComponentCfgBase, Generic.IComponentCfg
|
public class SerialStreamCfg : ComponentCfgBase, IComponentCfg, IParamsProvider
|
||||||
{
|
{
|
||||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(SerialStreamCfg) })[0];
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(SerialStreamCfg) })[0];
|
||||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||||
|
|
||||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new SerialStreamCfgCtrl(); }
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new Configs.ParamsProvider.ComponentCfgCtrl(this, null); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Serialized parameters
|
/// Serialized parameters
|
||||||
///
|
///
|
||||||
public int ComPortNr;
|
public int ComPortNr;
|
||||||
public int BaudRate;
|
public int BaudRate;
|
||||||
public Parity Parity;
|
public Parity Parity;
|
||||||
public int DataBits;
|
public int DataBits;
|
||||||
public StopBits StopBits;
|
public StopBits StopBits;
|
||||||
public Handshake Handshake;
|
public Handshake Handshake;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Procedure parameters
|
/// Procedure parameters
|
||||||
///
|
///
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public ProcParams ProcParams;
|
public ProcParams ProcParams;
|
||||||
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
||||||
public override IParamsProvider CreateProcParamsProvider() { return new ProcParams(true); }
|
public override IParamsProvider CreateProcParamsProvider() { return new ProcParams(true); }
|
||||||
|
|
||||||
/// Private parameterless constructor invoked by all other (public) constructors
|
/// Private parameterless constructor invoked by all other (public) constructors
|
||||||
SerialStreamCfg()
|
SerialStreamCfg()
|
||||||
{
|
{
|
||||||
ProcParams = CreateProcParamsProvider() as ProcParams;
|
ProcParams = CreateProcParamsProvider() as ProcParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SerialStreamCfg(string name, IComponentFactory factory)
|
public SerialStreamCfg(string name, IComponentFactory factory)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
Factory = factory;
|
Factory = factory;
|
||||||
ParentName = string.Empty;
|
ParentName = string.Empty;
|
||||||
ComPortNr = 21;
|
InitializeAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ComponentName { get { return Name; } }
|
||||||
|
|
||||||
|
public void InitializeAll()
|
||||||
|
{
|
||||||
|
ComPortNr = 3;
|
||||||
BaudRate = 9600;
|
BaudRate = 9600;
|
||||||
Parity = System.IO.Ports.Parity.None;
|
Parity = System.IO.Ports.Parity.None;
|
||||||
DataBits = 8;
|
DataBits = 8;
|
||||||
@@ -54,10 +63,120 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
|||||||
Handshake = System.IO.Ports.Handshake.None;
|
Handshake = System.IO.Ports.Handshake.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ToString(int i)
|
string[] paramNames = new string[]
|
||||||
{
|
{
|
||||||
return string.Format("{0} Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
"Serial port number", /// 0
|
||||||
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
"Baud rate", /// 1
|
||||||
|
"Parity", /// 2
|
||||||
|
"Data bits", /// 3
|
||||||
|
"Stop bits", /// 4
|
||||||
|
"Handshake", /// 5
|
||||||
|
};
|
||||||
|
public string ParamName(int i) { return paramNames[i]; }
|
||||||
|
public int ParamsCount() { return paramNames.Length; }
|
||||||
|
|
||||||
|
public ICollection<string> ParamValues(int i)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
return new string[] { "150", "300", "600", "1200", "2400", "4800", "9600",
|
||||||
|
"19200", "38400", "57600", "76800", "115200"};
|
||||||
|
case 2:
|
||||||
|
return new string[] { Parity.None.ToString(), Parity.Odd.ToString(), Parity.Even.ToString() };
|
||||||
|
case 3:
|
||||||
|
return new string[] { "7", "8" };
|
||||||
|
case 4:
|
||||||
|
return new string[] { StopBits.None.ToString(),
|
||||||
|
StopBits.One.ToString(),
|
||||||
|
StopBits.OnePointFive.ToString(),
|
||||||
|
StopBits.Two.ToString() };
|
||||||
|
case 5:
|
||||||
|
return new string[] { Handshake.None.ToString(),
|
||||||
|
Handshake.XOnXOff.ToString(),
|
||||||
|
Handshake.RequestToSend.ToString(),
|
||||||
|
Handshake.RequestToSendXOnXOff.ToString() };
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public string ToString(int i)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0: return ComPortNr.ToString();
|
||||||
|
case 1: return BaudRate.ToString();
|
||||||
|
case 2: return Parity.ToString();
|
||||||
|
case 3: return DataBits.ToString();
|
||||||
|
case 4: return StopBits.ToString();
|
||||||
|
case 5: return Handshake.ToString();
|
||||||
|
default:
|
||||||
|
return string.Format("{0}: Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
||||||
|
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CfgUpdateFlags UpdateParam(int i, string str)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0: ComPortNr = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
case 1: BaudRate = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
case 2: Parity = Common.Utils.GetParity(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
case 3: DataBits = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
case 4: StopBits = Common.Utils.GetStopBits(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
case 5: Handshake = Common.Utils.GetHandshake(str); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
default: return CfgUpdateFlags.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ValidateParam(int i, string strValue, out string message)
|
||||||
|
{
|
||||||
|
message = string.Empty;
|
||||||
|
int idummy;
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if (int.TryParse(strValue, out idummy) && idummy > 0) return true;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
if (ParamValues(i).Contains(strValue)) return true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
message = "Invalid index";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
message = ParamName(i) + " is invalid";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CopyContentTo(SerialStreamCfg prms)
|
||||||
|
{
|
||||||
|
prms.ComPortNr = this.ComPortNr;
|
||||||
|
prms.BaudRate = this.BaudRate;
|
||||||
|
prms.Parity = this.Parity;
|
||||||
|
prms.DataBits = this.DataBits;
|
||||||
|
prms.StopBits = this.StopBits;
|
||||||
|
prms.Handshake = this.Handshake;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IParamsProvider Clone()
|
||||||
|
{
|
||||||
|
SerialStreamCfg pars = new SerialStreamCfg();
|
||||||
|
CopyContentTo(pars);
|
||||||
|
return pars;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpdateEmbeddedDbEntity()
|
||||||
|
{
|
||||||
|
return true; /// =OK, do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
///
|
|
||||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
|
||||||
///
|
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.IO.Ports;
|
|
||||||
using Common;
|
|
||||||
using Config.Entities;
|
|
||||||
using TBF.Rig.Generic;
|
|
||||||
using TBF.Resources;
|
|
||||||
|
|
||||||
namespace TBF.Rig.RegisterReaders.SerialStream
|
|
||||||
{
|
|
||||||
public partial class SerialStreamCfgCtrl : UserControl, IComponentCfgCtrl
|
|
||||||
{
|
|
||||||
public bool ShowMore { get { return false; } }
|
|
||||||
|
|
||||||
SerialStreamCfg config;
|
|
||||||
public IComponentCfg Config
|
|
||||||
{
|
|
||||||
get { return config as IComponentCfg; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
config = value as SerialStreamCfg;
|
|
||||||
Redraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public SerialStreamCfgCtrl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
parityComboBox.Items.Add(Parity.None.ToString());
|
|
||||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
|
||||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
|
||||||
|
|
||||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
|
||||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
|
||||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
|
||||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
|
||||||
|
|
||||||
handshakeComboBox.Items.Add(Handshake.None.ToString());
|
|
||||||
handshakeComboBox.Items.Add(Handshake.RequestToSend.ToString());
|
|
||||||
handshakeComboBox.Items.Add(Handshake.XOnXOff.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ModbusCfgCtrl_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
nameLabel.Text = Strings.Name;
|
|
||||||
Redraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Closing()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Redraw()
|
|
||||||
{
|
|
||||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
|
||||||
|
|
||||||
classNameLabel.Text = config.Factory.ClassName;
|
|
||||||
nameTextBox.Text = config.Name;
|
|
||||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
|
||||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
|
||||||
parityComboBox.Text = config.Parity.ToString();
|
|
||||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
|
||||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
|
||||||
handshakeComboBox.Text = config.Handshake.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Unlock()
|
|
||||||
{
|
|
||||||
nameTextBox.Enabled = true;
|
|
||||||
comPortNrTextBox.Enabled = true;
|
|
||||||
baudRateTextBox.Enabled = true;
|
|
||||||
parityComboBox.Enabled = true;
|
|
||||||
dataBitsTextBox.Enabled = true;
|
|
||||||
stopBitsComboBox.Enabled = true;
|
|
||||||
handshakeComboBox.Enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CfgUpdateFlags UpdateCfg()
|
|
||||||
{
|
|
||||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
|
||||||
|
|
||||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
|
||||||
|
|
||||||
config.Name = nameTextBox.Text;
|
|
||||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
|
||||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
|
||||||
config.Parity = Common.Utils.GetParity(parityComboBox.SelectedItem.ToString());
|
|
||||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
|
||||||
config.StopBits = Common.Utils.GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
|
||||||
config.Handshake = Common.Utils.GetHandshake(handshakeComboBox.SelectedItem.ToString());
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
|
||||||
{
|
|
||||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
|
||||||
|
|
||||||
int dummy;
|
|
||||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
|
||||||
{
|
|
||||||
flags |= CfgUpdateFlags.Error;
|
|
||||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
|
||||||
{
|
|
||||||
flags |= CfgUpdateFlags.Error;
|
|
||||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
|
||||||
{
|
|
||||||
flags |= CfgUpdateFlags.Error;
|
|
||||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
|
||||||
}
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
///
|
|
||||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
|
||||||
///
|
|
||||||
namespace TBF.Rig.RegisterReaders.SerialStream
|
|
||||||
{
|
|
||||||
partial class SerialStreamCfgCtrl
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
|
||||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
|
||||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.partityLabel = new System.Windows.Forms.Label();
|
|
||||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
|
||||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
|
||||||
this.handshakeLabel = new System.Windows.Forms.Label();
|
|
||||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
|
||||||
this.nameLabel = new System.Windows.Forms.Label();
|
|
||||||
this.classNameLabel = new System.Windows.Forms.Label();
|
|
||||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
|
||||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
|
||||||
this.handshakeComboBox = new System.Windows.Forms.ComboBox();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// comPortNrTextBox
|
|
||||||
//
|
|
||||||
this.comPortNrTextBox.Enabled = false;
|
|
||||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 52);
|
|
||||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
|
||||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
|
||||||
this.comPortNrTextBox.TabIndex = 4;
|
|
||||||
//
|
|
||||||
// label1
|
|
||||||
//
|
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(29, 55);
|
|
||||||
this.label1.Name = "label1";
|
|
||||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
|
||||||
this.label1.TabIndex = 3;
|
|
||||||
this.label1.Text = "Serial Port Number:";
|
|
||||||
//
|
|
||||||
// baudRateLabel
|
|
||||||
//
|
|
||||||
this.baudRateLabel.AutoSize = true;
|
|
||||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 79);
|
|
||||||
this.baudRateLabel.Name = "baudRateLabel";
|
|
||||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
|
||||||
this.baudRateLabel.TabIndex = 5;
|
|
||||||
this.baudRateLabel.Text = "Baud Rate";
|
|
||||||
//
|
|
||||||
// baudRateTextBox
|
|
||||||
//
|
|
||||||
this.baudRateTextBox.Enabled = false;
|
|
||||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 76);
|
|
||||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
|
||||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
|
||||||
this.baudRateTextBox.TabIndex = 6;
|
|
||||||
//
|
|
||||||
// partityLabel
|
|
||||||
//
|
|
||||||
this.partityLabel.AutoSize = true;
|
|
||||||
this.partityLabel.Location = new System.Drawing.Point(29, 103);
|
|
||||||
this.partityLabel.Name = "partityLabel";
|
|
||||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
|
||||||
this.partityLabel.TabIndex = 7;
|
|
||||||
this.partityLabel.Text = "Parity";
|
|
||||||
//
|
|
||||||
// dataBitsLabel
|
|
||||||
//
|
|
||||||
this.dataBitsLabel.AutoSize = true;
|
|
||||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 127);
|
|
||||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
|
||||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
|
||||||
this.dataBitsLabel.TabIndex = 9;
|
|
||||||
this.dataBitsLabel.Text = "Data Bits";
|
|
||||||
//
|
|
||||||
// dataBitsTextBox
|
|
||||||
//
|
|
||||||
this.dataBitsTextBox.Enabled = false;
|
|
||||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 124);
|
|
||||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
|
||||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
|
||||||
this.dataBitsTextBox.TabIndex = 10;
|
|
||||||
//
|
|
||||||
// stopBitsLabel
|
|
||||||
//
|
|
||||||
this.stopBitsLabel.AutoSize = true;
|
|
||||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 151);
|
|
||||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
|
||||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
|
||||||
this.stopBitsLabel.TabIndex = 11;
|
|
||||||
this.stopBitsLabel.Text = "Stop Bits";
|
|
||||||
//
|
|
||||||
// handshakeLabel
|
|
||||||
//
|
|
||||||
this.handshakeLabel.AutoSize = true;
|
|
||||||
this.handshakeLabel.Location = new System.Drawing.Point(29, 175);
|
|
||||||
this.handshakeLabel.Name = "handshakeLabel";
|
|
||||||
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
|
|
||||||
this.handshakeLabel.TabIndex = 13;
|
|
||||||
this.handshakeLabel.Text = "Handshake";
|
|
||||||
//
|
|
||||||
// nameTextBox
|
|
||||||
//
|
|
||||||
this.nameTextBox.Enabled = false;
|
|
||||||
this.nameTextBox.Location = new System.Drawing.Point(140, 28);
|
|
||||||
this.nameTextBox.Name = "nameTextBox";
|
|
||||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
|
||||||
this.nameTextBox.TabIndex = 2;
|
|
||||||
//
|
|
||||||
// nameLabel
|
|
||||||
//
|
|
||||||
this.nameLabel.AutoSize = true;
|
|
||||||
this.nameLabel.Location = new System.Drawing.Point(30, 31);
|
|
||||||
this.nameLabel.Name = "nameLabel";
|
|
||||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
|
||||||
this.nameLabel.TabIndex = 1;
|
|
||||||
this.nameLabel.Text = "Name";
|
|
||||||
//
|
|
||||||
// classNameLabel
|
|
||||||
//
|
|
||||||
this.classNameLabel.AutoSize = true;
|
|
||||||
this.classNameLabel.Location = new System.Drawing.Point(137, 7);
|
|
||||||
this.classNameLabel.Name = "classNameLabel";
|
|
||||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
|
||||||
this.classNameLabel.TabIndex = 0;
|
|
||||||
this.classNameLabel.Text = "ComonentName";
|
|
||||||
//
|
|
||||||
// parityComboBox
|
|
||||||
//
|
|
||||||
this.parityComboBox.Enabled = false;
|
|
||||||
this.parityComboBox.FormattingEnabled = true;
|
|
||||||
this.parityComboBox.Location = new System.Drawing.Point(140, 100);
|
|
||||||
this.parityComboBox.Name = "parityComboBox";
|
|
||||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
|
||||||
this.parityComboBox.TabIndex = 8;
|
|
||||||
//
|
|
||||||
// stopBitsComboBox
|
|
||||||
//
|
|
||||||
this.stopBitsComboBox.Enabled = false;
|
|
||||||
this.stopBitsComboBox.FormattingEnabled = true;
|
|
||||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 148);
|
|
||||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
|
||||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
|
||||||
this.stopBitsComboBox.TabIndex = 12;
|
|
||||||
//
|
|
||||||
// handshakeComboBox
|
|
||||||
//
|
|
||||||
this.handshakeComboBox.Enabled = false;
|
|
||||||
this.handshakeComboBox.FormattingEnabled = true;
|
|
||||||
this.handshakeComboBox.Location = new System.Drawing.Point(140, 172);
|
|
||||||
this.handshakeComboBox.Name = "handshakeComboBox";
|
|
||||||
this.handshakeComboBox.Size = new System.Drawing.Size(130, 21);
|
|
||||||
this.handshakeComboBox.TabIndex = 14;
|
|
||||||
//
|
|
||||||
// AmbientCfgCtrl
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.BackColor = System.Drawing.SystemColors.Control;
|
|
||||||
this.Controls.Add(this.handshakeComboBox);
|
|
||||||
this.Controls.Add(this.stopBitsComboBox);
|
|
||||||
this.Controls.Add(this.parityComboBox);
|
|
||||||
this.Controls.Add(this.nameTextBox);
|
|
||||||
this.Controls.Add(this.nameLabel);
|
|
||||||
this.Controls.Add(this.classNameLabel);
|
|
||||||
this.Controls.Add(this.handshakeLabel);
|
|
||||||
this.Controls.Add(this.stopBitsLabel);
|
|
||||||
this.Controls.Add(this.dataBitsTextBox);
|
|
||||||
this.Controls.Add(this.dataBitsLabel);
|
|
||||||
this.Controls.Add(this.partityLabel);
|
|
||||||
this.Controls.Add(this.baudRateTextBox);
|
|
||||||
this.Controls.Add(this.baudRateLabel);
|
|
||||||
this.Controls.Add(this.comPortNrTextBox);
|
|
||||||
this.Controls.Add(this.label1);
|
|
||||||
this.Name = "AmbientCfgCtrl";
|
|
||||||
this.Size = new System.Drawing.Size(300, 240);
|
|
||||||
this.Load += new System.EventHandler(this.ModbusCfgCtrl_Load);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
|
||||||
private System.Windows.Forms.Label label1;
|
|
||||||
private System.Windows.Forms.Label baudRateLabel;
|
|
||||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
|
||||||
private System.Windows.Forms.Label partityLabel;
|
|
||||||
private System.Windows.Forms.Label dataBitsLabel;
|
|
||||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
|
||||||
private System.Windows.Forms.Label stopBitsLabel;
|
|
||||||
private System.Windows.Forms.Label handshakeLabel;
|
|
||||||
private System.Windows.Forms.TextBox nameTextBox;
|
|
||||||
private System.Windows.Forms.Label nameLabel;
|
|
||||||
private System.Windows.Forms.Label classNameLabel;
|
|
||||||
private System.Windows.Forms.ComboBox parityComboBox;
|
|
||||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
|
||||||
private System.Windows.Forms.ComboBox handshakeComboBox;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
@@ -964,6 +964,12 @@ namespace TBF.Rig.Sequences
|
|||||||
log.InfoFormat("Test {0}: Transition({1}, {2}) returned {3}", testInst.Name, (transitionAfter == null ? "null" : transitionAfter.Name), endContext, rsltTransAfter);
|
log.InfoFormat("Test {0}: Transition({1}, {2}) returned {3}", testInst.Name, (transitionAfter == null ? "null" : transitionAfter.Name), endContext, rsltTransAfter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentTestIx == StateMachine.TestInstances.Length - simultWithEvacuationCount - 1 &&
|
||||||
|
e.Contains(Event.EndSession))
|
||||||
|
{
|
||||||
|
goto save_results;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsltTransBefore == Event.Error || rsltTransBetween == Event.Error|| e.Contains(Event.Error))
|
if (rsltTransBefore == Event.Error || rsltTransBetween == Event.Error|| e.Contains(Event.Error))
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ namespace TBF.Rig.Sequences
|
|||||||
public static int LineSize { get { return TBF.Data.LineSize; } }
|
public static int LineSize { get { return TBF.Data.LineSize; } }
|
||||||
public static int CompoundWMsCount { get { return TBF.Data.CompoundWMsCount; } }
|
public static int CompoundWMsCount { get { return TBF.Data.CompoundWMsCount; } }
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Procedure related state variables
|
||||||
|
///
|
||||||
|
// public static TBF.UI.ProcedureInfo SelectedProcedure;
|
||||||
|
public static Common.IOrderInfo OrderInfo;
|
||||||
|
// public static SharedDatabase.WorkflowSummary WorkflowSummary; /// Selected production tracing workflow
|
||||||
|
|
||||||
///
|
///
|
||||||
/// State variables to be saved after each completed test
|
/// State variables to be saved after each completed test
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -1252,12 +1252,6 @@
|
|||||||
<Compile Include="Rig\RegisterReaders\SerialStream\Enums.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\Enums.cs" />
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\Factory.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\Factory.cs" />
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\FrameFormat.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\FrameFormat.cs" />
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStreamCfgCtrl.cs">
|
|
||||||
<SubType>UserControl</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStreamCfgCtrl.designer.cs">
|
|
||||||
<DependentUpon>SerialStreamCfgCtrl.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStream.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStream.cs" />
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStreamCfg.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\SerialStreamCfg.cs" />
|
||||||
<Compile Include="Rig\RegisterReaders\SerialStream\FrameReceivedEventArgs.cs" />
|
<Compile Include="Rig\RegisterReaders\SerialStream\FrameReceivedEventArgs.cs" />
|
||||||
@@ -3188,9 +3182,6 @@
|
|||||||
<EmbeddedResource Include="Rig\RegisterReaders\PulsesFromEldeCB\RegisterReaderCfgCtrl.resx">
|
<EmbeddedResource Include="Rig\RegisterReaders\PulsesFromEldeCB\RegisterReaderCfgCtrl.resx">
|
||||||
<DependentUpon>RegisterReaderCfgCtrl.cs</DependentUpon>
|
<DependentUpon>RegisterReaderCfgCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Rig\RegisterReaders\SerialStream\SerialStreamCfgCtrl.resx">
|
|
||||||
<DependentUpon>SerialStreamCfgCtrl.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Rig\TestMethods\Adjustment\WMErrorsForm.resx">
|
<EmbeddedResource Include="Rig\TestMethods\Adjustment\WMErrorsForm.resx">
|
||||||
<DependentUpon>WMErrorsForm.cs</DependentUpon>
|
<DependentUpon>WMErrorsForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
Reference in New Issue
Block a user