public SerialChannelWithTimeoutMonitorAndSendReplyAbility CreateChannel(string channelName) { var serialChannel = new SerialChannelWithTimeoutMonitorAndSendReplyAbility(new SerialChannel(new CommandPartSearcherPsnConfigBasedFast(PsnProtocolConfiguration))); _channels.Add(channelName, serialChannel); CmdNotifierStd.AddSerialChannel(serialChannel.Channel); return(serialChannel); }
public void DestroyChannel(string channelName) { if (_channels.ContainsKey(channelName)) { var channel = _channels[channelName]; _channels.Remove(channelName); CmdNotifierStd.RemoveSerialChannel(channel.Channel); channel.BecameUnused(); } }