History log of /openbmc/sdbusplus/ (Results 501 – 525 of 849)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
03d6c01b16-May-2020 Andrew Geissler <geissonator@yahoo.com>

include needed file for runtime_error

Upstream yocto appears to have removed a free include that provided the
def of the std::runtime_error. This causes compile failures when
bringing in the new yoc

include needed file for runtime_error

Upstream yocto appears to have removed a free include that provided the
def of the std::runtime_error. This causes compile failures when
bringing in the new yocto.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I362dc311ffc696b10281d320bb3887b3e82575d2

show more ...

afe80cf210-Apr-2020 Vernon Mauery <vernon.mauery@linux.intel.com>

Include <set> to be able to use std::set

This is causing build errors in other projects.

Change-Id: Ib1dd68a70f5e290ea7d470d36ce56be36aae8536
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel

Include <set> to be able to use std::set

This is causing build errors in other projects.

Change-Id: Ib1dd68a70f5e290ea7d470d36ce56be36aae8536
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...

dca7e16c25-Mar-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Added register_signal method to sdbusplus::asio::dbus_interface

Signals, just like other interface members, should be listed on
interface v-table. This change introduces ability to expose
informatio

Added register_signal method to sdbusplus::asio::dbus_interface

Signals, just like other interface members, should be listed on
interface v-table. This change introduces ability to expose
information about signal defined by D-Bus interface.

Tested by calling function in following ways:
iface->register_signal<void>("Empty"); // -
iface->register_signal<double,std::string>("TwoElems"); // ds
iface->register_signal<std::tuple<int, double>>("Struct"); // (id)
iface->register_signal<std::vector<int>>("Array"); // ai

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: I477ebdee0c4eb814e0c18987c96fe7d7c1eb90e6

show more ...

5de3184619-Feb-2020 Waqar Hameed <waqarh@axis.com>

Update README.md for Python 3

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

18ce803d31-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: switch to python3

Python2 is DEAD! Long live Python3!

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

ddc0eba213-Feb-2020 Lei YU <mine260309@gmail.com>

sdbus++: Generate initial client header

By "client-header" option, sdbus++ could generate a client header file
that provides the code used by the client.

Currently it only includes the interface na

sdbus++: Generate initial client header

By "client-header" option, sdbus++ could generate a client header file
that provides the code used by the client.

Currently it only includes the interface name's string in the header
file, it could be extended in the future.

The client header could be merged together for all the interfaces, so
that an interface library could provide a single header to represent all
the interface strings.

Usage:

sdbus++ -r $(srcdir) -t $(top_builddir)/tools/sdbusplus/templates \
interface client-header <interface>

Tested: Generate the header in example and use static_assert to verify
it is the same as the interface defined in the interface calss.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Idafc4724efa88a2dfd37e3f7735732c45171fd88

show more ...

7eb0d25f13-Mar-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: refactor enum handling for container-types

Previously an attempt was made to support container types holding
an enumeration, like 'struct[int, enum[self.Foo]]', but this code
was not fully

sdbus++: refactor enum handling for container-types

Previously an attempt was made to support container types holding
an enumeration, like 'struct[int, enum[self.Foo]]', but this code
was not fully functional. There are some generated functions that
occur outside of the class that defines the enum, so the fully
qualified namespace is required. Previously, only the enum name
was given, resulting in compile errors.

Refactor the enumeration type handling by inserting C++-like
placeholders into the early-parsed type name and then replace those
placeholders, as appropriate, when it is determined if we need
a fully-qualified or locally-qualified type.

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

show more ...

1dfce5a213-Feb-2020 Lei YU <mine260309@gmail.com>

Make interface and object non-movable

The generated server.hpp for interfaces are non-movable, so there is no
need to make interface and object movable.

Besides, the object was movable but it was b

Make interface and object non-movable

The generated server.hpp for interfaces are non-movable, so there is no
need to make interface and object movable.

Besides, the object was movable but it was broken, that it does not
handle the move correctly, so if an object is moved, both objects will
invoke the destructor and the object will be released twice.

Tested: Verify CI passes, and Witherspoon builds OK.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I772269a5e1a9cdb093cc96fa51b06a5782a6e141

show more ...

67c79b0c19-Feb-2020 Waqar Hameed <waqarh@axis.com>

sdbus++: Use list comprehension when parsing property types

This is more consistent with code-style (c.f. the other branch in the
same if-statement). This was suggested by 2to3-tool.

Signed-off-by:

sdbus++: Use list comprehension when parsing property types

This is more consistent with code-style (c.f. the other branch in the
same if-statement). This was suggested by 2to3-tool.

Signed-off-by: Waqar Hameed <waqarh@axis.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I32c1bcf2e12712e2f9695ae6d1c891061f27ee0e

show more ...

7c5faabe31-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

build: remove interface.mako autoconf gen

The content in interface.mako.server.cpp.in that required
autoconf to generate was moved to property.mako.prototype.hpp.in
with ee6ac694c3e21b24ebd2f32ef552

build: remove interface.mako autoconf gen

The content in interface.mako.server.cpp.in that required
autoconf to generate was moved to property.mako.prototype.hpp.in
with ee6ac694c3e21b24ebd2f32ef55249c5eb44bccd but never removed
from the autoconf generated list. Move it back to a not-.in file.

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

show more ...

f7e2159d24-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: use native enums for message operations

Support was added in earlier commits for handing enums as native
types in message::read and message::append operations. Fix up all
the generated tem

sdbus++: use native enums for message operations

Support was added in earlier commits for handing enums as native
types in message::read and message::append operations. Fix up all
the generated templates to use this support.

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

show more ...

2520704228-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: message: append: add native enum support

Add support for appending enums directly into a sdbusplus message
and generate the required helper functions in the interface server
templates.

sdbusplus: message: append: add native enum support

Add support for appending enums directly into a sdbusplus message
and generate the required helper functions in the interface server
templates.

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

show more ...

978f77d828-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: interface: refactor enum-to-string conversion

Move the enum-to-string conversion functions as static members
inside the interface class, just like the string-to-enum conversion.

Signed-off

sdbus++: interface: refactor enum-to-string conversion

Move the enum-to-string conversion functions as static members
inside the interface class, just like the string-to-enum conversion.

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

show more ...

06d43b8328-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: message: read: add native enum support

Add support for reading enums directly out of a sdbusplus message
and generate the required helper functions in the interface server
templates.

Sig

sdbusplus: message: read: add native enum support

Add support for reading enums directly out of a sdbusplus message
and generate the required helper functions in the interface server
templates.

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

show more ...

6c63b98125-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: message: add type helpers for native enums

In order to be able to handle sdbus++ defined enums natively
with message read and append functions, we need some type
helpers so that the exist

sdbusplus: message: add type helpers for native enums

In order to be able to handle sdbus++ defined enums natively
with message read and append functions, we need some type
helpers so that the existing read/append frameworks know how
to deal with these types.

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

show more ...

a163b17724-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: property: simplify local enum handling

Local enums are prepended with "self." in the YAML files,
which was propagated through some of the internal handling,
such as cppTypeName. Eliminate

sdbus++: property: simplify local enum handling

Local enums are prepended with "self." in the YAML files,
which was propagated through some of the internal handling,
such as cppTypeName. Eliminate this so that cppTypeName is
a real type for local enums.

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

show more ...

18b29bab24-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: property: simplify enum handling

The property cppTypeName use to not be a real C++ type for
enums and was instead a funny 'enum<Name>' type. Simplify
the enum handling so that it becomes a

sdbus++: property: simplify enum handling

The property cppTypeName use to not be a real C++ type for
enums and was instead a funny 'enum<Name>' type. Simplify
the enum handling so that it becomes an almost real type.

For local types there is still a funny 'self.' prepended.

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

show more ...

58d2c91a17-Feb-2020 Lei YU <mine260309@gmail.com>

sdbusplus: Fix build on GCC 8 or ealier

The code to construct sd_bus_vtables uses the designated initializer
syntax that is not supported on GCC 8 or ealier versions.

Workaround it by specific the

sdbusplus: Fix build on GCC 8 or ealier

The code to construct sd_bus_vtables uses the designated initializer
syntax that is not supported on GCC 8 or ealier versions.

Workaround it by specific the return value type, so it compiles on
older GCC versions.

Resolves openbmc/sdbusplus#40

Tested: Verify the code builds with GCC 8.3.0 and 7.4.0;
Verify the generated code is the same with x86-64 GCC 9.2.0
and -Os option on https://godbolt.org/

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I2496efacdb9edf7b8b7f7ad435c192bf402e8d75

show more ...

a66f6b4d09-Jan-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Fix exception handling inside asio coroutine method_handler

By default sdbusplus catches exceptions from method handlers and
translates them to proper error message reply.
See asio/object_server.hpp

Fix exception handling inside asio coroutine method_handler

By default sdbusplus catches exceptions from method handlers and
translates them to proper error message reply.
See asio/object_server.hpp:method_handler for reference.

This behavior is not kept when coroutine is used. If yield_context
was not yet used - exception is caught properly. In other cases
exception was 'leaking' and left unhandled, effectively crashing app.

Following change introduces exception handling similar to previously
mentioned implementation. In case of exception thrown from handler
in coroutine it is caught and translated to proper D-Bus error reply.

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: Id86b77577a2547f999fa1a10ca4316ec0a9ac2d1

show more ...

bd00069f29-Nov-2019 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Fix compilation error in case unix_fd is used in async_method_call

unix_fd has fd sanitization in its append routine. It makes it impossible
to use unix_fd in async_method_call, as it explicitly app

Fix compilation error in case unix_fd is used in async_method_call

unix_fd has fd sanitization in its append routine. It makes it impossible
to use unix_fd in async_method_call, as it explicitly applies const qualifier
to all message arguments.

To keep previous behavior in current unix_fd clients I've added specialization
inside append routine for variables passed by const reference.

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: I3409f9f2b40d14d9486eca203321333ad1bb2efa

show more ...

e57c38e920-Sep-2019 Lei YU <mine260309@gmail.com>

Emit adding/removing interfaces for object server

The object server currently either creats the objects and interfaces, or
defer the signal by not adding objects.

In practice, we have situations th

Emit adding/removing interfaces for object server

The object server currently either creats the objects and interfaces, or
defer the signal by not adding objects.

In practice, we have situations that the code would like to add
interfaces to an existing object, and it's not supported, or needs
tricky code to workaround.
Exmaples:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/5820
https://gerrit.openbmc-project.xyz/c/openbmc/openpower-pnor-code-mgmt/+/5346

This commit adds the support by:
1. Adding emit_added() in interface.hpp and the generated server.hpp
2. Adding a enum class in object's constructor to indicate which action
to do, to create the object, or adding the interface, or defer signal
as before.

So the user of object<> could pass `action::emit_interface_added` to the
constructor to tell the object server *only* emit interface added to
DBus, without emitting object added.
The previous code stays the same behavior:
* If `true` is passed in object's constructor, it defers emitting object
added signal;
* If no extra parameter is passed in object's constructor, it emits
object added signal as before.

Tested: 1. Make sure the openbmc builds fine with
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/25089
because phosphor-logging uses its own server.hpp for interface, the
above patch removes that.
2. Manually write a small service to verify the interfaces are
added and removed by using the `emit_interface_added` action.
3. Added the unit test cases for object.hpp to check the
ctor/dtor with different actions.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I178c5bed3c9ff39ee2ac8d143fbe9131b0753dfa

show more ...

19f24b9b10-Feb-2020 Lei YU <mine260309@gmail.com>

Fix an issue found by cppcheck

cppcheck finds an issue:

[sdbusplus/asio/object_server.hpp:46] ->
[sdbusplus/asio/object_server.hpp:315]: (style) The function 'set'
overrides a function in a base

Fix an issue found by cppcheck

cppcheck finds an issue:

[sdbusplus/asio/object_server.hpp:46] ->
[sdbusplus/asio/object_server.hpp:315]: (style) The function 'set'
overrides a function in a base class but is not marked with a
'override' specifier.

Fix it by adding the override keyword correctly.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ie032229874bb416f7c6ec142d9bf38f8ffcff877

show more ...

5e00177924-Jan-2020 Patrick Williams <patrick@stwcx.xyz>

sdbus++: interface: fix indent of enum-string fn

The convert<enum>FromString functions were indented incorrectly
relative to the rest of the class.

Signed-off-by: Patrick Williams <patrick@stwcx.xy

sdbus++: interface: fix indent of enum-string fn

The convert<enum>FromString functions were indented incorrectly
relative to the rest of the class.

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

show more ...

7501666204-Feb-2020 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: add Patrick Williams

Large portions of the codebase were originally written by me
before maintainers existed. I am returning to the project and
plan to do significant enhancements and

MAINTAINERS: add Patrick Williams

Large portions of the codebase were originally written by me
before maintainers existed. I am returning to the project and
plan to do significant enhancements and cleanups to sdbusplus.

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

show more ...

c079db4b06-Feb-2020 Vernon Mauery <vernon.mauery@linux.intel.com>

Catch async errors so they do not throw

When running an async operation, it is not a good idea to throw because
the current running context is not the context that it was originally
registered from,

Catch async errors so they do not throw

When running an async operation, it is not a good idea to throw because
the current running context is not the context that it was originally
registered from, it is the io run-loop context. So any methods that
*would* throw, must run in a try/catch and then set the error code
properly so that the handler will be notified of the error.

This was caught when a process (bmcweb) was used to invoke a call that
had a bad path. That was not caught and it caused bmcweb to abort
because of an unhandled exception.

Change-Id: Ie66a029066a3f463759089b44368b7518d0de8ce
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...

1...<<21222324252627282930>>...34