#
f1d999b5 |
| 24-Jan-2024 |
Patrick Williams <patrick@stwcx.xyz> |
async: client: add preserve function and fix proxy
Add a method to "preserve" a client so that the string's captured can live beyond a scope. Fix the proxy preserve function.
Signed-off-by: Patric
async: client: add preserve function and fix proxy
Add a method to "preserve" a client so that the string's captured can live beyond a scope. Fix the proxy preserve function.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I28f32513f482b6d8752766af0368f837e365607a
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 ...
|
#
556eae9f |
| 18-Oct-2023 |
Vlad Sytchenko <vsytch@google.com> |
async: client: fix preserved alias
Change-Id: I2a1c168d02b8f3041c15b9ad82d39df74962f800 Signed-off-by: Vlad Sytchenko <vsytch@google.com>
|
#
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 ...
|
#
4a9e4221 |
| 18-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: add context_ref class for CRTP patterns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6364f6f5a654ec0c628112637014ae2daed5d740
|
#
a50e14ba |
| 25-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: client: fix uninitialized proxy error on clang
When compiling with Clang, the following error is raised: ``` ../include/sdbusplus/async/client.hpp:36:39: error: field 'proxy' is uninitialized
async: client: fix uninitialized proxy error on clang
When compiling with Clang, the following error is raised: ``` ../include/sdbusplus/async/client.hpp:36:39: error: field 'proxy' is uninitialized when used here [-Werror,-Wuninitialized] : Types<decltype(proxy)>(ctx, proxy)..., ctx(ctx) ```
Fix this by passing a temporarily initialized proxy, which would have the same value as the one to-be-constructed.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2ab8ad05102799b94a25a823e1dbcfc7e1b70053
show more ...
|
#
17ad5d2b |
| 19-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: fix reference initializer warning
Clang is unhappy about an initializer for a member reference, even though the constructors properly initialize the value:
``` ../include/sdbusplus/async/cli
async: fix reference initializer warning
Clang is unhappy about an initializer for a member reference, even though the constructors properly initialize the value:
``` ../include/sdbusplus/async/client.hpp:24:35: error: non-const lvalue reference to type 'sdbusplus::async::context' cannot bind to an initializer list temporary ```
Drop the `{}` so the member is uninitialized.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If1f12e8eac4913f0147f39157dd9c48d1803bb9e
show more ...
|
#
3cd1c348 |
| 26-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: move context to constructor
The async::context is needed for every client invocation, since that is how the async task is generated. Rather than pass it in as a parameter on
sdbus++: async: client: move context to constructor
The async::context is needed for every client invocation, since that is how the async task is generated. Rather than pass it in as a parameter on each function invocation, add it as a constructor to the client-proxy object.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic1c8ec2260b7d4774649de9559df466058a50e14
show more ...
|
#
4a594c01 |
| 25-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add start of an async client
Add generator mako templates to generate a simple async client, a corresponding implementation of the 'calculator' interface as a client, and a client aggregati
sdbus++: add start of an async client
Add generator mako templates to generate a simple async client, a corresponding implementation of the 'calculator' interface as a client, and a client aggregation class (client_t) similar to the server aggregation class we have (sdbusplus::server::object_t).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6795b2d051bf4d759cb319a9388b23e29d140244
show more ...
|