#
8aea1d81 |
| 17-Jan-2025 |
Adin Scannell <adin@scannell.ca> |
sdbus++: generate `properties` method for client harness
This uses the existing proxy `get_all_properties` method and allows for more efficient fetching of all properties in one shot. A struct is ge
sdbus++: generate `properties` method for client harness
This uses the existing proxy `get_all_properties` method and allows for more efficient fetching of all properties in one shot. A struct is generated for each type, and each field is initialized with its default value (but is not guaranteed to be deserialized).
As errors are less detectable (e.g. perhaps an expected property did not come through?), I considered whether the values in the struct should all be `std::optional`. However, given how other methods are used, it feels like this would result in a crash and assertion failure rather than saving anyone time and effort. The wrong type is detected a suitable exception is thrown in those cases.
Change-Id: Iff7712bd17db39f1ee5699f867e9f17a54eea21b Signed-off-by: Adin Scannell <adin@scannell.ca>
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 ...
|
#
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
|
#
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 ...
|
#
384943be |
| 05-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: fix client_t usage
When using the "Alternatively,..." syntax from calculator-client, we end up with the compiler error:
``` example/gen/net/poettering/Calculator/client.hpp:
sdbus++: async: client: fix client_t usage
When using the "Alternatively,..." syntax from calculator-client, we end up with the compiler error:
``` example/gen/net/poettering/Calculator/client.hpp:149:40: error: ‘constexpr sdbusplus::client::net::poettering::details::Calculator<Proxy>::Calculator(sdbusplus::async::context&, Proxy) [with Proxy = sdbusplus::async::proxy_ns::proxy<true, true, false, false>]’ is private within this context 149 | std::forward<Args>(args)...) ```
Fix this by making the generated alias class a friend of the details class, in addition to the client_t proxy. Add a compile test to ensure this works. Fix up a few whitespace alignment to better match clang-format expectations.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie0def6e6c96acc287c002c157d93016b4a79015c
show more ...
|
#
50f1daea |
| 26-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: example: add a few comments for clarity
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Idf21e9652c005203a3f563b46605354e4711183d
|
#
65e4d302 |
| 26-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: add generated property calls
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25ad8c0c167af0a55e235e5a7b4a46a3019d94ae
|
#
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 ...
|
#
0241d906 |
| 26-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: async: client: add generated method calls
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I47cf5bc96b545dfe3f917655b5b94db8dac9c101
|
#
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 ...
|