Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7167529ybn; Mon, 30 Sep 2019 09:36:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ2bU8xKLrJm8e4lEFg2tBc0ryhblM7Lw2mqe/+KTL5F7+5fCGEBd6B3CnFxwznalWevOF X-Received: by 2002:a50:d51b:: with SMTP id u27mr531340edi.249.1569861366249; Mon, 30 Sep 2019 09:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569861366; cv=none; d=google.com; s=arc-20160816; b=Di7PI/FWTHEsURiCLdyLq1FWpm3XvkDcjqdFZ+c7u1WJHha5c9oYfCFibgyfFkfQbg 6SXEoOjN2a9Myg1ZUQMGYo/P1Pyd4mgtRugeYK6irDobYvIXB/5DFdHOoXQ3KvKf/cUE Nmw+wvoMjfMii32ldR0wsKqzliT4abYEEDd9kbtVR1NdqDGqsrCN5ezP4ewhJMMFwUE4 qdFhbRptGAGTa5dyiOr2eSo92YL3ENCc1mCq1PhYiYidH3AOeRszcugpR0NcCmtwMewo t/0RaWgZVFJPUuIOKm4eqNnvCkFdp559YDRxx8tQEXhSVYEY/vA1L6mD4+NkhMoz/vHa rRKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=dE6jScv/hz5LfUvHhPpENQ/mNC1xktRBpbwZXecJ+ds=; b=IUIRD6tUoyUVUJbeGYG1m5PCfvjUGrgR+JDaRd0QfQYmEocG0Hlz/oELzKi0XCzk6p 44q9CYynljf9cuP8CnLLfgZ8HxmmPkQRJ9WclieFqkv9yXEoJmtVktsTsC/w0Lqttclh 1R1ZEf25bvyguaatU9L4ni2+P5pXSYdIgG3z8n0lOukp3oBuQTe+HQezQS5fJEk9xRJU iiUtEWeLp3Zv+h7D7sFk8xI6mlrEs7ikXYJanppkmHeSZNWmxqBDC0sI5yvhU3Zj+pm3 E3+kW7j22iMF0Zt2Fe6plyPwyfya1z+VA6UCCiSTyMOPhZ9E5aBHAxpOcUtpE3jXJEHv 3v/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13si7399014ejb.98.2019.09.30.09.35.25; Mon, 30 Sep 2019 09:36:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732232AbfI3Qe0 (ORCPT + 99 others); Mon, 30 Sep 2019 12:34:26 -0400 Received: from mga12.intel.com ([192.55.52.136]:38166 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731976AbfI3Qe0 (ORCPT ); Mon, 30 Sep 2019 12:34:26 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Sep 2019 09:34:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,567,1559545200"; d="p7s'?scan'208";a="366052064" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by orsmga005.jf.intel.com with ESMTP; 30 Sep 2019 09:34:25 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Sep 2019 09:34:25 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.5]) by ORSMSX151.amr.corp.intel.com ([169.254.7.201]) with mapi id 14.03.0439.000; Mon, 30 Sep 2019 09:34:25 -0700 From: "Stotland, Inga" To: "michal.lowas-rzechonek@silvair.com" , "Gix, Brian" CC: "linux-bluetooth@vger.kernel.org" Subject: Re: mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address Thread-Topic: mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address Thread-Index: AQHVX2LEtJoH6czNyE6Xu9DaIe4hzqcxs2yAgAuqpwCAAVPggIAAWhSAgADMPACAAHTCAIAAGquAgAAhmoCAA+uugIAAm3EA Date: Mon, 30 Sep 2019 16:34:24 +0000 Message-ID: References: <20190830184301.zd3zaqrw7mv6r252@kynes> <20190918085239.xhahxoeqjkcrk3bl@mlowasrzechonek2133> <3c5858c94b3e08a61c5ff8493f9b00f5f77d0aac.camel@intel.com> <4b57242b15ccb44ac123858ce7bdf6e0e526b3e0.camel@intel.com> <20190927085208.sxy2x5656ci3opo6@mlowasrzechonek2133> <01c84f55db98fbcc2790d11fd6090589881c36cf.camel@intel.com> <856d4e6bfdbe84b7b7ac3742ebede263c7801346.camel@intel.com> <86e707237937cfb5c4e8fea8e96924f4590ab0a3.camel@intel.com> <20190930071803.nvp3ema26ynuiwz3@mlowasrzechonek2133> In-Reply-To: <20190930071803.nvp3ema26ynuiwz3@mlowasrzechonek2133> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.252.134.73] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-p2HasnkqaJB1oW8UqnRQ" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-p2HasnkqaJB1oW8UqnRQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michal, Brian, On Mon, 2019-09-30 at 09:18 +0200, michal.lowas-rzechonek@silvair.com wrote: > Brian, Inga, >=20 > On 09/27, Gix, Brian wrote: > > > For a single MessageReceived() method, the cleanest way is to > > > have the > > > subscription address parameter as a variant (suggested by Michal) > > > or as > > > a dictionary. > > > An array introduces an extra consideration of byte ordering for > > > group > > > addresses. > >=20 > > If variants are easy to sort in scripting languages like python3, > > than I > > suppose I could live with this. >=20 > Last time I checked, it was C that had issues with any type of > 'dynamic' typing, so I wouldn't worry about client languages. > Handling > D-Bus variants in python is trivial. >=20 > > Or is this still a two step process of: > > 1. Determining the u16 vs u128 > > 1.1 unmarshalling the correct type... > >=20 > > What would the signature of the method look like? >=20 > Something like this: >=20 > void MessageReceived(uint16 source, uint16 key_index, > variant destination, > array{byte} data) >=20 > and on the Python side, the handling would look somewhat like this > (since Python doesn't do overloading, at all): >=20 > class ElementInterface: > def MessageReceived(source, key_index, destination, data): > if type(destination) =3D=3D dbus.types.UINT16: > group_destination =3D destination > elif type(destination) =3D=3D dbus.types.ARRAY: > virtual_destination =3D uuid.UUID(destination) > else: > raise DBusError('Unrecoenized destination type') >=20 > > > What I mostly about is that the represenation of the subscription > > > address in the MessageReceived() method corresponds to the > > > representation in the configuration dictionaries for the Attach() > > > and > > > UpdateModelConfiguration() methods. >=20 > Agreed. >=20 I am fine with this version. Regards, Inga --=-p2HasnkqaJB1oW8UqnRQ Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKbDCCBOsw ggPToAMCAQICEDabxALowUBS+21KC0JI8fcwDQYJKoZIhvcNAQEFBQAwbzELMAkG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