Skip to content

Add sdbus-c++ ConnMan client example#16

Merged
jwinarske merged 4 commits into
jwinarske:mainfrom
jaydon2020:main
Mar 20, 2026
Merged

Add sdbus-c++ ConnMan client example#16
jwinarske merged 4 commits into
jwinarske:mainfrom
jaydon2020:main

Conversation

@jaydon2020

Copy link
Copy Markdown
Contributor

I’ve implemented a ConnMan monitoring client as part of an IVI homescreen WiFi plugin. I tested with my raspberry pi 5 with AGL (VERSION="20.91.0 (unagi)").

Signed-off-by: JianDe <jiande2020@protonmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new ConnMan monitoring example client to the existing set of sdbus-c++ example daemons, enabling basic ConnMan Manager/Technology/Service signal handling and logging.

Changes:

  • Introduces a new connman_client executable with a simple monitor loop and logging.
  • Implements ConnmanManagerClient plus Technology/Service proxy wrappers to react to ConnMan signals.
  • Wires the new example into the top-level build via add_subdirectory(src/connman).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/connman/main.cc New executable entrypoint creating a system bus connection, starting async event loop, and running the shared monitor loop.
src/connman/connman_client.h Declares ConnMan Manager/Technology/Service proxy client classes and internal state maps.
src/connman/connman_client.cc Implements signal handlers and initial enumeration of technologies/services.
src/connman/CMakeLists.txt Builds and installs the new connman_client example.
CMakeLists.txt Adds src/connman subdirectory to the build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/connman/connman_client.h Outdated
Comment thread src/connman/connman_client.h
Comment thread src/connman/connman_client.cc
jwinarske and others added 2 commits March 18, 2026 10:40
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Constructor exception leak — wrapped post-registerProxy() D-Bus calls in try-catch that calls unregisterProxy() on failure
- Unguarded callbacks — added try-catch to all 6 onPropertyChanged/onTechnologyAdded/onTechnologyRemoved/onServicesChanged callbacks
- No reconnection — added retry loop with exponential backoff (1s → 30s cap) in main.cc
- Unused parameter

Signed-off-by: Joel Winarske <joel.winarske@outlook.com>
Signed-off-by: Joel Winarske <joel.winarske@outlook.com>
@jwinarske

Copy link
Copy Markdown
Owner

@jaydon2020 thanks!

@jwinarske jwinarske merged commit e6e860f into jwinarske:main Mar 20, 2026
6 checks passed
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.

3 participants