Files

43 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Collections.ObjectModel;
using Prism.Mvvm;
namespace XP.Hardware.PLC.Models
{
/// <summary>
/// 信号分组模型,包含唯一 ID、DB 块号和信号列表 | Signal group model with unique ID, DB block number and signal list
/// </summary>
public class SignalGroup : BindableBase
{
private string _groupId = string.Empty;
private int _dbNumber;
private ObservableCollection<SignalEntry> _signals = new();
/// <summary>
/// 分组唯一标识(如 "SignalList_ReadCommon"| Group unique identifier
/// </summary>
public string GroupId
{
get => _groupId;
set => SetProperty(ref _groupId, value ?? string.Empty);
}
/// <summary>
/// PLC 数据块号(如 1、31、100| PLC data block number
/// </summary>
public int DBNumber
{
get => _dbNumber;
set => SetProperty(ref _dbNumber, value);
}
/// <summary>
/// 该分组下的信号列表 | Signal list under this group
/// </summary>
public ObservableCollection<SignalEntry> Signals
{
get => _signals;
set => SetProperty(ref _signals, value ?? new ObservableCollection<SignalEntry>());
}
}
}