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 ...
|
ec40c495 | 28-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: add schema
Add jsonschema for new error and event design[1]. Schema is based on the schema originally in the document but enhanced for better schema validation of required and/or c
sdbus++: events: add schema
Add jsonschema for new error and event design[1]. Schema is based on the schema originally in the document but enhanced for better schema validation of required and/or conflicting properties.
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic64a98825080d990d904b788cfaed45b91e8a39e
show more ...
|
3baa3045 | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: Iab32afe9e86f7f4c18984ad2c7717d7cbfd422bb Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
e12a23cc | 22-Feb-2024 |
Ed Tanous <ed@tanous.net> |
Make code compile on clang-18
To do this requires fixing some minor warnings around templates.
stdexec uses variables of the form __foo to denote variables that aren't used. This throws some warni
Make code compile on clang-18
To do this requires fixing some minor warnings around templates.
stdexec uses variables of the form __foo to denote variables that aren't used. This throws some warnings when trying to compile with clang.
Update the meson file to ignore those warnings when we detect clang.
With this change, and clang-18, code now compiles.
Change-Id: I72bc0ab7a818b7913831749b6246f54e7b092e0b Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
fdbc18ff | 28-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: server: avoid ambiguous base-class error
Fix the same ambigous base-class error in the async::server classes as was fixed for the async::client with Change I047f00ca8df071eef13e8fdd71a56910cc
async: server: avoid ambiguous base-class error
Fix the same ambigous base-class error in the async::server classes as was fixed for the async::client with Change I047f00ca8df071eef13e8fdd71a56910cc7b3e26.
When the async::server is used with multiple interfaces, there was an ambiguous base-class error in the helper class used to derive the async::context from `this`. Turn it into a static function with a `self` parameter instead of relying on `this`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If985dbb5197feaec0f4b874a16994400ab88a9e6
show more ...
|
d6f15eeb | 28-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: common: move PropertiesVariant from server
PropertiesVariant is currently useful outside of the server constructor, such as cases where someone wants to create a signal match against the Pr
sdbus++: common: move PropertiesVariant from server
PropertiesVariant is currently useful outside of the server constructor, such as cases where someone wants to create a signal match against the PropertiesChanged signal. Move it to common since we don't have a better solution for signals presently.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7ce53a8c796fac0713ac42fe29e364bf9b2e745c
show more ...
|
ae019280 | 04-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: client: avoid ambiguous base-class error
When using multiple generated client classes with client_t, we can end up with an ambiguous base-class error. Change the way the `client_context_frie
async: client: avoid ambiguous base-class error
When using multiple generated client classes with client_t, we can end up with an ambiguous base-class error. Change the way the `client_context_friend` utility derives the context pointer from the `Client` template type, to avoid the ambiguity.
Previous failure when inheriting both `state::BMC` and `state::Host` into a single `client_t`:
``` error: 'sdbusplus::async::client::details::client_context_friend' is an ambiguous base of 'sdbusplus::async::client::client<true, true, false, sdbusplus::client::xyz::openbmc_project::state::BMC, sdbusplus::client::xyz::openbmc_project::state::Host>' return static_cast<T*>(this)->ctx; ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I047f00ca8df071eef13e8fdd71a56910cc7b3e26
show more ...
|
f6e67e87 | 14-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: aserver: fix method parameter unpack
If there is only a single parameter to a method call, the unpack function on message does not return a tuple but a value. We should only use the struct
sdbus++: aserver: fix method parameter unpack
If there is only a single parameter to a method call, the unpack function on message does not return a tuple but a value. We should only use the structured-binding syntax when there are multiple parameters. Update the mako template accordingly.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I41d7dfc1966383cfc94629e50bc494b7a42ecaf9
show more ...
|
eba7a4df | 14-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: common: allow empty path segment values
A missing 'value' would crash in a path YAML would crash the generator. Change this so it doesn't crash, but throws an exception for a non-segment p
sdbus++: common: allow empty path segment values
A missing 'value' would crash in a path YAML would crash the generator. Change this so it doesn't crash, but throws an exception for a non-segment path. For a path segment, we can turn the 'name' into a path segment with `snake_case`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16c8bc30f0b75359d3105c0d8035554cc381ceee
show more ...
|
2369ec46 | 01-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: common: generate service_names
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I67c3ee58595a49d0104e9b1bc421052f9a405e01 |
c0290e4e | 01-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: common: generate object_paths
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iacaa65fa1063b34269d55df3c581e5921dbbc300 |
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 ...
|
bb5ca7c4 | 25-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: error: move cpp functions inline
All of the functions generated in the error.cpp files are trivial accessors that likely emit smaller code by making them inline (since a trivial member acce
sdbus++: error: move cpp functions inline
All of the functions generated in the error.cpp files are trivial accessors that likely emit smaller code by making them inline (since a trivial member access should be cheaper than a function call). Move them inline, which eliminates all content in the error.cpp and would allow it to be removed from the generator.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If1de781e315b19334e025b47a2b26ca5e8ffbe04
show more ...
|
171a344d | 25-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: error: simplify namespace and match clang-format
- Use the C++17 nested namespace identifiers. - Align the generated code with clang-format's output.
Signed-off-by: Patrick Williams <patri
sdbus++: error: simplify namespace and match clang-format
- Use the C++17 nested namespace identifiers. - Align the generated code with clang-format's output.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5a32508f09037dea3de6bb0dd7e0ead7302d9927
show more ...
|
c0fac81a | 24-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: server: change property variable to trailing underscore
Identifiers beginning with underscores are sometimes used for reserved names and an often convention is to use trailing unders
sdbus++: async: server: change property variable to trailing underscore
Identifiers beginning with underscores are sometimes used for reserved names and an often convention is to use trailing underscore for members. Since the properties are now exposed to users writing async server bindings, use an identifier that won't have the possibility of reserved collisions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25be6b2dee754ce33f486a5eec285a4ea659983e
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 ...
|
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 ...
|
d3eca0e6 | 17-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: client: remove deprecated namespace
The only user of the deprecated namespace for client headers was removed from phosphor-buttons with I47ed9660284c67c618224d034120063dfb86c6d0. Remove su
sdbus++: client: remove deprecated namespace
The only user of the deprecated namespace for client headers was removed from phosphor-buttons with I47ed9660284c67c618224d034120063dfb86c6d0. Remove support for it.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id9333784e4f90f3744c3f8100f3ed7ae42b2d897
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 ...
|
351f8cd5 | 18-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: client: use CRTP to eliminate excess context refs
The types used to create a client proxy object need to have access to the async::context, but the sdbusplus::async::client_t that holds them
async: client: use CRTP to eliminate excess context refs
The types used to create a client proxy object need to have access to the async::context, but the sdbusplus::async::client_t that holds them already has a reference. Use CRTP so that there is only a single held reference per client, no matter how many types it contains.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9b3356a6d28f09f10dea74ca310812c7cb9acfa0
show more ...
|
77214261 | 17-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: simplify enum typename usage
Now that we have a common header file for the interface enums, the enum typename and header calculation can be significantly simplified.
Signed-off-by: Patrick
sdbus++: simplify enum typename usage
Now that we have a common header file for the interface enums, the enum typename and header calculation can be significantly simplified.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I088543375824c42230c32acabc2531427904cd9e
show more ...
|