71 lines
2.0 KiB
C#
71 lines
2.0 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
|
|
namespace TBF.BenchControl.Cameras.IdcCamera
|
|
{
|
|
/// <summary>IDC camera states</summary>
|
|
public enum IdcState
|
|
{
|
|
Unchanged = -1, /// not a state - used in state transition tables
|
|
NotConnected = 0, /// 'gray'
|
|
Idle, /// 'green'
|
|
Busy, /// 'yellow' or 'orange'
|
|
OpCompleted, /// 'green'
|
|
OpFailed, /// 'red'
|
|
DetectionFailed, /// 'red'
|
|
Halted, /// 'red'
|
|
}
|
|
|
|
public enum RetVal
|
|
{
|
|
OK = 0,
|
|
HOST_START = 1000, /// Start of error codes from HOST part of the software
|
|
Busy, /// OK - camera operation in progress
|
|
OpInterrupted, /// OK - camera operation interrupted
|
|
DetectionFailed, /// Camera operation is OK, however ROI detection failed -> fix and retry
|
|
OpFailed, /// RetVal - Camera operation failed
|
|
CameraNotConnected, /// RetVal - Camera is not connected
|
|
SequenceError, /// RetVal - Invalid sequence of calls
|
|
InvalidComPortNr, /// RetVal - Invalid COM-port number
|
|
CannotOpenComPort, /// RetVal - Cannot open COM-port
|
|
CannotCommWithCamera, /// RetVal - Cannot communicate with the camera
|
|
CommTimeout, /// RetVal - Communication timeout
|
|
CommError, /// RetVal - Unknown error during communication
|
|
ShutdownInProgress, /// RetVal - System is shutting down
|
|
FatalError, /// RetVal - Fatal error
|
|
}
|
|
|
|
public struct IdcTransition
|
|
{
|
|
public RetVal RetVal;
|
|
public IdcState NewState;
|
|
|
|
public IdcTransition(RetVal retVal, IdcState newState)
|
|
{
|
|
this.RetVal = retVal;
|
|
this.NewState = newState;
|
|
}
|
|
}
|
|
|
|
public enum FileFormat
|
|
{
|
|
Bmp,
|
|
Jpeg,
|
|
}
|
|
|
|
public enum StreamType
|
|
{
|
|
Full,
|
|
SubSampled,
|
|
Focus,
|
|
}
|
|
|
|
enum WorkerCommand
|
|
{
|
|
StopOp, /// Stop the current operation
|
|
Timeout, /// The expected WorkerCommand(s) have not arrived in time
|
|
}
|
|
}
|