Düzenle

Aracılığıyla paylaş


Win32_SerialPortConfiguration class

The Win32_SerialPortConfiguration WMI class represents the settings for data transmission on a Windows-based serial port. This includes configurations for establishing a connection and error checking.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

[Dynamic, Provider("CIMWin32"), UUID("{8502C4EB-5FBB-11D2-AAC1-006008C78BC7}"), AMENDMENT]
class Win32_SerialPortConfiguration : CIM_Setting
{
  string  Caption;
  string  Description;
  string  SettingID;
  boolean AbortReadWriteOnError;
  uint32  BaudRate;
  boolean BinaryModeEnabled;
  uint32  BitsPerByte;
  boolean ContinueXMitOnXOff;
  boolean CTSOutflowControl;
  boolean DiscardNULLBytes;
  boolean DSROutflowControl;
  boolean DSRSensitivity;
  string  DTRFlowControlType;
  uint32  EOFCharacter;
  uint32  ErrorReplaceCharacter;
  boolean ErrorReplacementEnabled;
  uint32  EventCharacter;
  boolean IsBusy;
  string  Name;
  string  Parity;
  boolean ParityCheckEnabled;
  string  RTSFlowControlType;
  string  StopBits;
  uint32  XOffCharacter;
  uint32  XOffXMitThreshold;
  uint32  XOnCharacter;
  uint32  XOnXMitThreshold;
  uint32  XOnXOffInFlowControl;
  uint32  XOnXOffOutFlowControl;
};

Members

The Win32_SerialPortConfiguration class has these types of members:

Properties

The Win32_SerialPortConfiguration class has these properties.

AbortReadWriteOnError

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fAbortOnError")

If TRUE, read and write operations are terminated if an error occurs. If TRUE, the driver terminates all read and write operations with an error status if an error occurs. The driver will not accept any further communications operations until the application acknowledges the error.

BaudRate

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|BaudRate")

Baud (bits per second) rate at which the communications device operates.

Example: 9600

BinaryModeEnabled

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fBinary")

If TRUE, binary-mode data transfers are enabled for the serial port. Computer systems running Windows only allow binary transfers through serial ports, so this value is always TRUE.

BitsPerByte

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|ByteSize")

Number of bits transmitted and received for each byte of data for the Windows serial port. The number may vary with control and error correction bits, such as parity bits.

Example: 8

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

Short textual description of the current object.

This property is inherited from CIM_Setting.

ContinueXMitOnXOff

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fTXContinueOnXoff")

If TRUE, data transmissions continue when the input buffer has come within XOffXMitThreshold bytes of being full and the driver has transmitted the XOffChararcter value to stop receiving bytes. If FALSE, transmission does not continue until the input buffer is within XOnXMitThreshold bytes of being empty and the driver has transmitted the XOnCharacter value to resume reception.

CTSOutflowControl

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fOutxCtsFlow")

If TRUE, the clear to send (CTS) signal is checked before transmitting data. CTS signals that both devices on the serial connection are ready to transfer data. Data transmission is suspended until the CTS signal is given.

Description

Data type: string

Access type: Read-only

Textual description of the current object.

This property is inherited from CIM_Setting.

DiscardNULLBytes

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fNull")

If TRUE, NULL bytes (characters) are discarded when they are received.

DSROutflowControl

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fOutxDsrFlow")

If TRUE, data outflow control is enabled when there is a data set ready (DSR) condition. DSR signals that the connection has been established by the devices on the serial connection. DSR data transmission is suspended until the DSR signal is given.

DSRSensitivity

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fDsrSensitivity")

If TRUE, the communications driver is sensitive to the state of the DSR signal. The driver ignores any bytes received, unless the DSR modem input line is high.

DTRFlowControlType

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fDtrControl")

Use of the data terminal ready (DTR) flow control after a connection has been established.

Enable ("Enable")

Disable ("Disable")

Handshake ("Handshake")

EOFCharacter

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|EofChar")

Value of the character used to signal the end of data.

Example: ^Z

ErrorReplaceCharacter

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|ErrorChar")

Value of the character used to replace bytes received with a parity error.

Example: ^C

ErrorReplacementEnabled

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fErrorChar")

If TRUE, bytes received with parity errors are replaced with the ErrorReplaceCharacter value. Characters with parity errors are only replaced if this property is TRUE and the parity is enabled.

EventCharacter

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|EvtChar")

Value of the control character that is used to signal an event, such as end of file.

Example: ^e

IsBusy

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|File Functions|CreateFile")

If TRUE, the serial port is busy.

Name

Data type: string

Access type: Read-only

Qualifiers: key, MaxLen (256), MappingStrings ("Win32Registry|Hardware\\DeviceMap\\SerialComm")

Name of the Windows serial port.

Example: "COM1"

Parity

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|Parity")

Method of parity checking to be used. Parity is used as an error checking technique where an extra parity bit is included with every unit of data. The receiver can then verify the validity of the data by counting the bits that are set.

None ("None")

Parity checking not used.

Odd ("Odd")

Sets the parity bit so that the count of bits set is an odd number.

Even ("Even")

Sets the parity bit so that the count of bits set is an even number.

Mark ("Mark")

Leaves the parity bit set to 1.

Space ("Space")

Leaves the parity bit set to 0 (zero).

ParityCheckEnabled

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fParity")

If TRUE, parity checking is enabled.

RTSFlowControlType

Data type: string

Access type: Read-only

Request to send (RTS) flow control. RTS is used to signal that data is available for transmission.

Enable ("Enable")

RTS is left on for the data transfer session.

Disable ("Disable")

RTS is ignored after the first RTS signal is received.

Handshake ("Handshake")

RTS is turned off if the transmission buffer is more than three-quarters full, and RTS is turned on when the buffer is less than one-half full.

Toggle ("Toggle")

RTS is turned on if there is any data buffered for transmission.

SettingID

Data type: string

Access type: Read-only

Qualifiers: MaxLen (256)

Identifier by which the current object is known.

This property is inherited from CIM_Setting.

StopBits

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|StopBits")

Number of stop bits to be used. Stop bits separate each unit of data on an asynchronous serial connection. They are also sent continuously when no data is available for transmission.

1 ("1")

1.5 ("1.5")

2 ("2")

XOffCharacter

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|XoffChar")

Value of the XOFF character for both transmission and reception. XOFF is a software control to stop the transmission of data (whereas RTS and CTS are hardware controls). XON resumes the transmission.

XOffXMitThreshold

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|XoffLim")

Maximum number of bytes allowed in the input buffer before the XOFF character is sent.

XOnCharacter

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|XonChar")

Value of the XON character for both transmission and reception. XON is a software control to resume the transmission of data (whereas RTS and CTS are hardware controls). XOFF stops the transmission.

XOnXMitThreshold

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|XonLim")

Minimum number of bytes allowed in the input buffer before the XON character is sent. This property works in conjunction with XOffXMitThreshold to regulate the rate at which data is transferred.

XOnXOffInFlowControl

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fInX")

If TRUE, XON/XOFF flow control is used during reception. If TRUE, the XOffCharacter value is sent when the input buffer comes within XOffXMitThreshold bytes of being full, and the XOnCharacter value is sent when the input buffer comes within XOnXMitThreshold bytes of being empty.

0

FALSE

1

TRUE

XOnXOffOutFlowControl

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Communication Structures|DCB|fOutX")

The XOnXOffOutFlowControl specifies whether XON or XOFF flow control is used during transmission. If TRUE, transmission stops when the XOffCharacter value is received and starts again when the XOnCharacter value is received.

Remarks

The Win32_SerialPortConfiguration class is derived from CIM_Setting.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
CIMWin32.mof
DLL
CIMWin32.dll

See also

CIM_Setting

Computer System Hardware Classes