diff mbox series

[BlueZ,v3,4/4] test/test-mesh: Add "options" to Send/Publish

Message ID 20200826165420.563822-5-brian.gix@intel.com
State New
Headers show
Series Mesh send/publish API change | expand

Commit Message

Brian Gix Aug. 26, 2020, 4:54 p.m. UTC
From: Inga Stotland <inga.stotland@intel.com>

This adds a new dictionary paramenter (empty by default) when
invoking Send() or Publish() methods.
---
 test/test-mesh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/test/test-mesh b/test/test-mesh
index 5da0278d6..1e1b8724d 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -184,6 +184,9 @@  current_menu = None
 user_input = 0
 input_error = False
 
+send_opts = dbus.Dictionary(signature='sv')
+send_opts = {'ForceSegmented' : dbus.Boolean(True)}
+
 def raise_error(str_value):
 	global input_error
 
@@ -538,14 +541,18 @@  class Model():
 		self.pub_period = period
 
 	def send_publication(self, data):
+		pub_opts = dbus.Dictionary(signature='sv')
+
 		print('Send publication ', end='')
 		print(data)
-		node.Publish(self.path, self.model_id, data,
+		node.Publish(self.path, self.model_id, pub_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)