Add a simplistic SparkplugBSession implementation
It mostly just forwards to the standard MQTT sessions and converts the messages to and from the Sparkplug B protocol.
@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?
Codecov Report
Merging #91 (946bd6b) into master (f61715f) will decrease coverage by
6.52%. The diff coverage is0.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 dataPowered by Codecov. Last update f61715f...946bd6b. Read the comment docs.
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.
Of course! I'm making some enhancements to the ToMetrics typeclass, I'll let you know once it's mergeable from my side.