d925c0bc | 23-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: generate exception constructors
Generate constructors for exceptions using the listed metadata.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I99dc912e4ad0746a14d3
sdbus++: events: generate exception constructors
Generate constructors for exceptions using the listed metadata.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I99dc912e4ad0746a14d3053a5653327ae12440dd
show more ...
|
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 ...
|
093034c9 | 23-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: handle redfish-mapping events
Handle loading events with redfish-mapping without crashing.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4140e948d938c775e52d41ec6
sdbus++: events: handle redfish-mapping events
Handle loading events with redfish-mapping without crashing.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4140e948d938c775e52d41ec65793a70364ab831
show more ...
|
8bde6c7f | 23-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: specify redfish-mapping in schema
Redfish events are expected to conform to a specific format and our YAML format should omit the version identifiers (since we'll always be using th
sdbus++: events: specify redfish-mapping in schema
Redfish events are expected to conform to a specific format and our YAML format should omit the version identifiers (since we'll always be using the most recent Redfish event registry, which may be newer than the event YAML). Add this information to the schema for validation.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id0c4eaab605f7230fe89670c06d0984e10db51a1
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 ...
|
b750136d | 16-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: generate markdown
Add enough content in event support to generate markdown documentation.
- Create python-translation from event YAML to internal classes and call mako re
sdbus++: events: generate markdown
Add enough content in event support to generate markdown documentation.
- Create python-translation from event YAML to internal classes and call mako renders. - Add empty mako templates for the C++ files. - Add mako templates necessary to generate markdown content.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifd4aa16895b2ed5f72b3bc74170c1c666e29b02e
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 ...
|
60138465 | 16-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: minor tweaks to schema
- Require metadata fields to be UPPER_SNAKE_CASE. - Reference syslog level constants rather than phosphor-logging.
Signed-off-by: Patrick Williams <patrick@s
sdbus++: events: minor tweaks to schema
- Require metadata fields to be UPPER_SNAKE_CASE. - Reference syslog level constants rather than phosphor-logging.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I97d6789518e304914e4cd1c807e4f3221d383b37
show more ...
|
6cb8baa8 | 12-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: allow metadata fields to be enums
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2c659064a95b431de1de96baf90ef16824255f30 |
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 ...
|
88c6a823 | 10-Sep-2024 |
Lei YU <yulei.sh@bytedance.com> |
message: Fix unpack void type
The template unpack<void> is deduced as one argument instead of 0, and results in below compile error: ``` error: variable or field ‘r’ declared void error: return-stat
message: Fix unpack void type
The template unpack<void> is deduced as one argument instead of 0, and results in below compile error: ``` error: variable or field ‘r’ declared void error: return-statement with a value, in function returning ‘void’ [-fpermissive] ```
Fix this by checking void if `sizeof...(Args) == 1` and return void. Also add a unit test case to make sure the code compiles.
Change-Id: I74cca180783645496863393be37215f1d6f4ca02 Signed-off-by: Lei YU <yulei.sh@bytedance.com>
show more ...
|
6ea10e04 | 02-Sep-2024 |
Lei YU <yulei.sh@bytedance.com> |
asio: Fix read into tuple response
Some DBus methods return multiple elements, e.g. `org.freedesktop.resolve1` has a method `ResolveHostname` that returns the result type `a(iiay)st`, which could no
asio: Fix read into tuple response
Some DBus methods return multiple elements, e.g. `org.freedesktop.resolve1` has a method `ResolveHostname` that returns the result type `a(iiay)st`, which could not be "read()" directly as a tuple.
The code was using a tuple to represent the multiple elements, and use `r.read(responseData)` that would result in "Invalid Argument" error.
Fix it by `message::unpack` API to correctly read the response and unpack the multiple elements into the tuple.
Change-Id: I83eb83abf0b079ebf94c1a51a40640533ab04a9f Signed-off-by: Lei YU <yulei.sh@bytedance.com>
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 ...
|
8d40adad | 22-Aug-2024 |
Igor Kononenko <i.kononenko.e@gmail.com> |
transaction: fix -Wconversion c++ warning
Building sdbusplus by meson subproject as a part of external project contains compile warning which can be interpreted as compile error (if external project
transaction: fix -Wconversion c++ warning
Building sdbusplus by meson subproject as a part of external project contains compile warning which can be interpreted as compile error (if external project defines both `-Werror` and `-Wconversion`)
Changing the `Transaction::time` property type to the appropriate `std::time_t` will solve the issue.
Change-Id: I9ab42472ff361aab9487c73d7804531151986e4c Signed-off-by: Igor Kononenko <i.kononenko.e@gmail.com>
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 ...
|
5cee9157 | 30-Jul-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: update to latest commit
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I52e2ff4ea33617fb055981000ce3c2f40faab43e |
3d00e145 | 30-Jul-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: ignore unused parameter warning
Upstream stdexec continues to add unused parameter warnings that are reported by GCC -Wall. Add pragmas to squelch them so that we don't need to keep chasin
stdexec: ignore unused parameter warning
Upstream stdexec continues to add unused parameter warnings that are reported by GCC -Wall. Add pragmas to squelch them so that we don't need to keep chasing these.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia93113bb2136db365a112d69758b2d1fd61d3a24
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 ...
|
03b2c26c | 03-Jun-2024 |
Ed Tanous <etanous@nvidia.com> |
Use asio object_server without boost::coroutine
We already support this flag in asio::connection and other places, where it's used to avoid compatibility issues with boost coroutine v1, which is a p
Use asio object_server without boost::coroutine
We already support this flag in asio::connection and other places, where it's used to avoid compatibility issues with boost coroutine v1, which is a package that isn't widely used, and requires explicitly built libraries (coroutine and context).
This commit supports the same flag in ASIO object server, for things like dbus-sensors, which doesn't make use of asio coroutines.
Change-Id: I75deec77f4434e671fe5028cad14fd9998cf9b40 Signed-off-by: Ed Tanous <etanous@nvidia.com>
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 ...
|
e0698be8 | 14-Jun-2024 |
Patrick Williams <patrick@stwcx.xyz> |
object_path: fix potential buffer overrun
The `filename` function attempted to look at the first character of a substring, which could have been empty. This was noticed by UBSAN in GCC 13.2.
Signe
object_path: fix potential buffer overrun
The `filename` function attempted to look at the first character of a substring, which could have been empty. This was noticed by UBSAN in GCC 13.2.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7397861b6b19ef86d1c5c01dc1007a8804d08ab6
show more ...
|
1a39b64f | 12-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
message: handle vector<bool>
Attempting to create a vector of bools resulted in the following compile error: ``` usr/include/sdbusplus/message/append.hpp:272:9: error: cannot bind non-const lvalue r
message: handle vector<bool>
Attempting to create a vector of bools resulted in the following compile error: ``` usr/include/sdbusplus/message/append.hpp:272:9: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference' ```
Most range-for operations for containers operate on a reference to the value in the container, but `vector<bool>` has a "proxy" due to the bit-wise optimization required by the standard. Switching from `auto&` to `auto&&` allows the proxy to be used (an r-value reference) while also working for the non-proxy case (since `auto&&` will collapse to an l-value reference).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic96a156f29fb9429529080f4319548d91ac0ce41
show more ...
|
6e675883 | 05-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: update to later commit
Later commits in stdexec have some compile issues. Update to the latest one without compile issues, in order to see if a linker issue reported by another developer i
stdexec: update to later commit
Later commits in stdexec have some compile issues. Update to the latest one without compile issues, in order to see if a linker issue reported by another developer is resolved.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I99bb6ee9c383c3cb66a35b23f02a6a0ced102b49
show more ...
|