2026-06-05 13:44:39 +09:00

77 lines
2.1 KiB
C#

namespace AuroraLaser.Coherent
{
#region param
public struct STRUCT_ERROR_REGISTER
{
public bool bPeltier_Cooler_Over_Temp;
public bool bPeltier_Cooler_Under_Temp;
public bool bFiber_Over_Temp;
public bool bFiber_Plug_Control_Error;
public bool bError_During_Laser_On;
public bool bPeltier_Cooler_Temp_Upper_40;
public bool bPeltier_Cooler_Temp_Under_10;
public bool bOver_Temp_Diode;
public bool bUnder_Temp_Diode;
public bool bUSB_Interface_Broken;
public string ErrMsg;
}
public struct STRUCT_STATUS_REGISTER
{
public bool bPowerOn;
public bool bLaserOn;
public bool bErrorStatus;
public bool bFatalError;
public bool bEmission;
public int PowerValue;
public int Temp;
public string SerialNumber;
}
public struct STRUCT_LASER_MODE_REGISTER
{
public bool bPeltierCooler_HeatingCooling;
public bool bCurrent_Set_External;
public bool bLaser_Control_External;
public bool bPulserOn;
public bool bVT100On;
}
public enum eModelType
{
LUT = 0, // 원본: LookUp Table
Lin1Seg, // Linear model with 1 segment
Lin2Seg // Linear model with 2 segments
}
public struct STRUCT_LASER_POWERMODEL
{
public eModelType _modelType;
public double[] _paramA;
public double[] _paramB;
public STRUCT_LASER_POWERMODEL(eModelType modelType, double[] paramA = null, double[] paramB = null)
{
_modelType = modelType;
_paramA = new double[2];
_paramB = new double[2];
for (int i = 0; i < 2; i++) {
if (paramA is null) {
_paramA[i] = 0.0;
} else {
_paramA[i] = paramA[i];
}
if (paramB is null) {
_paramB[i] = 0.0;
} else {
_paramB[i] = paramB[i];
}
}
}
}
#endregion
}