Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of optional parameters #1

Closed
willysagefalk opened this issue Aug 28, 2020 · 1 comment
Closed

Handling of optional parameters #1

willysagefalk opened this issue Aug 28, 2020 · 1 comment

Comments

@willysagefalk
Copy link
Member

willysagefalk commented Aug 28, 2020

#2694

Bosch devices have numerous optional rule parameters like e.g. MinimumObjectSize to constrain the detection.
By default these constraints are inactive. Our current choice of implementation is to not provide them if inactive.
There are two issues:
A client has hard times to understand which parameters are mandatory and which are optional.
While adding is straight forward there is no way for a client to remove them.
A device side workaround could be to e.g. remove the parameter if the minimum is set to zero.
For handling the remove case see spin-off ticket #2704.
Proposal for signaling optional
Insert a new section 5.2.3.3 Occurrence
Configuration parameters may signal their allowed occurrence using the minOccurs attribute. Setting the value to zero signals that the parameter is optional.
Add to analytics.wsdl
<xs:complexType name="ConfigOptions">
...
<xs:attribute name="minOccurs" type="xs:int">
with annotation
Minimal number of occurrences. Defaults to one.

Changed 3 months ago by hans.busch
Description modified (diff)

Changed 2 months ago by stefan.andersson
If the attribute it just going to be used for signalling optional / mandatory than it could be a boolean instead of an integer, e.g:
<xs:attribute name="Mandatory" type="xs:boolean" use="optional" default="true">

Changed 5 weeks ago by hans.busch
Description modified (diff)

Changed 8 days ago by sujith.raman
Milestone changed from VEnhNx.5 to ChangeRequest
Change accepted and converting this ticket to CR based on 8/20 Telco.

@HansBusch
Copy link
Member

Filed pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants