123456789101112131415161718192021222324252627282930313233 |
- using MECF.Framework.Simulator.Core.Driver;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading;
- using System.Threading.Tasks;
- namespace CyberX8_Simulator.Devices
- {
- public class VPASimulator : SerialPortDeviceSimulator
- {
- private const string EOF = "\r";
- private const char MSG_DELIMITER = ' ';
- private const string VPA_Port = "COM159";
- public VPASimulator() : base(VPA_Port, -1, EOF, MSG_DELIMITER)
- {
- }
- protected override void ProcessUnsplitMessage(string message)
- {
- if (string.IsNullOrEmpty(message))
- throw new ArgumentException("Hardware command message is invalid");
- Thread.Sleep(500);
- OnWriteMessage("_RDY" + EOF);
- }
- }
- }
|