Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3153934ybn; Fri, 27 Sep 2019 01:52:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTRsZVmhcWBUKyaUkfuggbocZMBrhI/C9DnbrKmcaiQLmDg3xT0maxSyDRIZY3d7PYwrfo X-Received: by 2002:a17:906:80d:: with SMTP id e13mr6804697ejd.72.1569574365003; Fri, 27 Sep 2019 01:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569574364; cv=none; d=google.com; s=arc-20160816; b=fhajn2zBCtMcLaQLwueeSEDHX+HoAua9Hw6OiSU8PGB5ZupCkdAJDNmKSw0E4C4c6Y F+/T9kcq0j5BxhUSO1iFkfoM+sr7pl2eXTOjCgzifmTIVxqVfYUvorqPOWZk1Wycwjzi IVRW7VBeC03q3X83y/PVeJfHiUKUkS4HoUnRRX9BsM4CmssGXUtG3oEg7H2AQqFoQ8U8 azDw5xl7rqkIKZxCq+sNLwrR6xdT4esBBOMHZrhtGjTitwH3jV7joq+HUOdUrkciV6vE mWrOcnmGXKHVrZ6lD/tYx2IQ4YR6Is+aqplPw7cvUXQ7jCTgMum+PACFn5TvcekvT23L hnjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=jCS/2uPi1D7uyYN61k/Wdi9pHIZNPSQWwe6XsqOM/TE=; b=tVZQ0fpZwEEbqTuGJIlDbg/6hXmBmFsu3mNLr6fhaNu8N3QADdNESpdJ6WPJ5j5nH5 CzHlyCBtj9sIk+I/opOaY/yemj/j4oFPQx7YP5C2pJUR9BOSjiNgiIzD3pN8xvvmemaZ 5zCUT+a8eKiyS+KLXz9Qman02kNSAHmeYXC0VI5cpPVfygp3g0SoTvPVT77wVa+mFzya Oq5NnBYsVbuK32c2h+v9S7ero2JXUskqfclNqZ5/TRfC4eJQ2m5sgJCf63X0cYOG7oLs k7dOdrgac8Qq6My2Amvlme4YuBFtcPvW4LUFE4bHqOkROYD+mA7C4AL7hm4SLU+Ap5O4 gu+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=zIuBn7Ah; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si1141378edf.6.2019.09.27.01.52.19; Fri, 27 Sep 2019 01:52:44 -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; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=zIuBn7Ah; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbfI0IwN (ORCPT + 99 others); Fri, 27 Sep 2019 04:52:13 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:36753 "EHLO mail-wr1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfI0IwN (ORCPT ); Fri, 27 Sep 2019 04:52:13 -0400 Received: by mail-wr1-f53.google.com with SMTP id y19so1782221wrd.3 for ; Fri, 27 Sep 2019 01:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jCS/2uPi1D7uyYN61k/Wdi9pHIZNPSQWwe6XsqOM/TE=; b=zIuBn7AhfkjWfzb2FFgbQv8UG7f1m1QEWiLBUkTtui3yPqBSfxznRUy/1mEEQX3jiW dTVSOdMLNiUqE3q8E9TUgNLgjEKTkD5fU7nC429aO5YdHTcrR2PMiLbOHrozm8EriwUK kOrPu5c6fofGGNwN/5VarUAvvWTqO6JBINkny8GFO2oZ/IFzNenabAmhNXSzmXxmmuu/ CNicA3UFUxxXyHMNX87mSfnd1CbCAPAv5QKyZc9KM7S5e2a/Azo6jL9YQEnc8oPbaIT8 FzhOHMJWinhaj6UJ87Jm8U5+oYMlTEjqGuU/zKWMKukQl19sUFTZRg6Ij4kOqiaUzQg9 vzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=jCS/2uPi1D7uyYN61k/Wdi9pHIZNPSQWwe6XsqOM/TE=; b=cC+6UJAj3T0C7Xw8ZqK1ZmZCziqKPcTnKwHoBs8GtMtRYmHKci4n7pAyjy5QQdMoRO 8FQc6Ncyt1Gq4N4zHKsbU5sodEJsHKCmlQefYuSmjiXASXn3cbb7NrSNljMR9EUIAHVy lQEgqVLtV5mbLxMQfYkTgwZuiJb0YGBuYl7V6pPlaHPhzsd+Acq6kNoXpy+kVAVlnpEe cuCzC3KqTPFgzDlZ9TLKw6sQEl9baOg6xgDbezLKxeDe2RhSs+zW0GSPZ2NArruc/xFi AFjdK+lxj9zQRSqE7fq5o9wsYNBMQd8dRzmROiVuU2WOeH9ozuIJUMHaHLhP0qlHQc4g 0q7w== X-Gm-Message-State: APjAAAVnt7zbpIM1BZ9WwfsL1f1rRyt4fPm7bP+lweGw1eq/IelIT26s ZULNiZcudV8KQDXmXAzoJ+xazg== X-Received: by 2002:a5d:460b:: with SMTP id t11mr1852520wrq.377.1569574331061; Fri, 27 Sep 2019 01:52:11 -0700 (PDT) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id y13sm3278765wrg.8.2019.09.27.01.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2019 01:52:10 -0700 (PDT) Date: Fri, 27 Sep 2019 10:52:08 +0200 From: "michal.lowas-rzechonek@silvair.com" To: "Stotland, Inga" Cc: "linux-bluetooth@vger.kernel.org" , "Gix, Brian" Subject: Re: mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address Message-ID: <20190927085208.sxy2x5656ci3opo6@mlowasrzechonek2133> Mail-Followup-To: "Stotland, Inga" , "linux-bluetooth@vger.kernel.org" , "Gix, Brian" References: <20190830184301.zd3zaqrw7mv6r252@kynes> <20190918085239.xhahxoeqjkcrk3bl@mlowasrzechonek2133> <3c5858c94b3e08a61c5ff8493f9b00f5f77d0aac.camel@intel.com> <4b57242b15ccb44ac123858ce7bdf6e0e526b3e0.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Inga, Brian, On 09/26, Stotland, Inga wrote: > While I am still in favor of two distinct methods (given choice, I'd > always go with self-explanatory API) So do I. > I vote against u16 destination field since there is no reason to > create address space collision even though the chances are small. > > A single method "MessageReceived" method can be modified to include a > subscription parameter as: > 1) a dictionary with keys "Group" and "Label" (self explanatory if a > bit cumbersome). If we really need to avoid two separate methods, I think it would be a bit cleaner to pass this parameter as a D-Bus variant of (u16, array[16]) instead of a dictionary. Still, even if we add a method, the application is free *not* to implement it, since we agreed back in the day that calls to MessageReceived do not require a response, so any errors would be simply ignored by the daemon. > 2) a u32 subscription ID that represents a subscription. This > requires the daemon to maintain the relationship between "id" and the > actual address. I believe the daemon does this anyway for virtual > labels, but from the API design perspective this is not very clean > IMHO, since it has a whiff of implementation details leaking into user > interface API. I am very much against adding any kind of traslation here. I think that maintaining subscription IDs would only complicate things, with no additional benefit. I think it would also confuse users, as there is no such thing as 'subscription id' in the spec. Mesh is already complex as it is. > No matter which approach is chosen, the subscriptions must be included > in the model configuration dictionary for UpdateModelConfiguration() > and in the corresponding dictionary for node configuration returned on > successful execution of Attach(). > > > > Then it makes sense to add model subscription array as a dictionary > > > entry in the UpdateModelConfiguration() as well as for the node > > > configuration returned when calling Attach() method. > > > Probably will have to have separate keys: "Groups" and "Virtuals". Indeed, and we also have two options here: - if we decide to provide two MessageReceived methods, I would go with separate keys - if we go with the variant approach proposed above, I would also return an array of variants here regards -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND