From patchwork Mon Aug 24 03:54:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stotland, Inga" X-Patchwork-Id: 11732157 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3600914F6 for ; Mon, 24 Aug 2020 03:54:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27FF220774 for ; Mon, 24 Aug 2020 03:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728093AbgHXDyU (ORCPT ); Sun, 23 Aug 2020 23:54:20 -0400 Received: from mga07.intel.com ([134.134.136.100]:64622 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728083AbgHXDyT (ORCPT ); Sun, 23 Aug 2020 23:54:19 -0400 IronPort-SDR: Y9fTsTkdclU8y1P9pKIap9+Dqx7vi1dup1ZI21ncB1GdOvFeo6CfaLmzLb1ZATs0nyql8M1yho FG8caJFcCfRw== X-IronPort-AV: E=McAfee;i="6000,8403,9722"; a="220106403" X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="220106403" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2020 20:54:19 -0700 IronPort-SDR: uBAWpxkAW+8fNMdxbjOnomFUqqhUiKzvTQt8pd1QP2mbTEzgf0bzckcOHudCpcRYpwhluGVjsy oU2X3zySH07Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="322017102" Received: from jlpajela-mobl.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.252.134.16]) by fmsmga004.fm.intel.com with ESMTP; 23 Aug 2020 20:54:19 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 4/4] test/test-mesh: Add "options" to Send/Publish Date: Sun, 23 Aug 2020 20:54:15 -0700 Message-Id: <20200824035415.13420-5-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200824035415.13420-1-inga.stotland@intel.com> References: <20200824035415.13420-1-inga.stotland@intel.com> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This adds a new dictionary paramenter (empty by default) when invoking Send() or Publish() methods. --- test/test-mesh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test-mesh b/test/test-mesh index 5da0278d6..918ec8799 100755 --- a/test/test-mesh +++ b/test/test-mesh @@ -183,6 +183,8 @@ current_menu = None user_input = 0 input_error = False +#send_opts = {'ForcedSegmented' : dbus.Boolean(False)} +send_opts = dbus.Dictionary(signature='sv') def raise_error(str_value): global input_error @@ -538,14 +540,18 @@ class Model(): self.pub_period = period def send_publication(self, data): + global send_opts + print('Send publication ', end='') print(data) - node.Publish(self.path, self.model_id, data, + node.Publish(self.path, self.model_id, send_opts, data, reply_handler=generic_reply_cb, error_handler=generic_error_cb) def send_message(self, dest, key, data): - node.Send(self.path, dest, key, data, + global send_opts + + node.Send(self.path, dest, key, send_opts, data, reply_handler=generic_reply_cb, error_handler=generic_error_cb)