Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a simplistic SparkplugBSession implementation #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nightscape
Copy link
Contributor

It mostly just forwards to the standard MQTT sessions
and converts the messages to and from the Sparkplug B protocol.

@nightscape nightscape force-pushed the sparkplug-b branch 3 times, most recently from f83f9bd to de48682 Compare April 1, 2022 20:44
.dependsOn(core)
.settings(
commonSettings ++ pgpSettings ++ publishingSettings ++ Seq(
name := "fs2-sparkplug",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it should be rather fs2-mqtt-sparkplug or fs2-mqtt-sparkplug-b?

@nightscape nightscape marked this pull request as ready for review April 1, 2022 23:09
@nightscape
Copy link
Contributor Author

@fcabestre I manually tested this locally with a JS Sparkplug B client and it worked nicely.
Unfortunately I haven't found the time to write automated tests yet.
I need to create a PoC using this first, then I should be able to invest more time to make it nicer and add tests.
Would it be ok from your side to merge this as is, and I make additional PRs whenever I find time to work on it?

It mostly just forwards to the standard MQTT sessions
and converts the messages to and from the Sparkplug B protocol.
@codecov-commenter
Copy link

Codecov Report

Merging #91 (946bd6b) into master (f61715f) will decrease coverage by 6.52%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
- Coverage   29.55%   23.02%   -6.53%     
==========================================
  Files          17       19       +2     
  Lines         247      317      +70     
  Branches        6        6              
==========================================
  Hits           73       73              
- Misses        174      244      +70     
Impacted Files Coverage Δ
.../scala-2/net/sigusr/mqtt/sparkplug/ToMetrics.scala 0.00% <0.00%> (ø)
.../net/sigusr/mqtt/sparkplug/SparkplugBSession.scala 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f61715f...946bd6b. Read the comment docs.

@fcabestre
Copy link
Member

Well, contributions are always welcome and I'll happy to merge this early work. Just spare me some time to wrap my head around this and see how to proceed.

@nightscape
Copy link
Contributor Author

Of course!
I'm making some enhancements to the ToMetrics typeclass, I'll let you know once it's mergeable from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants