/**
* A communication service that manages the serial connection.
* It can receive and send serial messages via RXTX.
*
* @param bootstrap The bootstrap, not null.
* @param channelInitializer The channel initializer, not null.
*/
public RxtxCommunicationService(Bootstrap bootstrap, RxtxChannelInitializer channelInitializer) {
requireNonNull(bootstrap);
requireNonNull(channelInitializer);
this.bootstrap = bootstrap;
this.bootstrap.group(new OioEventLoopGroup());
this.bootstrap.channel(RxtxChannel.class);
channelInitializer.setRxTxSerialHandler(serialHandler);
this.bootstrap.handler(channelInitializer);
}
RxtxCommunicationService.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:waterrower-core
作者:
评论列表
文章目录