1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections.ObjectModel;
- using Aitex.Core.UI.MVVM;
- using VirgoSimulator.Instances;
- using MECF.Framework.Common.IOCore;
- namespace VirgoSimulator.Views
- {
- public class IoViewModel : TimerViewModelBase
- {
- public SimulatorPlc Plc { get; set; }
- public ObservableCollection<NotifiableIoItem> DIs { get; set; }
- public ObservableCollection<NotifiableIoItem> DOs { get; set; }
- public ObservableCollection<NotifiableIoItem> AIs { get; set; }
- public ObservableCollection<NotifiableIoItem> AOs { get; set; }
- public IoViewModel(int port, string source, string ioMapPathFile, string module) : base(nameof(IoViewModel))
- {
- Plc = new SimulatorPlc(port, source, ioMapPathFile, module);
- DIs = Plc.DiItemList;
- DOs = Plc.DoItemList;
- AIs = Plc.AiItemList;
- AOs = Plc.AoItemList;
- }
- protected override void Poll()
- {
- }
- }
- }
|