Simlation mode for Camera.CLP1611, ver. 2.17.746
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
@@ -62,6 +65,8 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
if (File.Exists(imgFileNames[0])) File.Delete(imgFileNames[0]);
|
||||
@@ -69,6 +74,8 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return Event.None;
|
||||
|
||||
if (imgFileNames.Length < 1 || imgFileNames[0] == null)
|
||||
{
|
||||
return Event.GrabPassed;
|
||||
@@ -168,6 +175,8 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
|
||||
if (grabImageCommandSent)
|
||||
{
|
||||
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.SEND_COMMAND, Telnet.TelnetClient.CtrlCCommand));
|
||||
|
||||
@@ -34,7 +34,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
log.DebugFormat("Run(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return Event.None;
|
||||
|
||||
log.DebugFormat("Run(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
|
||||
if (!liveStreamCommandSent)
|
||||
{
|
||||
@@ -42,15 +44,18 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
{
|
||||
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.SEND_STRING, command));
|
||||
liveStreamCommandSent = true;
|
||||
log.WarnFormat("{0} IP={1} command={2}", camera.Name, camera.IPAddress, command);
|
||||
log.WarnFormat("{0} IP={1} command={2}", camera.Name, camera.IPAddress, command);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.None;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
log.DebugFormat("Stop(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
|
||||
log.DebugFormat("Stop(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
|
||||
if (liveStreamCommandSent)
|
||||
{
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.17.745.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.745.0")]
|
||||
[assembly: AssemblyVersion("2.17.746.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.746.0")]
|
||||
|
||||
Reference in New Issue
Block a user