History log of /openbmc/sdbusplus/tools/ (Results 126 – 150 of 260)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e05376e808-Oct-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: clean up TODO

Residual TODO comment posted a question on if static_cast can
throw. It cannot, so remove comment.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ief61653772

sdbus++: clean up TODO

Residual TODO comment posted a question on if static_cast can
throw. It cannot, so remove comment.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ief616537723c6e66090a9b20a227ce79677cee51

show more ...

4690d88c08-Oct-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: handle duplicate generated variant types

4ac7e56e8e18202fad3b2734346c6d4c7a6957fc added support for 'size_t'
and 'ssize_t' types to sdbus++. On some architectures these collide
with '[u]in

sdbus++: handle duplicate generated variant types

4ac7e56e8e18202fad3b2734346c6d4c7a6957fc added support for 'size_t'
and 'ssize_t' types to sdbus++. On some architectures these collide
with '[u]int32_t' or '[u]int64_t' types and so may not be added to a
combined variant (ie. variant<uint32_t, size_t> will fail to compile
on some architectures). The generated bindings in sdbus++ need a
variant from the set of all properties for some of the constructor
forms.

Create a template type which will formulate a non-duplicative type set
from which a variant can be constructed and modify the sdbus++ generator
to use this variant type instead of std::variant directly. Added test
cases here to cover this condition for 'size' and 'ssize' sdbus++ types.

It is possible this could have been resolved in the generator itself,
but then the generator would have needed to know which architecture the
generated bindings were going to be compiled for. This would have made
the header files incompatible between x86-64 and arm32. I chose instead
to keep the header files consistent across all architectures and let the
compiler make the type decision.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7db5ad2c32d86d37d920a1801cdabfcaeda89489

show more ...

d5ce346c11-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add type 'object_path' alias

The underlying dbus and sdbusplus type is 'object_path', but the
current sdbus++ type is 'path'. Add an alias which is more obvious.

There are currently some

sdbus++: add type 'object_path' alias

The underlying dbus and sdbusplus type is 'object_path', but the
current sdbus++ type is 'path'. Add an alias which is more obvious.

There are currently some users of 'path' is phosphor-dbus-interfaces,
so we cannot immediately remove 'path'. Once this is merged we can
migrate them to 'object_path'.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iee65fefe890b7bef351a39fa9fec403d3a086a78

show more ...

d24bf31b11-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: include headers for enums inside complex types

Enumerations can be inside complex types such as 'array[enum[...]]', but
these enums were not previously included in the generated `#include`

sdbus++: include headers for enums inside complex types

Enumerations can be inside complex types such as 'array[enum[...]]', but
these enums were not previously included in the generated `#include`
directives. Support enums buried inside a complex type for the header
file `#include` generation.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I40accda96ad355d1ffeb039a24f8007bf3f214cf

show more ...

4ac7e56e10-Sep-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add size_t / ssize_t types to YAML

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4bbbf273e588bdc560c27fc6e208530c19c30f4b

1147250724-Aug-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gen-meson: install tool

Add to setup.py so the tool is installed along with other scripts.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia6f601e0892dfec8a84c9539021bc95337

sdbus++-gen-meson: install tool

Add to setup.py so the tool is installed along with other scripts.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia6f601e0892dfec8a84c9539021bc953375a9201

show more ...

847a0c3724-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gen-meson: create tool for helping with meson

The previous attempt at a meson-helper tool (sdbus++-gendir) had
some usability issues integrating with meson that was not agreeable
to other de

sdbus++-gen-meson: create tool for helping with meson

The previous attempt at a meson-helper tool (sdbus++-gendir) had
some usability issues integrating with meson that was not agreeable
to other developers. The two main complaints were that it did not
automatically catch changes to YAML files and it re-ran the processing
on every YAML file.

The new direction is to create this helper tool which will generate a
tree of meson.build files that can be checked in directly to a
repository and updated whenever a YAML file is added (or removed).

This tool will both create the tree of meson.build necessary for
generating all C++/header and markdown files. The meson targets created
by the tool also contain callbacks into this tool to abstract details on
which / how sdbus++ is called to generate the output files.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I410ad2121274b2ba9e6f14985bc7b6a2c92e65e7

show more ...

c6a5bd8827-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: fix NamedElement exception handling

The exception handling in NamedElement.__getattribute__ changed
behavior in an attempt to resolve issues reported by pycodestyle.

The original code had

sdbus++: fix NamedElement exception handling

The exception handling in NamedElement.__getattribute__ changed
behavior in an attempt to resolve issues reported by pycodestyle.

The original code had a generic 'except:' which was warned by
pycodestyle and then was changed to 'except e:'. This syntax
means it only handles an exception of type 'e' (this was intended
to be something like 'except Exception as e:'). Fix by replacing
'e' with the generic exception type 'Exception'.

Fixes 9f77a47af1585a17c0c4e93afe1f935eb78e827e.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I767a41a0dc619c110ff40a2bf17739c59ee7864c

show more ...

9f77a47a16-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

python: fix pycodestyle issues

Create a file 'setup.cfg' so that openbmc-build-scripts will
automatically run 'pycodestyle' on the code base.

Fix up any issues already reported by pycodestyle.

Sig

python: fix pycodestyle issues

Create a file 'setup.cfg' so that openbmc-build-scripts will
automatically run 'pycodestyle' on the code base.

Fix up any issues already reported by pycodestyle.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5d98df0b844e5cbdbdb4dc580cb4c406538f3b4f

show more ...

c65b3aab16-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: fix shellcheck warnings

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id0b0b467f72c79fe32470780994b43cef91cafdc

70bdfdd309-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: ensure errors exit with error code

If 'wait' is called without a pid, it waits for all existing
jobs to exit but does not reproduce the return code of the waited-on
jobs. This means

sdbus++-gendir: ensure errors exit with error code

If 'wait' is called without a pid, it waits for all existing
jobs to exit but does not reproduce the return code of the waited-on
jobs. This means that if an error occurs in the sdbus++ processing
this script would still return a good return code.

Create a 'waitall' function that waits for pending jobs one at a time
so that any error code is correctly caught and replicated to the caller
of this script.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic7745752fd5bdde2b924a7509ea64464af73fdd7

show more ...

4f299e0310-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: skip emitting readonly set-property callback

Properties with the 'readonly' and 'const' flag already skip
registering the callback with sdbus, but were still emitting
the function. Skip em

sdbus++: skip emitting readonly set-property callback

Properties with the 'readonly' and 'const' flag already skip
registering the callback with sdbus, but were still emitting
the function. Skip emitting the function (and associated forward
declaration) to avoid the wasted space.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0afd921a0bb0b7647ef1ca189f46cd4489547cd0

show more ...

e1c73d3b10-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: support 'readonly' flag

The previous documentation of 'const' did not match the
specification at a D-Bus level nor the implementation in sdbus++.
Correct the documentation for 'const' and a

sdbus++: support 'readonly' flag

The previous documentation of 'const' did not match the
specification at a D-Bus level nor the implementation in sdbus++.
Correct the documentation for 'const' and add a new 'readonly' flag
which enables the previously documented behavior for 'const.

This was reported by a user outside of the openbmc project which had
already been using the 'readonly' flag in their YAML to identify this
condition. Previously, sdbus++ silently ignored flags it didn't
explicitly support but as of 20255a5fce55a0743dc3d307d1168f18ed553751
this turned into an error.

There are cases of interfaces in 'phosphor-dbus-interfaces' currently
using 'const' where they likely desire a 'readonly' instead. We are
not changing the behavior of 'const' with this commit, so there would
be no regressions induced by this code change.

Resolves openbmc/sdbusplus#48.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I690cb424f5fd00da190343a345ae57ccae393041

show more ...

738e45de02-Jul-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: server: fix PropertyVariant order

A type is generated to define a variant of all possible properties of an
dbus object: PropertyVariant. This C++ type was not stable from
run-to-run becaus

sdbus++: server: fix PropertyVariant order

A type is generated to define a variant of all possible properties of an
dbus object: PropertyVariant. This C++ type was not stable from
run-to-run because it was generated as 'join(set(...))'. Insert a
'sorted' to ensure that the set keys are sorted before being inserted
into the generated C++ type definition, ensuring that the type is
stable.

Reported-by: Jason Bills <jason.m.bills@linux.intel.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icbec8ee24e89bafdbac956e7587c3fdf913b90ba

show more ...

1b7a588723-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: move main to module

The python bytecode cache only caches modules and not scripts.
Move the 'main' function of sdbus++ into the submodule so we get
more code hitting in the bytecode cache,

sdbus++: move main to module

The python bytecode cache only caches modules and not scripts.
Move the 'main' function of sdbus++ into the submodule so we get
more code hitting in the bytecode cache, which has a minor speed-up.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5f20ec14c899a111e1abb073e26229d41e19822c

show more ...

b2bc0c7319-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: avoid duplicate filenames with --list-all

With the `--list-all` option, the program can end up emitting the
filename for output files multiple times. This can cause issues with
typi

sdbus++-gendir: avoid duplicate filenames with --list-all

With the `--list-all` option, the program can end up emitting the
filename for output files multiple times. This can cause issues with
typical use cases of utilizing sdbus++-gendir as part of meson, because
a plain usage of this tool may end up causing duplicated build actions.
In the conversion to meson in phosphor-dbus-interfaces it was noted that
the same markdown files could be installed twice.

Create a hash table to keep track of which filenames have been emitted
and prevent duplicate emission.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1d8d69c6df3ec9b13acfe955f8cc3e81d8748033

show more ...

0b731e0919-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: avoid stale data on re-run

The foo.md file is formed from both a foo.interface.yaml and
foo.errors.yaml, but it is possible that only one of them exists. In
the case where only foo.

sdbus++-gendir: avoid stale data on re-run

The foo.md file is formed from both a foo.interface.yaml and
foo.errors.yaml, but it is possible that only one of them exists. In
the case where only foo.errors.yaml existed, sdbus++-gendir will
concatentate output from multiple executions into the same markdown
file, due to the use of 'append' mode.

Improve sdbus++-gendir by adding a pass through the files that creates
an empty file for any files which are later written to in append mode.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I38a11755a9d05358f4f76665ff855287a3c2da80

show more ...

b98bdc6f16-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add support for 'set'

Add 'set' as a supported type to `sdbus++` and set as `std::set`.
The use of ordered-set is to match 'dict' as `std::map` and because
'struct' is `std::tuple`, which h

sdbus++: add support for 'set'

Add 'set' as a supported type to `sdbus++` and set as `std::set`.
The use of ordered-set is to match 'dict' as `std::map` and because
'struct' is `std::tuple`, which has `operator<=>` but not `std::hash`.
This ensures better compatiblilty with possible property type choices
by users.

Also, add a few test cases to ensure `std::set` and `std::unordered_set`
are well-covered.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I59605db1b22d54f783d807eda1e1ec1f9eb6792f

show more ...

0b2e48e209-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: simplification refactor

Simplify sdbus++gendir by creating an internal function for
making the sdbus++ calls.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I09fd395

sdbus++-gendir: simplification refactor

Simplify sdbus++gendir by creating an internal function for
making the sdbus++ calls.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I09fd395e8bb45cb4b41189e8939ea9a1d317f027

show more ...

e113b20609-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: handle missing nproc

The bitbake environment doesn't have nproc unless we add a
dependency on coreutils-native, which surprisingly isn't already
in the dependency graph. That is a h

sdbus++-gendir: handle missing nproc

The bitbake environment doesn't have nproc unless we add a
dependency on coreutils-native, which surprisingly isn't already
in the dependency graph. That is a heavy lift for a single call,
so add an alternative to look at /proc/cpuinfo when nproc doesn't
exist.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I12d2b418cbee16ea544b85f9b4bc78605ee190af

show more ...

bb140d1b05-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: run in parallel

Using this tool on a repository like phosphor-dbus-interfaces requires a
large number of invocations to the python script. Add option to run
them in parallel and def

sdbus++-gendir: run in parallel

Using this tool on a repository like phosphor-dbus-interfaces requires a
large number of invocations to the python script. Add option to run
them in parallel and default to ${nproc} jobs in parallel.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9dd347680f41de50215d427e59b3616415dc7fe7

show more ...


/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/README.md
/openbmc/sdbusplus/include/sdbusplus/server/bindings.hpp
/openbmc/sdbusplus/include/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/include/sdbusplus/server/manager.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/slot.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/read_into_tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/tuple_to_array.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/src/exception.cpp
/openbmc/sdbusplus/src/sdbus.cpp
/openbmc/sdbusplus/src/server/transaction.cpp
sdbus++-gendir
20255a5f04-Jun-2020 Waqar Hameed <waqarh@axis.com>

Add support for vtable flags for properties

This adds support for specifying the vtable flags
`SD_BUS_VTABLE_DEPRECATED`, `SD_BUS_VTABLE_HIDDEN`,
`SD_BUS_VTABLE_UNPRIVILEGED`, `SD_BUS_VTABLE_PROPERT

Add support for vtable flags for properties

This adds support for specifying the vtable flags
`SD_BUS_VTABLE_DEPRECATED`, `SD_BUS_VTABLE_HIDDEN`,
`SD_BUS_VTABLE_UNPRIVILEGED`, `SD_BUS_VTABLE_PROPERTY_CONST`,
`SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE`,
`SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION` and
`SD_BUS_VTABLE_PROPERTY_EXPLICIT` for properties. The list of flags in
the YAML files will be ORed together. If no flags have been specified,
we add SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE by default (as before, just
too preserve the behavior; even though one would maybe like to specify
this explicitly).

Change-Id: Ib752cae6e74b2265c75e68707e2520f88f3181e8
Signed-off-by: Waqar Hameed <waqarh@axis.com>

show more ...

3e3a665a04-Jun-2020 Waqar Hameed <waqarh@axis.com>

Add support for vtable flags for methods

This adds support for specifying the vtable flags
SD_BUS_VTABLE_DEPRECATED, SD_BUS_VTABLE_HIDDEN,
SD_BUS_VTABLE_UNPRIVILEGED and SD_BUS_VTABLE_METHOD_NO_REPL

Add support for vtable flags for methods

This adds support for specifying the vtable flags
SD_BUS_VTABLE_DEPRECATED, SD_BUS_VTABLE_HIDDEN,
SD_BUS_VTABLE_UNPRIVILEGED and SD_BUS_VTABLE_METHOD_NO_REPLY for
methods. The list of flags in the YAML file will be ORed together.

Change-Id: I7762ffb15a1483760f3b7e0ea02e80fd52ebd9b9
Signed-off-by: Waqar Hameed <waqarh@axis.com>

show more ...

7f99709b01-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

build: remove autotools builds

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I57027dd772b088d1d3659b23d5a1431a31b9aaa2

80948b8127-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gendir: remove redundant case in arg-parsing

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I16adee23f5bbcc00567b6bf07dbdd529cfe32550

1234567891011