/// <summary> /// Sets the coupling method for the specified channel /// </summary> /// <param name="channel">The channel to set</param> /// <param name="coupling">The coupling to set</param> /// <returns>True on success</returns> public bool SetChannelCoupling(int channel, ChannelCoupling coupling) { if (channel < 1 || channel > 4) { log.Warn("Channel out of bounds!"); return(false); } switch (coupling) { case ChannelCoupling.AC: return(SendMessage("CHAN" + channel.ToString() + ":COUP AC")); case ChannelCoupling.ACLimit: return(SendMessage("CHAN" + channel.ToString() + ":COUP ACL")); case ChannelCoupling.DC: return(SendMessage("CHAN" + channel.ToString() + ":COUP DC")); case ChannelCoupling.DCLimit: return(SendMessage("CHAN" + channel.ToString() + ":COUP DCL")); case ChannelCoupling.GND: return(SendMessage("CHAN" + channel.ToString() + ":COUP GND")); } return(false); }
/// <summary> /// Sets the coupling method for the specified channel /// </summary> /// <param name="channel">The channel to set</param> /// <param name="coupling">The coupling to set</param> /// <returns>True on success</returns> public bool SetChannelCoupling(int channel, ChannelCoupling coupling) { if(channel < 1 || channel > 4) { log.Warn("Channel out of bounds!"); return false; } switch(coupling) { case ChannelCoupling.AC: return SendMessage("CHAN" + channel.ToString() + ":COUP AC"); case ChannelCoupling.ACLimit: return SendMessage("CHAN" + channel.ToString() + ":COUP ACL"); case ChannelCoupling.DC: return SendMessage("CHAN" + channel.ToString() + ":COUP DC"); case ChannelCoupling.DCLimit: return SendMessage("CHAN" + channel.ToString() + ":COUP DCL"); case ChannelCoupling.GND: return SendMessage("CHAN" + channel.ToString() + ":COUP GND"); } return false; }