mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
38 lines
809 B
C#
38 lines
809 B
C#
using Net461DllTest.Device;
|
|
using Net461DllTest.Signal;
|
|
using Serein.Library.Attributes;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Net461DllTest.ViewModel
|
|
{
|
|
public class FromWorkBenchViewModel
|
|
{
|
|
public FromWorkBenchViewModel(SiemensPlcDevice Device)
|
|
{
|
|
this.Device = Device;
|
|
}
|
|
private SiemensPlcDevice Device;
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string GetDeviceInfo()
|
|
{
|
|
return Device?.ToString();
|
|
}
|
|
|
|
public void Trigger(CommandSignal signal,string spcaeNumber)
|
|
{
|
|
_ = Task.Run(() =>
|
|
{
|
|
Device.TriggerSignal(signal, spcaeNumber);
|
|
});
|
|
}
|
|
|
|
|
|
}
|
|
}
|