diff --git a/IOB-WIN/IOB-WIN.csproj b/IOB-WIN/IOB-WIN.csproj
index aba44eff..e6a90e91 100644
--- a/IOB-WIN/IOB-WIN.csproj
+++ b/IOB-WIN/IOB-WIN.csproj
@@ -91,6 +91,7 @@
Always
+
Always
@@ -162,9 +163,7 @@
IOB-UT
-
-
-
+
diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs
index 784783c2..72ab34f9 100644
--- a/IOB-WIN/IobGeneric.cs
+++ b/IOB-WIN/IobGeneric.cs
@@ -259,9 +259,12 @@ namespace IOB_WIN
nReadIN = 0;
nReadFilt = 0;
nSendOut = 0;
- // svuoto code...
- QueueIN.Clear();
- QueueSIM.Clear();
+ // svuoto code... SE NON SIM...
+ if (!DemoIn)
+ {
+ QueueIN.Clear();
+ QueueSIM.Clear();
+ }
// imposto contatori blink a zero...
i_counters = new int[32];
lastPeriodicLog = DateTime.Now;
@@ -367,7 +370,6 @@ namespace IOB_WIN
else if (ciclo == gatherCycle.MF)
{
processProgram();
- getPrgName();
}
else if (ciclo == gatherCycle.LF)
{
@@ -494,7 +496,7 @@ namespace IOB_WIN
{
get
{
- return _connOk;
+ return _connOk || DemoIn;
}
set
{
@@ -1029,7 +1031,15 @@ namespace IOB_WIN
///
private void processProgram()
{
- string currPrgName = getPrgName();
+ string currPrgName = "";
+ if (!DemoIn)
+ {
+ currPrgName = getPrgName();
+ }
+ else
+ {
+ currPrgName = string.Format("PROG: {0:HHmmss}", DateTime.Now);
+ }
// verifico SE sia cambiato il programma...
if (lastPrgName != currPrgName)
{
@@ -1053,23 +1063,6 @@ namespace IOB_WIN
public virtual void readSemafori()
{
}
- ///
- /// Mostra i dati grezzi letti in esadecimale
- ///
- private void displayRawData()
- {
- // mostro update......
- string newString = string.Format("{0:X}{1}{2}", (int)B_input, Environment.NewLine, parentForm.dataMonitor_0);
- // se num righe superiore a limite trimmo...
- if (newString.Split('\n').Length > parentForm.nLine2show)
- {
- int idx = newString.LastIndexOf(Environment.NewLine);
- newString = newString.Substring(0, idx);
- }
- parentForm.dataMonitor_0 = newString;
- // salvo coda debug...
- QueueDebug.Enqueue(B_input);
- }
///
/// Effettua invio a MoonPro dello status rilevato in HEX
@@ -1105,36 +1098,11 @@ namespace IOB_WIN
// riporto cosa inviato
displayOutData();
}
- ///
- /// Mostra cosa ha/avrebbe inviato
- ///
- public void displayOutData()
- {
- // mostro update......
- string newString = string.Format("{0}{1}{2}", lastUrl, Environment.NewLine, parentForm.dataMonitor_2);
- // se num righe superiore a limite trimmo...
- if (newString.Split('\n').Length > parentForm.nLine2show)
- {
- int idx = newString.LastIndexOf(Environment.NewLine);
- newString = newString.Substring(0, idx);
- }
- parentForm.dataMonitor_2 = newString;
- }
- ///
- /// Update visualizzaizone BIT in ingresso
- ///
- public void displayInData()
- {
- // mostro update......
- string newString = string.Format("{0:0000}|{1}{2}{3}", counter, utils.IntToBinStr((int)B_output, 8), Environment.NewLine, parentForm.dataMonitor_1);
- // se num righe superiore a limite trimmo...
- if (newString.Split('\n').Length > parentForm.nLine2show)
- {
- int idx = newString.LastIndexOf(Environment.NewLine);
- newString = newString.Substring(0, idx);
- }
- parentForm.dataMonitor_1 = newString;
- }
+
+
+ #endregion
+
+ #region area simulazione
///
/// lettura memoria in SIMULAZIONE
@@ -1223,11 +1191,63 @@ namespace IOB_WIN
#region gestione dataMonitor (accodamento valori)
+ ///
+ /// Mostra i dati grezzi letti in esadecimale
+ ///
+ private void displayRawData()
+ {
+#if false
+ // mostro update......
+ string newString = string.Format("{0:X}{1}{2}", (int)B_input, Environment.NewLine, parentForm.dataMonitor_0);
+ // se num righe superiore a limite trimmo...
+ if (newString.Split('\n').Length > parentForm.nLine2show)
+ {
+ int idx = newString.LastIndexOf(Environment.NewLine);
+ newString = newString.Substring(0, idx);
+ }
+ parentForm.dataMonitor_0 = newString;
+#endif
+ // mostro update......
+ string newString = string.Format("{0:X}", (int)B_input);
+ accodaRawData(newString);
+ // salvo coda debug...
+ QueueDebug.Enqueue(B_input);
+ }
+ ///
+ /// Update visualizzaizone BIT in ingresso
+ ///
+ public void displayInData()
+ {
+ // mostro update......
+ string newString = string.Format("{0:0000}|{1}{2}{3}", counter, utils.IntToBinStr((int)B_output, 8), Environment.NewLine, parentForm.dataMonitor_1);
+ // se num righe superiore a limite trimmo...
+ if (newString.Split('\n').Length > parentForm.nLine2show)
+ {
+ int idx = newString.LastIndexOf(Environment.NewLine);
+ newString = newString.Substring(0, idx);
+ }
+ parentForm.dataMonitor_1 = newString;
+ }
+ ///
+ /// Mostra cosa ha/avrebbe inviato
+ ///
+ public void displayOutData()
+ {
+ // mostro update......
+ string newString = string.Format("{0}{1}{2}", lastUrl, Environment.NewLine, parentForm.dataMonitor_2);
+ // se num righe superiore a limite trimmo...
+ if (newString.Split('\n').Length > parentForm.nLine2show)
+ {
+ int idx = newString.LastIndexOf(Environment.NewLine);
+ newString = newString.Substring(0, idx);
+ }
+ parentForm.dataMonitor_2 = newString;
+ }
///
/// Accoda (visualizzando in cima allo stack) la nuova stringa di output per area OTHER DATA
///
///
- public void accodaInData(string newLine)
+ public void accodaRawData(string newLine)
{
// inserisco in cima allo stack, trimmo e aggiorno display
parentForm.dataMonitor_0 = limitLine2show(string.Format("{0}{1}{2}", newLine, Environment.NewLine, parentForm.dataMonitor_0));
diff --git a/IOB-WIN/MainForm.Designer.cs b/IOB-WIN/MainForm.Designer.cs
index 7fa5875e..e8db4fca 100644
--- a/IOB-WIN/MainForm.Designer.cs
+++ b/IOB-WIN/MainForm.Designer.cs
@@ -509,10 +509,11 @@
this.lblOutMessage3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblOutMessage3.AutoSize = true;
+ this.lblOutMessage3.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOutMessage3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.lblOutMessage3.Location = new System.Drawing.Point(193, 20);
this.lblOutMessage3.Name = "lblOutMessage3";
- this.lblOutMessage3.Size = new System.Drawing.Size(655, 17);
+ this.lblOutMessage3.Size = new System.Drawing.Size(655, 15);
this.lblOutMessage3.TabIndex = 68;
this.lblOutMessage3.Text = "...";
//