More camera logging, ROI: imgFileNamePrefix, ver. 2.17.748

This commit is contained in:
Milan Hanajik 2017-11-23 13:41:33 +01:00
parent aec3519ec9
commit 8772004e8e
6 changed files with 21 additions and 15 deletions

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.17.712.0")]
[assembly: AssemblyFileVersion("2.17.712.0")]
[assembly: AssemblyVersion("2.17.748.0")]
[assembly: AssemblyFileVersion("2.17.748.0")]

View File

@ -765,7 +765,8 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
/// If ready send (=enqueue) the command
if (Telnet.State == TelnetClient.TelnetState.Inactive)
{
Telnet.Enqueue(new Telnet.Command(CmdAction.SEND_MSRMNT_CMD, command));
log.WarnFormat("{0} SEND_MSRMNT_CMD: {1}", Name, command);
Telnet.Enqueue(new Telnet.Command(CmdAction.SEND_MSRMNT_CMD, command));
measurementCommandSent = true;
}
}
@ -777,7 +778,8 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
/// When ready send (=enqueue) the command
if (Telnet.State == TelnetClient.TelnetState.Inactive)
{
Telnet.Enqueue(new Telnet.Command(CmdAction.SEND_MSRMNT_CMD, command));
log.WarnFormat("{0} SEND_MSRMNT_CMD: {1}", Name, command);
Telnet.Enqueue(new Telnet.Command(CmdAction.SEND_MSRMNT_CMD, command));
measurementCommandSent = true;
}
}
@ -789,6 +791,7 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
{
if (measurementCommandSent)
{
log.WarnFormat("{0} SEND_COMMAND: CTRL-Q", Name);
Telnet.Enqueue(new Telnet.Command(CmdAction.SEND_COMMAND, TelnetClient.Q_Command));
}
}

View File

@ -178,7 +178,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
{
if (NetCamera != null && RoiCfg.DebugLevel != DebugMode.Simulate)
{
imgFileNamePrefix = Path.Combine(Program.TempImagesDir, string.Format("{0}-{1}-", RoiCfg.Name, StateMachine.Time));
imgFileNamePrefix = Path.Combine(Program.TempImagesDir, string.Format("t{0}-{1}-", StateMachine.Time, RoiCfg.Name));
return new RoiDetectionOp(this, NetCamera, imgFileNamePrefix, RoiX, RoiY, RoiWid, RoiHgh);
}
else

View File

@ -118,7 +118,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.CLEAR_RESPONSE));
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.SEND_COMMAND, command));
roiDetectionCommandSent = true;
log.WarnFormat("{0} IP={1} command={2}", camera.Name, camera.IPAddress, command);
log.WarnFormat("{0}/{1} command={2}", roiCfg.Name, camera.Name, command);
}
return Event.CameraBusy;
}
@ -158,6 +158,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
{
roi.ClearRoi();
failed = true;
log.WarnFormat("{0}/{1} Detection failed: {2}", roiCfg.Name, camera.Name, response);
return Event.RoiDetectionFailed;
}
else
@ -170,12 +171,14 @@ namespace TBF.BenchControl.Network.Camera.Roi
{
roi.ClearRoi();
failed = true;
return Event.RoiDetectionFailed;
log.WarnFormat("{0}/{1} Cannot parse response: {2}", roiCfg.Name, camera.Name, response);
return Event.RoiDetectionFailed;
}
else
{
roi.SetRoi(x, y, w, h);
passed = true;
log.WarnFormat("{0}/{1} Detection PASSED: x={2} y={3} w={4} h={5}", roiCfg.Name, camera.Name, x, y, w, h);
passed = true;
///
/// Start the file transfer

View File

@ -64,7 +64,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
//-------------------------------------------------
///
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
State.Create("RoiDetection : Starting the pump")
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
@ -140,7 +140,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
//------------------------------------------------
Bridge.OnActivity(this, Strings.Setting_the_flow);
//------------------------------------------------
State.Create("RoiDetection : Setting the flow")
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min.
.EnterState();
@ -187,7 +187,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
Bridge.OnActivity(this, Strings.ROI_Detection_in_Progress);
//---------------------------------------------------------
State detection = State.Create("RoiDetection : Detection of ROI-s")
State detection = State.Create(string.Format("{0}({1}) : Detection of ROI-s", test.Method, test.Name))
.AddOperation(checkUiOp);
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
{
@ -225,7 +225,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
//-----------------------------------------------------------------------------------------------------
string title = Strings.Select_images_and_press_Retry_to_retry_RoI_detection;
State.Create("RoiDetection : Select images and press Retry to retry RoI detection")
State.Create(string.Format("{0}({1}) : Select images and press Retry to retry RoI detection", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation((display == null) ? null : display.ShowStaticImageOp(imageNames, title))
.EnterState();
@ -272,7 +272,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
/// Quit this sequence ///
///----------------------///
State.Create("RoiDetection : Stopping diverter, gate, etc.")
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(cBrd.StopPreviousOp())
.EnterState();

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.17.747.0")]
[assembly: AssemblyFileVersion("2.17.747.0")]
[assembly: AssemblyVersion("2.17.748.0")]
[assembly: AssemblyFileVersion("2.17.748.0")]