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

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

Introduction

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

Prototype

RxtxChannelConfig setParitybit(Paritybit paritybit);

Source Link

Document

Sets the type of parity bit to be used when communicating with 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  2s .c o  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 w  w.  j  a v a 2s .  co  m
        config.setDatabits(RxtxChannelConfig.Databits.DATABITS_8);
        config.setStopbits(RxtxChannelConfig.Stopbits.STOPBITS_1);
        config.setParitybit(RxtxChannelConfig.Paritybit.NONE);
    }
}