using System;
using System.Collections.Generic;
using System.ComponentModel;
using TeamAAS.Global.Devices;
namespace TeamAAS.Motion
{
/// 运动/IO 设备类型(品牌适配器按类型注册)。
public enum MotionDeviceType
{
/// 仿真运动卡(无硬件可用,联调/演示)。
仿真运动卡 = 0,
/// 仿真 IO 卡(16进/16出,无硬件可用)。
仿真IO卡 = 1,
/// 雷赛运动控制卡(待适配)。
雷赛运动卡 = 10,
/// 固高运动控制卡(待适配)。
固高运动卡 = 11,
/// IMC60G 系列 PCIe 运动控制板卡(待适配)。
IMC60G运动卡 = 12,
/// GR20T-ECT-1616ETN EtherCAT IO 模块(待适配)。
GR20T_IO模块 = 13,
}
/// 单台运动/IO 设备的配置(持久化为 Config\MotionDevices.json)。
[Serializable]
public class MotionDeviceConfig
{
/// 设备名称(唯一,状态栏/绑定树显示用)。
[DisplayName("设备名称")]
[Description("设备唯一名称")]
public string Name { get; set; } = "运动卡1";
/// 设备类型(决定实例化哪个品牌适配器)。
[DisplayName("设备类型")]
[Description("品牌/型号适配器类型")]
public MotionDeviceType DeviceType { get; set; } = MotionDeviceType.仿真运动卡;
/// 板卡号/设备号(品牌适配器解释,如卡号 0)。
[DisplayName("板卡号")]
[Description("品牌适配器的板卡/设备索引")]
public int BoardIndex { get; set; } = 0;
/// 轴数量(IO 卡忽略)。
[DisplayName("轴数量")]
[Description("运动卡轴数量")]
public int AxisCount { get; set; } = 4;
/// 输入点数(IO 卡用)。
[DisplayName("输入点数")]
[Description("IO 卡输入点数量")]
public int InputCount { get; set; } = 16;
/// 输出点数(IO 卡用)。
[DisplayName("输出点数")]
[Description("IO 卡输出点数量")]
public int OutputCount { get; set; } = 16;
/// 连接参数(IP/串口等,品牌适配器解释;EtherCAT 模块填 ENI/IP)。
[DisplayName("连接参数")]
[Description("IP / 串口 / EtherCAT 配置等,由品牌适配器解释")]
public string ConnectionString { get; set; } = "";
}
}