All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.fullj.win32.DCB Maven / Gradle / Ivy

package top.fullj.win32;

import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.List;

/**
 * https://docs.microsoft.com/zh-cn/windows/win32/api/winbase/ns-winbase-dcb
 *
 * @author bruce.wu
 * @since 2019/11/14 9:20
 */
@SuppressWarnings("SpellCheckingInspection")
public class DCB extends Structure {

    public int DCBlength;
    public int BaudRate;
    /**
     *   DWORD fBinary : 1;
     *   DWORD fParity : 1;
     *   DWORD fOutxCtsFlow : 1;
     *   DWORD fOutxDsrFlow : 1;
     *   DWORD fDtrControl : 2;
     *   DWORD fDsrSensitivity : 1;
     *   DWORD fTXContinueOnXoff : 1;
     *   DWORD fOutX : 1;
     *   DWORD fInX : 1;
     *   DWORD fErrorChar : 1;
     *   DWORD fNull : 1;
     *   DWORD fRtsControl : 2;
     *   DWORD fAbortOnError : 1;
     *   DWORD fDummy2 : 17;
     */
    public int dwFlags;
    public short wReserved;
    public short XonLim;
    public short XoffLim;
    public byte ByteSize;
    public byte Parity;
    public byte StopBits;
    public byte XonChar;
    public byte XoffChar;
    public byte ErrorChar;
    public byte EofChar;
    public byte EvtChar;
    public short wReserved1;

    @SuppressWarnings("rawtypes")
    @Override
    protected List getFieldOrder() {
        return Arrays.asList("DCBlength",
                "BaudRate",
                "dwFlags",
                "wReserved",
                "XonLim",
                "XoffLim",
                "ByteSize",
                "Parity",
                "StopBits",
                "XonChar",
                "XoffChar",
                "ErrorChar",
                "EofChar",
                "EvtChar",
                "wReserved1");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy