📄 portcapabilities.cs
字号:
/// <summary>
/// Port supports parity checking
/// </summary>
public bool SupportsParityCheck
{
get { return dwProvCapabilities[(int)PCF.PCF_PARITY_CHECK]; }
}
/// <summary>
/// Port supports RLSD (Receive Line Signal Detect)
/// </summary>
public bool SupportsRlsd
{
get { return dwProvCapabilities[(int)PCF.PCF_RLSD]; }
}
/// <summary>
/// Port supports RTS (Request To Send) and CTS (Clear To Send) flowcontrol
/// </summary>
public bool SupportsRtsCts
{
get { return dwProvCapabilities[(int)PCF.PCF_RTSCTS]; }
}
/// <summary>
/// Port supports user definded characters for XON and XOFF
/// </summary>
public bool SupportsSetXChar
{
get { return dwProvCapabilities[(int)PCF.PCF_SETXCHAR]; }
}
/// <summary>
/// Port supports special characters
/// </summary>
public bool SupportsSpecialChars
{
get { return dwProvCapabilities[(int)PCF.PCF_SPECIALCHARS]; }
}
/// <summary>
/// Port supports total and elapsed time-outs
/// </summary>
public bool SupportsTotalTimeouts
{
get { return dwProvCapabilities[(int)PCF.PCF_TOTALTIMEOUTS]; }
}
/// <summary>
/// Port supports XON/XOFF flow control
/// </summary>
public bool SupportsXonXoff
{
get { return dwProvCapabilities[(int)PCF.PCF_XONXOFF]; }
}
// Settable Params
/// <summary>
/// Baud rate can be set
/// </summary>
public bool SettableBaud
{
get { return dwSettableParams[(int)SP.SP_BAUD]; }
}
/// <summary>
/// Number of data bits can be set
/// </summary>
public bool SettableDataBits
{
get { return dwSettableParams[(int)SP.SP_DATABITS]; }
}
/// <summary>
/// Handshake protocol can be set
/// </summary>
public bool SettableHandShaking
{
get { return dwSettableParams[(int)SP.SP_HANDSHAKING]; }
}
/// <summary>
/// Number of parity bits can be set
/// </summary>
public bool SettableParity
{
get { return dwSettableParams[(int)SP.SP_PARITY]; }
}
/// <summary>
/// Parity check can be enabled/disabled
/// </summary>
public bool SettableParityCheck
{
get { return dwSettableParams[(int)SP.SP_PARITY_CHECK]; }
}
/// <summary>
/// Receive Line Signal detect can be enabled/disabled
/// </summary>
public bool SettableRlsd
{
get { return dwSettableParams[(int)SP.SP_RLSD]; }
}
/// <summary>
/// Number of stop bits can be set
/// </summary>
public bool SettableStopBits
{
get { return dwSettableParams[(int)SP.SP_STOPBITS]; }
}
// Settable Databits
/// <summary>
/// Port supports 5 data bits
/// </summary>
public bool Supports5DataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_5]; }
}
/// <summary>
/// Port supports 6 data bits
/// </summary>
public bool Supports6DataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_6]; }
}
/// <summary>
/// Port supports 7 data bits
/// </summary>
public bool Supports7DataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_7]; }
}
/// <summary>
/// Port supports 8 data bits
/// </summary>
public bool Supports8DataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_8]; }
}
/// <summary>
/// Port supports 16 data bits
/// </summary>
public bool Supports16DataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_16]; }
}
/// <summary>
/// Port supports special wide data path through serial hardware lines
/// </summary>
public bool Supports16XDataBits
{
get { return dwSettableStopParityData[(int)DB.DATABITS_16X]; }
}
// Settable Stop
/// <summary>
/// Port supports even parity
/// </summary>
public bool SupportsParityEven
{
get { return dwSettableStopParityData[(int)SB.PARITY_EVEN]; }
}
/// <summary>
/// Port supports mark parity
/// </summary>
public bool SupportsParityMark
{
get { return dwSettableStopParityData[(int)SB.PARITY_MARK]; }
}
/// <summary>
/// Port supports none parity
/// </summary>
public bool SupportsParityNone
{
get { return dwSettableStopParityData[(int)SB.PARITY_NONE]; }
}
/// <summary>
/// Port supports odd parity
/// </summary>
public bool SupportsParityOdd
{
get { return dwSettableStopParityData[(int)SB.PARITY_ODD]; }
}
/// <summary>
/// Port supports space parity
/// </summary>
public bool SupportsParitySpace
{
get { return dwSettableStopParityData[(int)SB.PARITY_SPACE]; }
}
/// <summary>
/// Port supports 1 stop bit
/// </summary>
public bool SupportsStopBits10
{
get { return dwSettableStopParityData[(int)SB.STOPBITS_10]; }
}
/// <summary>
/// Port supports 1.5 stop bits
/// </summary>
public bool SupportsStopBits15
{
get { return dwSettableStopParityData[(int)SB.STOPBITS_15]; }
}
/// <summary>
/// Port supports 2 stop bits
/// </summary>
public bool SupportsStopBits20
{
get { return dwSettableStopParityData[(int)SB.STOPBITS_20]; }
}
// settable Baud Rates
/// <summary>
/// Port can be set to 75 bits per second
/// </summary>
public bool HasBaud75
{
get { return dwSettableBaud[(int)BAUD.BAUD_075];}
}
/// <summary>
/// Port can be set to 110 bits per second
/// </summary>
public bool HasBaud110
{
get { return dwSettableBaud[(int)BAUD.BAUD_110];}
}
/// <summary>
/// Port can be set to 134.5 bits per second
/// </summary>
public bool HasBaud134_5
{
get { return dwSettableBaud[(int)BAUD.BAUD_134_5];}
}
/// <summary>
/// Port can be set to 150 bits per second
/// </summary>
public bool HasBaud150
{
get { return dwSettableBaud[(int)BAUD.BAUD_150];}
}
/// <summary>
/// Port can be set to 300 bits per second
/// </summary>
public bool HasBaud300
{
get { return dwSettableBaud[(int)BAUD.BAUD_300];}
}
/// <summary>
/// Port can be set to 600 bits per second
/// </summary>
public bool HasBaud600
{
get { return dwSettableBaud[(int)BAUD.BAUD_600];}
}
/// <summary>
/// Port can be set to 1,200 bits per second
/// </summary>
public bool HasBaud1200
{
get { return dwSettableBaud[(int)BAUD.BAUD_1200];}
}
/// <summary>
/// Port can be set to 2,400 bits per second
/// </summary>
public bool HasBaud2400
{
get { return dwSettableBaud[(int)BAUD.BAUD_2400];}
}
/// <summary>
/// Port can be set to 4,800 bits per second
/// </summary>
public bool HasBaud4800
{
get { return dwSettableBaud[(int)BAUD.BAUD_4800];}
}
/// <summary>
/// Port can be set to 7,200 bits per second
/// </summary>
public bool HasBaud7200
{
get { return dwSettableBaud[(int)BAUD.BAUD_7200];}
}
/// <summary>
/// Port can be set to 9,600 bits per second
/// </summary>
public bool HasBaud9600
{
get { return dwSettableBaud[(int)BAUD.BAUD_9600];}
}
/// <summary>
/// Port can be set to 14,400 bits per second
/// </summary>
public bool HasBaud14400
{
get { return dwSettableBaud[(int)BAUD.BAUD_14400];}
}
/// <summary>
/// Port can be set to 19,200 bits per second
/// </summary>
public bool HasBaud19200
{
get { return dwSettableBaud[(int)BAUD.BAUD_19200];}
}
/// <summary>
/// Port can be set to 38,400 bits per second
/// </summary>
public bool HasBaud38400
{
get { return dwSettableBaud[(int)BAUD.BAUD_38400];}
}
/// <summary>
/// Port can be set to 56 Kbits per second
/// </summary>
public bool HasBaud56K
{
get { return dwSettableBaud[(int)BAUD.BAUD_56K];}
}
/// <summary>
/// Port can be set to 128 Kbits per second
/// </summary>
public bool HasBaud128K
{
get { return dwSettableBaud[(int)BAUD.BAUD_128K];}
}
/// <summary>
/// Port can be set to 115,200 bits per second
/// </summary>
public bool HasBaud115200
{
get { return dwSettableBaud[(int)BAUD.BAUD_115200];}
}
/// <summary>
/// Port can be set to 57,600 bits per second
/// </summary>
public bool HasBaud57600
{
get { return dwSettableBaud[(int)BAUD.BAUD_57600];}
}
/// <summary>
/// Port can be set to user defined bit rate
/// </summary>
public bool HasBaudUser
{
get { return dwSettableBaud[(int)BAUD.BAUD_USER];}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -