Corretto simulazione x controllo connettività + fix display x RAW
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
<Content Include="dump\dump.exe">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ExtLib\S_Fwlib32_V6.3.1.exe" />
|
||||
<Content Include="logs\.placeholder.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -162,9 +163,7 @@
|
||||
<Name>IOB-UT</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="ExtLib\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
+74
-54
@@ -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
|
||||
/// </summary>
|
||||
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()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Mostra i dati grezzi letti in esadecimale
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua invio a MoonPro dello status rilevato in HEX
|
||||
@@ -1105,36 +1098,11 @@ namespace IOB_WIN
|
||||
// riporto cosa inviato
|
||||
displayOutData();
|
||||
}
|
||||
/// <summary>
|
||||
/// Mostra cosa ha/avrebbe inviato
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update visualizzaizone BIT in ingresso
|
||||
/// </summary>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// lettura memoria in SIMULAZIONE
|
||||
@@ -1223,11 +1191,63 @@ namespace IOB_WIN
|
||||
#region gestione dataMonitor (accodamento valori)
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Mostra i dati grezzi letti in esadecimale
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// Update visualizzaizone BIT in ingresso
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Mostra cosa ha/avrebbe inviato
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Accoda (visualizzando in cima allo stack) la nuova stringa di output per area OTHER DATA
|
||||
/// </summary>
|
||||
/// <param name="newLine"></param>
|
||||
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));
|
||||
|
||||
Generated
+2
-1
@@ -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 = "...";
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user