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

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

Introduction

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

Prototype

RxtxChannelConfig setDatabits(Databits databits);

Source Link

Document

Sets the number of data bits to use to make up each character sent to the serial device.

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.  ja v  a 2  s.co  m*/
        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);/*from   w ww. j ava  2  s. c o  m*/
        config.setDatabits(RxtxChannelConfig.Databits.DATABITS_8);
        config.setStopbits(RxtxChannelConfig.Stopbits.STOPBITS_1);
        config.setParitybit(RxtxChannelConfig.Paritybit.NONE);
    }
}