public async System.Threading.Tasks.Task SendAsync(Omron.Core.Frames.Frame frame) { byte[] bytes = frame.BuildFrame(); await Task.Factory.StartNew(() => { port.Write(bytes, 0, bytes.Length - 1); }); }
public static Omron.Core.Frames.Frame BuildFrameFooter(ITransport provider, Omron.Core.Frames.Frame frame) { switch (provider.ProtocolType) { case ProtocolTypes.FinsTcpIp: return BuildTcpIpFinsFooter(frame); case ProtocolTypes.FinsHostLink: return BuildHostLinkFinsFooter(frame); case ProtocolTypes.FinsUdp: return null; default: throw new NotImplementedException(); } }
private static Omron.Core.Frames.Frame BuildTcpIpFinsFooter(Omron.Core.Frames.Frame frame) { return null; }
private static Omron.Core.Frames.Frame BuildHostLinkFinsFooter(Omron.Core.Frames.Frame frame) { throw new NotImplementedException(); }