using PInvokeSerialPort.Win32PInvoke; namespace PInvokeSerialPort { /// /// Represents the status of the modem control input signals. /// public struct ModemStatus { private readonly uint _status; internal ModemStatus(uint val) { _status = val; } /// /// Condition of the Clear To Send signal. /// public bool Cts { get { return ((_status & Win32Com.MS_CTS_ON) != 0); } } /// /// Condition of the Data Set Ready signal. /// public bool Dsr { get { return ((_status & Win32Com.MS_DSR_ON) != 0); } } /// /// Condition of the Receive Line Status Detection signal. /// public bool Rlsd { get { return ((_status & Win32Com.MS_RLSD_ON) != 0); } } /// /// Condition of the Ring Detection signal. /// public bool Ring { get { return ((_status & Win32Com.MS_RING_ON) != 0); } } } }