Example usage for io.netty.channel.rxtx RxtxChannelConfig setStopbits

List of usage examples for io.netty.channel.rxtx RxtxChannelConfig setStopbits

Introduction

In this page you can find the example usage for io.netty.channel.rxtx RxtxChannelConfig setStopbits.

Prototype

RxtxChannelConfig setStopbits(Stopbits stopbits);

Source Link

Document

Sets the number of stop bits to include at the end of every character to aid the serial device in synchronising with the data.

Usage

From source file:com.whizzosoftware.hobson.dsc.DSCPlugin.java

License:Open Source License

@Override
protected void configureChannel(ChannelConfig cfg) {
    if (cfg instanceof RxtxChannelConfig) {
        RxtxChannelConfig config = (RxtxChannelConfig) cfg;
        config.setBaudrate(9600);//from w w  w  . j ava2  s .c  om
        config.setDatabits(RxtxChannelConfig.Databits.DATABITS_8);
        config.setStopbits(RxtxChannelConfig.Stopbits.STOPBITS_1);
        config.setParitybit(RxtxChannelConfig.Paritybit.NONE);
    }
}

From source file:com.whizzosoftware.hobson.mysensors.MySensorsPlugin.java

License:Open Source License

@Override
protected void configureChannel(ChannelConfig cfg) {
    if (cfg instanceof RxtxChannelConfig) {
        RxtxChannelConfig config = (RxtxChannelConfig) cfg;
        config.setBaudrate(115200);/*w w w.j  a  v  a2  s.  c o m*/
        config.setDatabits(RxtxChannelConfig.Databits.DATABITS_8);
        config.setStopbits(RxtxChannelConfig.Stopbits.STOPBITS_1);
        config.setParitybit(RxtxChannelConfig.Paritybit.NONE);
    }
}