129 lines
5.0 KiB
C#
129 lines
5.0 KiB
C#
using Aurora.Api;
|
|
using Aurora.Api.Devices;
|
|
using AuroraLaser.Amplitude.Satsuma;
|
|
using AuroraLaser.Coherent.Arm;
|
|
using AuroraLaser.Coherent.Compact;
|
|
using AuroraLaser.Coherent.HyperRapid;
|
|
using AuroraLaser.Coherent.RapidLX;
|
|
using AuroraLaser.Ekspla;
|
|
using AuroraLaser.Ekspla.NL202;
|
|
using AuroraLaser.IPG.YLPN;
|
|
using AuroraLaser.IPG.YLS;
|
|
using AuroraLaser.Trumpf.TruDisk;
|
|
using PropertyTools.DataAnnotations;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AuroraLaser
|
|
{
|
|
public class LaserConfig : IDeviceConfig
|
|
{
|
|
protected Logger Log = new Logger("Laser");
|
|
|
|
public IConnConfig ConnConfig { get; set; }
|
|
public eLaserType LaserType { get; set; }
|
|
|
|
//[VisibleBy("SocketConfig", true)]
|
|
public SocketConnConfig SocketConfig { get; set; }
|
|
//[VisibleBy("SerialConfig", true)]
|
|
public SerialConnConfig SerialConfig { get; set; }
|
|
|
|
public LaserConfig()
|
|
{
|
|
SocketConfig = new SocketConnConfig();
|
|
SerialConfig = new SerialConnConfig();
|
|
|
|
//switch (LaserType) {
|
|
// case eLaserType.Amplitude_Satsuma_Laser:
|
|
// //var satsumaConfig = LaserSatsumaConfig.GetDefaultConfig();
|
|
// // Modbus localhost 로 붙음. SerialConfig or SocketConfig 불필요
|
|
// //ConnConfig = (IConnConfig)satsumaConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Coherent_Arm_Laser:
|
|
// //var armConfig = LaserArmConfig.GetDefaultConfig();
|
|
// //armConfig.ConnConfig = SocketConfig;
|
|
// //ConnConfig = (IConnConfig)armConfig;
|
|
|
|
// //ConnConfig = (IConnConfig)LaserArmConfig.GetDefaultConfig();
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Coherent_Compact_Laser:
|
|
// //var compactMiniConfig = LaserCompactMiniConfig.GetDefaultConfig();
|
|
// //compactMiniConfig.ConnConfig = SerialConfig;
|
|
// //ConnConfig = (IConnConfig)compactMiniConfig;
|
|
// ConnConfig = SerialConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Coherent_HyperRapid_Laser:
|
|
// //var hyperRapidConfig = LaserHyperRapidConfig.GetDefaultConfig();
|
|
// //hyperRapidConfig.ConnConfig = SerialConfig;
|
|
// //ConnConfig = (IConnConfig)hyperRapidConfig;
|
|
// ConnConfig = SerialConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Coherent_RapidLX_Laser:
|
|
// //var rapidLXConfig = LaserRapidLXConfig.GetDefaultConfig();
|
|
// //rapidLXConfig.ConnConfig = SocketConfig;
|
|
// //ConnConfig = (IConnConfig)rapidLXConfig;
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Ekspla_NL202_Laser:
|
|
// //var nL202Config = LaserEksplaConfig.GetDefaultConfig(eLaserEksplaDeviceType.NL202);
|
|
// //nL202Config.ConnConfig = SerialConfig;
|
|
// //ConnConfig = (IConnConfig)nL202Config;
|
|
// ConnConfig = SerialConfig;
|
|
// break;
|
|
|
|
// case eLaserType.IPG_YLPN_Laser:
|
|
// //var yLPNConfig = LaserYLPNConfig.GetDefaultConfig();
|
|
// //yLPNConfig.ConnConfig = SerialConfig;
|
|
// //ConnConfig = (IConnConfig)yLPNConfig;
|
|
// ConnConfig = SerialConfig;
|
|
// break;
|
|
|
|
// case eLaserType.IPG_YLPP_Laser:
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// case eLaserType.IPG_YLS_Laser:
|
|
// //var yLSConfig = LaserYLSConfig.GetDefaultConfig();
|
|
// //yLSConfig.ConnConfig = SocketConfig;
|
|
// //ConnConfig = (IConnConfig)yLSConfig;
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Trumpf_TruDisk_Laser:
|
|
// //var truDiskConfig = LaserTruDiskConfig.GetDefaultConfig();
|
|
// //truDiskConfig.ConnConfig = SocketConfig;
|
|
// //ConnConfig = (IConnConfig)truDiskConfig;
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// case eLaserType.Trumpf_TruPulseNano_Laser:
|
|
// ConnConfig = SocketConfig;
|
|
// break;
|
|
|
|
// // Laser IO Control
|
|
// case eLaserType.Coherent_Arm_Laser_IO:
|
|
// case eLaserType.IPG_Laser_IO:
|
|
// case eLaserType.Trumpf_Laser_IO:
|
|
// Log.V(string.Format("No need config"));
|
|
// break;
|
|
|
|
// default:
|
|
// Log.E(string.Format("Check Laser Type Setting"));
|
|
// break;
|
|
//}
|
|
}
|
|
|
|
[Category("Trumpf_IO")]
|
|
public string Program_No { get; set; } = "1";
|
|
}
|
|
}
|