| c6fee5a9 | 20-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
expose DBus interface signal names as symbols
Enable a way to access the signal names of a given DBus interface as a constexpr symbol via the header.
4 use-cases:
- printing error / debug logs wit
expose DBus interface signal names as symbols
Enable a way to access the signal names of a given DBus interface as a constexpr symbol via the header.
4 use-cases:
- printing error / debug logs with the signal name. e.g. 'received signal ${SIGNAL_NAME}'
- matching on DBus signals in applications which do not yet use the PDI generated bindings.
- preventing typos in DBus signal names
- estimating the impact of removing a given DBus signal from an interface. When using these symbols, it would cause a build failure in applications relying on the existence of that signal.
This change is similar to [1] and goes into the same direction.
Tested: Newly written unit test passes.
References: [1] d2571922bfdb4f6b41ba4fbc45b8a4272793fd40
Change-Id: I9c20d744955c883302f349c5351dbdba1753466b Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 4aa58f5a | 16-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
expose DBus interface method names as symbols
Enable a way to access the method names of a given DBus interface as a constexpr symbol via the header.
4 use-cases:
- printing error / debug logs wit
expose DBus interface method names as symbols
Enable a way to access the method names of a given DBus interface as a constexpr symbol via the header.
4 use-cases:
- printing error / debug logs with the method name. e.g. 'error calling ${METHOD_NAME}'
- accessing DBus methods in applications which do not yet use the PDI generated bindings.
- preventing typos in DBus method names
- estimating the impact of removing a given DBus method from an interface. When using these symbols, it would cause a build failure in applications relying on the existence of that method.
This change is similar to [1] and goes into the same direction.
Tested: Newly written unit test passes.
References: [1] d2571922bfdb4f6b41ba4fbc45b8a4272793fd40
Change-Id: Id423c3a668dd1a8346040f4380476d5e02468ddb Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| d2571922 | 02-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
expose DBus interface property names as symbols
Enable a way to access the property names of a given DBus interface as a constexpr symbol via the header [1]
4 use-cases:
- printing error / debug l
expose DBus interface property names as symbols
Enable a way to access the property names of a given DBus interface as a constexpr symbol via the header [1]
4 use-cases:
- printing error / debug logs with the property name. e.g. '${property} missing from configuration'
- accessing DBus properties in applications which do not yet use the PDI generated bindings.
- preventing typos in DBus property names
- estimating the impact of removing a given DBus property from an interface. When using these symbols, it would cause a build failure in applications relying on the existence of that property.
Tested: a newly added unit test is using this feature.
References: [1] https://discordapp.com/channels/775381525260664832/867820390406422538/1423317550732673206
Change-Id: I7b2906b6b1b445c3a49868ff1d50ced6ccaa5336 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| a0fe02ca | 10-Mar-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
aserver: constructor to initialize properties
Functions like 'emit_added()' do not work correctly if properties are not initialized. Often, the initial values for the properties of an interface are
aserver: constructor to initialize properties
Functions like 'emit_added()' do not work correctly if properties are not initialized. Often, the initial values for the properties of an interface are known, such as
- Software Version Interface - Software ActivationProgress Interface - Software ApplyTime Interface - ...
How was this previously handled?
- Write a wrapper class for the specific aserver class. This allows to initialize the properties, as they are protected members. Example [2]
- Write a wrapper class and provide methods to get/set the variables. This is done in [1]
- Set each property with a method call, which emits 'PropertyChanged' signal by default, not ideal. This also does not work if the interface is ever refactored to have additional properties.
To facilitate using these interfaces without having to write a wrapper class to inherit from them, and to avoid having to manually set each property, which can easily be forgotten, provide a constructor to allow for passing a struct with values for all the properties.
Tested: Unit tests pass, but still needs to be build-tested against openbmc/openbmc. The concern there is mostly due to an added template parameter.
References: [1] https://github.com/openbmc/sdbusplus/blob/da8574d5888b2c1622f5482a47adc7a12ffa0d0e/example/calculator-aserver.cpp#L44 [2] https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/4983b138ea8fc70bd66fe4d30500e6252629fa5d/common/src/software.cpp#L29
Change-Id: I873cbca97ae16b19bfbf622303f4d52e2563a62c Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| f2cc7437 | 07-Apr-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix gtest build
gtest isn't used in this file. Remove the #include
Change-Id: I1fa6c8af167c9605c4dc4b36230739cd3018b5b3 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| 0cfa35a5 | 23-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Fix uninitialized property, aserver instance
Had some
"conditional move or branch depends on uninitialized value",
and digging revealed this. The 'property.py' is modified to zero-initialize the p
Fix uninitialized property, aserver instance
Had some
"conditional move or branch depends on uninitialized value",
and digging revealed this. The 'property.py' is modified to zero-initialize the properties [1].
The newly introduced test cases show that the uninitialized value only occurred on the aserver instance for some reason.
Without this patch, one of these tests would fail.
The patch is more of a band-aid than anything else, since zero-initialization or default constructing sdbusplus::message::object_path is actually not a valid object path [2].
So there needs to be another patch to add some default constructor there.
While doing this, found that the
- interface.server.hpp.mako - interface.aserver.hpp.mako
use a different template to define the properties, which is confusing. Cleaned that up so they declare their properties in the same way.
Tested: Unit tests pass
References: [1] https://en.cppreference.com/w/cpp/language/zero_initialization [2] https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
Change-Id: I6ec5823f24fe9430546fc119e83e647ae2b3f8c9 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 087be967 | 31-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
regenerate-meson: enable meson formatting
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I58730e17d8350470783c7fa45466ee9ac19b2c48 |
| 74eea519 | 03-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++-gen-meson: leverage `install_dir` for custom targets
Meson has had a `install_dir` directive on `custom_target` which allows specifying per-output where the file should be installed. Leverag
sdbus++-gen-meson: leverage `install_dir` for custom targets
Meson has had a `install_dir` directive on `custom_target` which allows specifying per-output where the file should be installed. Leveraging this greatly simplifies the meson in consumers (such as phosphor-dbus-interfaces) and makes the install less error-prone.
The previous method for installing was to use a `install_subdir` call with large exclude lists (so that markdown did not end up in the include tree). The result of this was that many empty directories were created in the include, markdown, and registry install paths.
Using this method reduces by 25% the meson content in phosphor-dbus-interfaces.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2b03116f517caa75de902ac7e44e6923d6652cad
show more ...
|
| 31607399 | 02-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: add meson support for registry generation
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia8b95c291256726fdb729bcf886fa7f664ead4a5 |
| 0ac157a0 | 23-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++-gen-meson: fix [more] meson dependencies
As a follow on to 5800d07910384ffad8409515bc510812e4f34334, additional cases were noticed where the meson dependencies are not correctly updated when
sdbus++-gen-meson: fix [more] meson dependencies
As a follow on to 5800d07910384ffad8409515bc510812e4f34334, additional cases were noticed where the meson dependencies are not correctly updated when multiple YAML files are used (such as interfaces and events).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie47bc156c2b3954d3c47c9d07a2e106d7cc87c63
show more ...
|
| 0336a2fc | 05-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add stubs to generate event files
Add options to `sdbus++` to generate the files for `events.yaml` files: header, cpp, markdown. Create simple stubs for these that generate empty files. E
sdbus++: add stubs to generate event files
Add options to `sdbus++` to generate the files for `events.yaml` files: header, cpp, markdown. Create simple stubs for these that generate empty files. Enable them in `sdbus++-gen-meson` and add an example for the Calculator.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia1df9ca02e1de5fc3f6dadfd409d646e1341a3d6
show more ...
|
| 6403d56f | 18-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: add generator stub
Add the needful changes in the tools and meson-generator to create an asynchronous server binding header.
Signed-off-by: Patrick Williams <patrick@stwcx.x
sdbus++: async: server: add generator stub
Add the needful changes in the tools and meson-generator to create an asynchronous server binding header.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0607aefc006eafb9224d92b887cf2d3b30c8da06
show more ...
|
| 1caa5e8a | 19-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add common header file
There are some items generated under server and client which are overlapping and some currently in server that will also be needed for async bindings. Create a commo
sdbus++: add common header file
There are some items generated under server and client which are overlapping and some currently in server that will also be needed for async bindings. Create a common header file that they can all include in order to reduce the content generated across all these types.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id7af8542613503dbd745158c89892ca252eadf5a
show more ...
|
| 60a94305 | 06-Jan-2023 |
Ed Tanous <edtanous@google.com> |
Fix meson warning
Meson warns on the calls to run_command.
WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in fu
Fix meson warning
Meson warns on the calls to run_command.
WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300
This commit does as meson recommends, and adds check: true to all run_command calls, which will be the default.
Change-Id: I281df6ed32c935ce7d3664a0ad628cc81dbac3a8 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
| 018b8ff1 | 05-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
shell: reformat with beautysh
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2717d31983fd17fab557bb92fc55e08e248f1159 |
| ce8d16d9 | 07-Sep-2022 |
Willam A. Kennington III <wak@google.com> |
treewide: Leverage sdbus++-gen-meson
This makes us more consistent with other projects instead of writing meson builds for sdbus++ by hand.
Change-Id: I38b69bc67b6a3d80cda1b508a76e106a50d8ab93 Sign
treewide: Leverage sdbus++-gen-meson
This makes us more consistent with other projects instead of writing meson builds for sdbus++ by hand.
Change-Id: I38b69bc67b6a3d80cda1b508a76e106a50d8ab93 Signed-off-by: Willam A. Kennington III <wak@google.com>
show more ...
|