Skip to content

Add Device RSSIChanged and generic PropertyChanged events - #82

Open
Kinchul wants to merge 3 commits into
SuessLabs:developfrom
fiveco:vk/property-changed
Open

Add Device RSSIChanged and generic PropertyChanged events#82
Kinchul wants to merge 3 commits into
SuessLabs:developfrom
fiveco:vk/property-changed

Conversation

@Kinchul

@Kinchul Kinchul commented Jul 21, 2026

Copy link
Copy Markdown

Details

Add RSSIChanged and generic PropertyChanged events to Device

Device.OnPropertyChanges only surfaced Connected and ServicesResolved; all other Device1 property changes were received by the existing property watcher and discarded.

This adds two events, reusing that same watcher (no extra D-Bus subscriptions):

  • RSSIChanged (EventHandler<short>) — typed event carrying the new RSSI in dBm, matching the existing typed-event style. Lets consumers track signal strength across advertisements without polling or re-scanning.
  • PropertyChanged (EventHandler<PropertyChanges>) — generic passthrough of the raw changes for every property, so properties without a dedicated event (e.g. ManufacturerData, TxPower) are reachable without forking the library.

Note

Changes covered by a typed event (Connected, ServicesResolved, RSSI) are also delivered on PropertyChanged; this is documented as intentional on the event.

@Kinchul
Kinchul marked this pull request as draft August 6, 2026 09:42
@Kinchul

Kinchul commented Aug 7, 2026

Copy link
Copy Markdown
Author

Pushed one follow-up fix found while running this on hardware:

Exceptions escaping the property-changed handler. OnPropertyChanges runs on the D-Bus
receive loop, and this PR gives consumers two new places to subscribe. A subscriber throwing
there propagates into Tmds.DBus, which treats it as a fatal receive error, disconnects, and
discards every signal handler on the connection — method calls keep working while all events
go silent. The handler now contains consumer exceptions and logs them.

@Kinchul
Kinchul marked this pull request as ready for review August 7, 2026 10:15
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.

2 participants