From: Eugen.Wiens@JUMO.net
To: "Stahl, Michael" <mstahl@moba.de>
Cc: RAUC <rauc-bounces@pengutronix.de>,
"RAUC@pengutronix.de" <RAUC@pengutronix.de>
Subject: [RAUC] Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: D-Bus control Qt
Date: Tue, 3 Aug 2021 13:14:45 +0200 [thread overview]
Message-ID: <OF04F87260.04422217-ONC1258726.003DB81E-C1258726.003DC6AD@JUMO.DE> (raw)
In-Reply-To: <AM9PR09MB4756413551DD52754E0169D8DBF09@AM9PR09MB4756.eurprd09.prod.outlook.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: Type: text/plain; charset="US-ASCII", Size: 8432 bytes --]
Hi Michael,
sounds good.
Von: "Stahl, Michael" <mstahl@moba.de>
An: "RAUC@pengutronix.de" <RAUC@pengutronix.de>
Kopie: RAUC <rauc-bounces@pengutronix.de>
Datum: 03.08.2021 13:00
Betreff: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: Re: Antwort:
D-Bus control Qt
Gesendet von: "RAUC" <rauc-bounces@pengutronix.de>
I found the issue
You have to connect to the systemBus not to the sessionBus!
if (QDBusConnection::systemBus().connect("de.pengutronix.rauc",
//Service
"/", //Path
"org.freedesktop.DBus.Properties",
//Interface
"PropertiesChanged",
this,
SLOT(propertyChanged(const QString& ,
const QMap<QString,
QVariant>& ,
const QStringList&
)))) {
qDebug() << "PropertiesChanged signal connected successfully to
slot";
} else {
qDebug() << "PropertiesChanged signal connection was not
successful";
}
Now I my function propertyChanged is called every time the property
changes.
If you use
export QDBUS_DEBUG=1
you get a lot of debug output. It is very useful.
The next step is to extract the informations of the QMap.
Von: Stahl, Michael <mstahl@moba.de>
Gesendet: Dienstag, 3. August 2021 10:27
An: Eugen.Wiens@JUMO.net <Eugen.Wiens@JUMO.net>
Cc: RAUC@pengutronix.de <RAUC@pengutronix.de>; RAUC
<rauc-bounces@pengutronix.de>
Betreff: AW: Antwort: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus
control Qt
Hi Euen,
I know but I am stucking. I am polling the propery "Operation". Just when
it changes from "idle" to "installing" I subscribe the PropertiesChanged
signal but without success. I tried several connect strings but all
without success.
if (QDBusConnection::sessionBus().connect("de.pengutronix.rauc",
"/",
"org.freedesktop.DBus.Properties",
"PropertiesChanged",
this,
SLOT(propertyChanged(const QString& ,
const QMap<QString,
QVariant>& ,
const QStringList&
))))
{
qDebug() << "PropertiesChanged signal connected successfully to slot";
} else {
qDebug() << "PropertiesChanged signal connection was not successful";
}
Please can you tell me how to subcribe the PropertiesChanged signal?
Von: Eugen.Wiens@JUMO.net <Eugen.Wiens@JUMO.net>
Gesendet: Dienstag, 3. August 2021 08:27
An: Stahl, Michael <mstahl@moba.de>
Cc: RAUC@pengutronix.de <RAUC@pengutronix.de>; RAUC
<rauc-bounces@pengutronix.de>
Betreff: Antwort: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus
control Qt
Hi Michael,
you can connect to a property change on dbus level. That is the way we do
it.
"RAUC" <rauc-bounces@pengutronix.de> schrieb am 03.08.2021 08:21:32:
> Von: "Stahl, Michael" <mstahl@moba.de>
> An: "Eugen.Wiens@JUMO.net" <Eugen.Wiens@JUMO.net>
> Kopie: "RAUC" <rauc-bounces@pengutronix.de>, "RAUC@pengutronix.de"
> <RAUC@pengutronix.de>
> Datum: 03.08.2021 08:21
> Betreff: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus control
Qt
> Gesendet von: "RAUC" <rauc-bounces@pengutronix.de>
>
> Hi Eugen,
>
> thanks again. I implemented the signal and now I get the signal that
> the update is finished.
> But thats the only signal that rauc is provided, isn't it? To get
> the progress I have to poll the property, or are there general
> signals on the dbus that I can connect to?
>
> Do you read the property "Progress" like
> QDBusInterface iface( "de.pengutronix.rauc",
> "/",
> "de.pengutronix.rauc.Installer",
> QDBusConnection::systemBus() );
> QVariant property = iface.property("Progress");
> MyProgress parameterProgress;
> property.value<QDBusArgument>() >> parameterProgress;
>
> or did you use another possibility?
> If I use the above I get a message five times and the marshaled data (
> m_Progress, m_Message, ..) are always empty.
> QDBusArgument: read from a write-only object
>
> Von: Eugen.Wiens@JUMO.net <Eugen.Wiens@JUMO.net>
> Gesendet: Montag, 2. August 2021 16:53
> An: Stahl, Michael <mstahl@moba.de>
> Cc: RAUC@pengutronix.de <RAUC@pengutronix.de>; RAUC <rauc-
> bounces@pengutronix.de>
> Betreff: Antwort: Re: [RAUC] Antwort: Re: Antwort: D-Bus control Qt
>
> Hi Michael,
>
> "RAUC" <rauc-bounces@pengutronix.de> schrieb am 02.08.2021 16:29:18:
>
> > Von: "Stahl, Michael" <mstahl@moba.de>
> > An: "Eugen.Wiens@JUMO.net" <Eugen.Wiens@JUMO.net>
> > Kopie: RAUC <rauc-bounces@pengutronix.de>, "RAUC@pengutronix.de"
> > <RAUC@pengutronix.de>
> > Datum: 02.08.2021 16:29
> > Betreff: Re: [RAUC] Antwort: Re: Antwort: D-Bus control Qt
> > Gesendet von: "RAUC" <rauc-bounces@pengutronix.de>
> >
> > Okay, thanks a lot.
> >
> > A last question. Is it correct that I have to poll the "Progress"
> > property or is there any signal system where I can subcribe to get a
> > notification at every change of progress status?
>
> We are using a dbus signal. You can connect to it with Qt.
>
> Best regards,
> Eugen
> Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte
> Informationen beinhalten und ist ausschlie?lich f?r die im Verteiler
> genannten Personen bestimmt. Das unerlaubte Kopieren sowie die
> unbefugte Weitergabe dieser Mail sind nicht gestattet. Bitte
> benachrichtigen Sie uns gegebenenfalls telefonisch oder mit Antwort-
> Mail, falls Sie nicht der richtige Adressat dieser E-Mail sind.
> Bitte l?schen Sie diese Nachricht und alle Anh?nge dazu unverz?
> glich. Falls nicht ausdr?cklich vermerkt, ist diese E-Mail keine
> rechtlich bindende Vereinbarung.
>
> Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda,
> Amtsgericht Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M.
> K. JUCHHEIM GmbH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17,
> Gesch?ftsf?hrer: Dipl.-Ing. Bernhard Juchheim, Dipl.-Kfm. Michael
> Juchheim, Dipl.-Ing. Dimitrios Charisiadis
> Ust.-Id.-Nr.: DE
112411234_______________________________________________
> RAUC mailing list
Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte Informationen
beinhalten und ist ausschlie?lich f?r die im Verteiler genannten Personen
bestimmt. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
Mail sind nicht gestattet. Bitte benachrichtigen Sie uns gegebenenfalls
telefonisch oder mit Antwort-Mail, falls Sie nicht der richtige Adressat
dieser E-Mail sind. Bitte l?schen Sie diese Nachricht und alle Anh?nge
dazu unverz?glich. Falls nicht ausdr?cklich vermerkt, ist diese E-Mail
keine rechtlich bindende Vereinbarung.
Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgericht
Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M. K. JUCHHEIM GmbH,
Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Gesch?ftsf?hrer: Dipl.-Ing.
Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios
Charisiadis
Ust.-Id.-Nr.: DE 112411234_______________________________________________
RAUC mailing list
Diese E-Mail kann vertrauliche und/oder rechtlich geschützte Informationen beinhalten und ist ausschließlich für die im Verteiler genannten Personen bestimmt. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. Bitte benachrichtigen Sie uns gegebenenfalls telefonisch oder mit Antwort-Mail, falls Sie nicht der richtige Adressat dieser E-Mail sind. Bitte löschen Sie diese Nachricht und alle Anhänge dazu unverzüglich. Falls nicht ausdrücklich vermerkt, ist diese E-Mail keine rechtlich bindende Vereinbarung.
Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgericht Fulda HRA 302, Persönlich haftende Gesellschafterin: M. K. JUCHHEIM GmbH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Geschäftsführer: Dipl.-Ing. Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios Charisiadis
Ust.-Id.-Nr.: DE 112411234
[-- Attachment #1.2: Type: text/html, Size: 21434 bytes --]
[-- Attachment #2: Type: text/plain, Size: 66 bytes --]
_______________________________________________
RAUC mailing list
next prev parent reply other threads:[~2021-08-03 11:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 6:15 [RAUC] " Stahl, Michael
2021-08-02 8:14 ` Bastian Krause
2021-08-02 8:53 ` Wolk, Steffen
2021-08-02 11:41 ` [RAUC] Antwort: " Eugen.Wiens
2021-08-02 12:45 ` Stahl, Michael
2021-08-02 13:20 ` Stahl, Michael
2021-08-02 13:36 ` [RAUC] Antwort: " Eugen.Wiens
2021-08-02 14:29 ` Stahl, Michael
2021-08-02 14:53 ` [RAUC] Antwort: " Eugen.Wiens
2021-08-03 6:21 ` Stahl, Michael
2021-08-03 6:27 ` [RAUC] Antwort: " Eugen.Wiens
2021-08-03 8:27 ` Stahl, Michael
2021-08-03 10:57 ` Stahl, Michael
2021-08-03 11:00 ` Stahl, Michael
2021-08-03 11:14 ` Eugen.Wiens [this message]
2021-08-03 13:27 ` [RAUC] Antwort: " Stahl, Michael
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=OF04F87260.04422217-ONC1258726.003DB81E-C1258726.003DC6AD@JUMO.DE \
--to=eugen.wiens@jumo.net \
--cc=RAUC@pengutronix.de \
--cc=mstahl@moba.de \
--cc=rauc-bounces@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox