Re: [PATCH BlueZ 1/4] doc/mesh-api: Add "options" dictionary to Send/Publish

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2020-08-23 at 20:54 -0700, Inga Stotland wrote:
> This modifies Send, DevKeySend, Publish & VendorPublish methods
> on mesh.Node interface to include additional argument "options".
> This new argument is a dictionary that currently has only one
> new key word defined:
>     "ForceSegmented" - to force small payloads to be sent as
>     		      one-segment messages
> 
> Other key words may be defined in future to accommodate evolving
> requirements of Mesh Profile specification.
> ---
>  doc/mesh-api.txt | 47 +++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 43 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
> index 495f95b0b..f836142a7 100644
> --- a/doc/mesh-api.txt
> +++ b/doc/mesh-api.txt
> @@ -229,7 +229,7 @@ Object path	/org/bluez/mesh/node<uuid>
>  
>  
> -	void Publish(object element_path, uint16 model, array{byte} data)
> +	void Publish(object element_path, uint16 model, dict options,
> +							array{byte} data)
>  
>  		This method is used to send a publication originated by a local
>  		model. If the model does not exist, or it has no publication
> @@ -358,6 +375,17 @@ Methods:
>  		The model parameter contains a model ID, as defined by the
>  		Bluetooth SIG.
>  
> +		The options parameter is a dictionary with the following keys
> +		defined:
> +
> +			bool ForceSegmented
> +				Specifies whether to force sending of a short
> +				message as one-segment payload. If not present,
> +				the default setting is "false".
> +
> +		The data parameter is an outgoing message to be encypted by the
> +		meshd daemon and sent on.
> +
>  		Since only one Publish record may exist per element-model, the
>  		destination and key_index are obtained from the Publication
>  		record cached by the daemon.
> @@ -367,7 +395,7 @@ Methods:
>  			org.bluez.mesh.Error.InvalidArguments
>  
>  	void VendorPublish(object element_path, uint16 vendor, uint16 model_id,
> -							array{byte} data)
> +						dict options, array{byte} data)

I wonder if we should take this opportunity to eliminate this Method in favor of adding a Vendor key to the new
dictionary in Publish().  If the key is missing, then from the dictionary in Publish(), then it is a Sig
defined model, and if present, then it operating like the current PublishVendor().  This would simplify the
code in the daemon, and make a smaller code footprint.

>  
>  		This method is used to send a publication originated by a local
>  		vendor model. If the model does not exist, or it has no
> @@ -383,6 +411,17 @@ Methods:
>  		The model_id parameter is a 16-bit vendor-assigned Model
>  		Identifier.
>  
> +		The options parameter is a dictionary with the following keys
> +		defined:
> +
> +			bool ForceSegmented
> +				Specifies whether to force sending of a short
> +				message as one-segment payload. If not present,
> +				the default setting is "false".
> +
> +




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux