All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Mahesh Kurapati <mahesh.kurapati@keysight.com>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: add a new yaml interface definition
Date: Tue, 5 Jan 2021 08:10:41 -0600	[thread overview]
Message-ID: <X/RzYa7/QqlVUIMT@heinlein> (raw)
In-Reply-To: <SN6PR17MB255875944AB6F6884DE94FA296D10@SN6PR17MB2558.namprd17.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2105 bytes --]

On Tue, Jan 05, 2021 at 12:42:40AM +0000, Mahesh Kurapati wrote:
> Hello Patrick, 
> 
> Thank you.  Updating the meson fixed the issue, and I see the cpp, and hpp files generated. 
> 
> ixia@ubuntu:~/git/development/openbmc/build/fender/tmp/work/arm1176jzs-openbmc-linux-gnueabi/phosphor-dbus-interfaces/1.0+git999-r1/phosphor-dbus-interfaces-1.0+git999/gen/xyz/openbmc_project/Control/Alarm$ ls
> client.hpp  server.cpp  server.hpp
> 
> I have two more follow-up questions on how I include this code in my server: 
> 1.  Does the libsdbusplus.so contain the methods that I defined in the Alarm.interface.yaml file?  I thought it would.  But, I don't see build time stamp changed for it.  I thought, all I need to do is include the header file in my server code, and link the server with libsdbusplus.so.  

libsdbusplus.so does not because that comes from sdbusplus repo.
libphosphor_dbus.so does because that comes from P-D-I repo.

You should link with both libsdbusplus and libphosphor_dbus.

If you're using Meson or CMake as your build you shouldn't need to directly
add "-l" flags, because the package dependency will do it for you.
Yocto will want you to link against the versioned so files, so if you're
trying to hand-write makefiles you're probably going to have problems
with Yocto integration.

> 2.  I see that in the example/Calculator_server.cpp file, both the generated cpp, and herder files are included.  While the corresponding server and header are not included in the x86_power_control.cpp server.  I see that in x86 server code, namespace is referred again.  Is that the reason why they are not included?  
The authors of x86-power-control decided not to use the generated code
and instead hand-wrote their interfaces using the Boost::ASIO support in
sdbusplus.

I see the code using 'sdbusplus::' namespace elements which come from
the sdbusplus library but I don't see them using any of the
'sdbusplus::<TLD>' namespaces being used (ex. sdbusplus::xyz::openbmc_project)
which are the ones generated from YAML using sdbus++.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-01-05 14:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 21:14 add a new yaml interface definition Mahesh Kurapati
2021-01-04 22:22 ` Patrick Williams
2021-01-04 23:05   ` Mahesh Kurapati
2021-01-04 23:15     ` Patrick Williams
2021-01-05  0:42       ` Mahesh Kurapati
2021-01-05 14:10         ` Patrick Williams [this message]
2021-01-06  0:28           ` Mahesh Kurapati
2021-01-05 17:28 ` Ed Tanous
2021-01-06  0:23   ` Mahesh Kurapati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X/RzYa7/QqlVUIMT@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=mahesh.kurapati@keysight.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.