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

What is category for? #859

Closed
inno-steffg opened this issue Feb 28, 2018 · 2 comments
Closed

What is category for? #859

inno-steffg opened this issue Feb 28, 2018 · 2 comments

Comments

@inno-steffg
Copy link

The Vorto DSL specifies a meta-field "category", but I cannot find any explanation what it actually means in documentation and I cannot even see any UI or function that makes use of it.

@Ebolon
Copy link
Contributor

Ebolon commented Apr 9, 2018

Here is a short explanation in the docs for category:

Parameter/Element Mandatory Description Type Examples
category Y The category should be used to logically group function blocks that semantically belong to the same domain. top level category (mandatory) and a sub category (optional), separated by aslash (/) IAP/smarthome
indego

The DSL allows to define category as:

Terminals.xtext
terminal ID: '^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;

Functionblock.xtext
CATEGORY : ID ('/' ID)*;


Currently there is no model published which uses a slash in category. I think the same can be possible archived with the namespace of a model. Maybe category is something legacy because Vorto 0.1 did not supported namespaces as today.

Here some fun stats what categories are currently used in the vorto repository:

category: count
----------------
iot : 157
demo : 221
sensors : 8
None : 162
payloadmapping : 100
example : 13
eclipse : 3
SmartObject : 80
IoT : 1
general : 4
main : 1
Activity : 1
xdk : 3
devices : 1
umgebungskachel : 5

@inno-steffg
Copy link
Author

Super summary.

Now, when it is used that "strange", why not making it optional everywhere? It is so already in Datatype and Mapping, but mandatory in Function Block and Information Model.
Making it optional there wouldn't break existing definitions, but would simplify definitions and eventually increase the specifiers experience.

I was distracted by that detail, seeing it being required, caused me to search for the sense to put something meaningful in it.

Regards
Steffen

Ebolon added a commit to Ebolon/vorto that referenced this issue Apr 9, 2018
…ctionblock optional.

Signed-off-by: Simon Pizonka <simon@pizonka.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants