GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Jarlakxen/reactive-serial: Reactive Streams API for Serial Communication

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
project
project
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.sbt
build.sbt
 
 
version.sbt
version.sbt
 
 

Repository files navigation

Reactive Streams for Serial Communication

Reactive Streams wrapper for jSerialComm.

Available for 2.11 and 2.12:

resolvers += Resolver.bintrayRepo("jarlakxen", "maven")
libraryDependencies += "com.github.jarlakxen" %% "reactive-serial" % "1.4"

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()

About

Reactive Streams API for Serial Communication

Topics

akkareactive-streamsscalaserial

Resources

Readme
Apache-2.0 license
Activity

Stars

25 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.