reactive-serial

Reactive Streams API for Serial Communication

3 years after

Reactive Streams for Serial Communication

Reactive Streams wrapper for jSerialComm.

Available at OSS Sonatype for 2.11:

libraryDependencies += "com.github.jarlakxen" %% "reactive-serial" % "1.3"

Example usage

import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{Sink, Source}
import com.github.jarlakxen.reactive.serial.ReactiveSerial

implicit val actorSystem = ActorSystem("ReactiveSerial")
implicit val materializer = ActorMaterializer()

val serialPort = ReactiveSerial.port("/dev/ttyUSB0")

val serial = ReactiveSerial(port = serialPort, baudRate = 57600)

val publisher: Publisher[ByteString] = serial.publisher(bufferSize=100)
val subscriber: Subscriber[ByteString] = serial.subscriber(requestStrategyProvider=ZeroRequestStrategy)

Source.fromPublisher(publisher).map(_.message().toUpperCase).to(Sink.fromSubscriber(subscriber)).run()

Related Repositories

gtor

gtor

A General Theory of Reactivity ...

android-arsenal.com

android-arsenal.com

Source to android-arsenal.herokuapp.com ...

wingtips

wingtips

Wingtips is a distributed tracing solution for Java based on the Google Dapper p ...

Awesome-arduino

Awesome-arduino

A curated list of awesome Arduino hardwares, libraries and softwares with update ...

akka-serial

akka-serial

Reactive serial communication library for Akka and Scala. ...


Top Contributors

Jarlakxen

Releases

-   v1.4 zip tar
-   v1.3 zip tar
-   v1.2 zip tar
-   v1.1 zip tar
-   v1.0 zip tar