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 ...
|
e44f194c | 17-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
example: remove Calculator.errors.yaml
Example is moved to use the new event framework so there is no need for this YAML.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1ce615c6956
example: remove Calculator.errors.yaml
Example is moved to use the new event framework so there is no need for this YAML.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1ce615c695646bd97f8c9d87c2c64a70a62adf14
show more ...
|
d731d263 | 17-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: create event classes
Generate an equivalent amount of exception class as the `errors.yaml` supported and convert the examples to use it.
Tested:
``` ‣ Type=error Endian=l Flags=
sdbus++: events: create event classes
Generate an equivalent amount of exception class as the `errors.yaml` supported and convert the examples to use it.
Tested:
``` ‣ Type=error Endian=l Flags=1 Version=1 Cookie=9 ReplyCookie=2 Timestamp="Tue 2024-09-17 18:21:35.649674 UTC" Sender=:1.2489 Destination=:1.2495 ErrorName=net.poettering.Calculator.DivisionByZero ErrorMessage="Attempted to divide by zero." UniqueName=:1.2489 MESSAGE "s" { STRING "Attempted to divide by zero."; }; ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4b2671838639d1e8be1ccdf655b699a98b9c2116
show more ...
|
144b4f3d | 16-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
example: generate markdown
Ensure the markdown generation is tested by running it on the example YAML files.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib16cf3a8a468dd9d0c59e2aa
example: generate markdown
Ensure the markdown generation is tested by running it on the example YAML files.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib16cf3a8a468dd9d0c59e2aaac604ef08b79f141
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 ...
|
5800d079 | 16-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++-gen-meson: fix meson dependencies
When multiple YAML files are used (for example both interface and error) only the `interface.yaml` was ending up in the generated `inputs` field in the `cus
sdbus++-gen-meson: fix meson dependencies
When multiple YAML files are used (for example both interface and error) only the `interface.yaml` was ending up in the generated `inputs` field in the `custom_target`. This made it so that changes in the other YAML files were not causing rebuilds.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib550aade282ceca97f31a435d51f35e7de592224
show more ...
|
06f265f6 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I4f63258febea27dae710c252033b9151e02be7e8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
603acb82 | 18-Jul-2024 |
Matt Spinler <spinler@us.ibm.com> |
example:calculator: Add property overrides
Add examples of how to override the get and set property calls.
Change-Id: I1436ed7c286aa141ffb63a6af8c4766bf764f74b Signed-off-by: Matt Spinler <spinler@
example:calculator: Add property overrides
Add examples of how to override the get and set property calls.
Change-Id: I1436ed7c286aa141ffb63a6af8c4766bf764f74b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
a4df19a7 | 28-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
build: Fix requirements for tests and example features
Currently assert checks inside the meson.build files check the presence of the 'tests'/'example' options by using 'get_option(...).enabled()' e
build: Fix requirements for tests and example features
Currently assert checks inside the meson.build files check the presence of the 'tests'/'example' options by using 'get_option(...).enabled()' expression. This is a bug since this expression is only true for the 'enabled' options and in the local build 'tests' and 'example' features are set to 'auto'. To correct the issue use 'get_option(...).allowed()' which returns true both for 'enabled' and 'auto'.
Tested: On the system without boost "meson setup build" now fails with a message: "Boost is required when tests are enabled"
Change-Id: I92b4f5de01f47d27c8fae32b641e4b2083fe5b25 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
c53fe51c | 06-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: add request_name method
One area we did a poor job on in the older sync interfaces was signals. Signals should only be emitted when a name is requested, but we didn't have a way to t
async: context: add request_name method
One area we did a poor job on in the older sync interfaces was signals. Signals should only be emitted when a name is requested, but we didn't have a way to track that. Add a `request_name` method on the async context so we can track if a name has been requested in the context (for later use by signal enhancements).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0abea30e3825d41dedd44de86b8b8bca4edbaf9c
show more ...
|
2bf0bb29 | 05-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
timer: deprecate phosphor namespace
"phosphor" is a namespace used in some OpenBMC repositories but has only one usage in sdbusplus and the class is not very OpenBMC-specific.
Move the Timer class
timer: deprecate phosphor namespace
"phosphor" is a namespace used in some OpenBMC repositories but has only one usage in sdbusplus and the class is not very OpenBMC-specific.
Move the Timer class into the sdbusplus namespace and mark 'phosphor::Timer' as a deprecated alias.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia8c79a25755c9a2c4dc6f92bf1de8100622ef313
show more ...
|
fcd80ef1 | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
Revert "build: use allowed over enabled"
The meson options used here are dependency checks which should be handled by the disabler flow.
This reverts commit dabaffecf4eb345e71ee942a9035ddaa5e0eb8ac
Revert "build: use allowed over enabled"
The meson options used here are dependency checks which should be handled by the disabler flow.
This reverts commit dabaffecf4eb345e71ee942a9035ddaa5e0eb8ac.
Change-Id: Ia81d168d975efc2c97fd0fefcfee624f2571e1e8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
dabaffec | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I115a52f288be4115297a848afa241f902f48dec2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
6db88387 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I1d7d35c8035993df4c164bfb055d3be476d3ea84 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
4b62ae50 | 25-Aug-2023 |
Hannu Lounento <hannu.lounento@vaisala.com> |
Catch the correct sdbusplus exception
sdbusplus::exception::SdBusError is intended to be internal to the sdbusplus library [1] and not depended on by client code:
['SdBusError'] was always inte
Catch the correct sdbusplus exception
sdbusplus::exception::SdBusError is intended to be internal to the sdbusplus library [1] and not depended on by client code:
['SdBusError'] was always intended to be internal to sdbusplus (in fact, it inherits from an error called 'internal_error')
and `include/sdbusplus/exception.hpp`:
/** Exception for when an underlying sd_bus method call fails. */ class SdBusError final : public internal_exception
(Only) catching and handling `sdbusplus::exception::SdBusError` may lead to some sdbusplus exceptions being unhandled and thus propagating [1]:
Quite likely, by catching this exception, you are missing other exceptions that sdbusplus can throw.
The correct general exception seems to be `sdbusplus::exception::exception`.
Tested: Executed the affected `asio-example` with and without this change and verified the output was the same (except for differences in the order of printed messages, which seems to vary from invocation to another also without the change).
[1] The message "sdbusplus exception type SdBusError" on the sdbusplus mailing list: https://lore.kernel.org/openbmc/YTDvfIn4Z05mGdCx@heinlein/
Change-Id: I5cda83c593730f6c0ce5735fb7c46d43f2066c9d Signed-off-by: Hannu Lounento <hannu.lounento@vaisala.com>
show more ...
|
b4bae8f6 | 01-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
example: calculator: use YAML paths and service_names support
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia2a51f5c9ef62715b9e65e3935c64d6da7a49f31 |
43fcd1ce | 25-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: error: move error to front of namespace
To be consistent with the new 'server' and 'client' namespaces, refactor the 'error' namespace in the same way. Move 'error' to the front and use sn
sdbus++: error: move error to front of namespace
To be consistent with the new 'server' and 'client' namespaces, refactor the 'error' namespace in the same way. Move 'error' to the front and use snake_case for namespace and struct identifiers. Leave the same backwards compatibility, which can be disabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1a147a153798c84eaac3f6bf9581c6ca31ecaf4f
show more ...
|
b736e075 | 24-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: make methods snake_case to match server
Use snake_case in generated bindings to match the server bindings naming convention.
Signed-off-by: Patrick Williams <patrick@stwcx.x
sdbus++: async: client: make methods snake_case to match server
Use snake_case in generated bindings to match the server bindings naming convention.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I17c89a2e85cd4906bbfe1eaab86ab0b1837aad88
show more ...
|
3a363a6a | 22-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: make calculator server match sync behavior
Delete toy code and make the async implementation match the sync implementation (except some method calls are "async").
Signed-off-by: Pat
sdbus++: async: make calculator server match sync behavior
Delete toy code and make the async implementation match the sync implementation (except some method calls are "async").
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8cdc9fb8d064e6e10c025b2fce0deef549942941
show more ...
|
e15ff88b | 22-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: generate method-call fn
Add binding generation for method-call functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I34ac44ae0cdb43a18b96a4ddc5e67df4971
sdbus++: async: server: generate method-call fn
Add binding generation for method-call functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I34ac44ae0cdb43a18b96a4ddc5e67df4971da939
show more ...
|
f07cad93 | 21-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: make properties protected
When the implementation wants to override the property set/get methods, they likely want to access the underlying storage. Move them to be protecte
sdbus++: async: server: make properties protected
When the implementation wants to override the property set/get methods, they likely want to access the underlying storage. Move them to be protected rather than private so they can be modified.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib7e752e1fa6e0f358f6e663aa51c2cf0c93118b7
show more ...
|
72f7116a | 20-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: generate set-property fn
Add binding generation for set-property functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3fce183f668ea339a035b8186630ffc04
sdbus++: async: server: generate set-property fn
Add binding generation for set-property functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3fce183f668ea339a035b8186630ffc04aa9af82
show more ...
|
f84f1117 | 20-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: generate get-property fn
Add binding generation for get-property functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I60d44b25d718373acfd581faf158f45f5
sdbus++: async: server: generate get-property fn
Add binding generation for get-property functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I60d44b25d718373acfd581faf158f45f5b5430e9
show more ...
|
bf0283ae | 19-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: generate signal emit fns
Populate enough of the generator to define the basic class structure and generate bindings for emitting signals.
Signed-off-by: Patrick Williams <pa
sdbus++: async: server: generate signal emit fns
Populate enough of the generator to define the basic class structure and generate bindings for emitting signals.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If62c323f460fc8c73a3aca495e5b89cd84bab32a
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 ...
|