-
Notifications
You must be signed in to change notification settings - Fork 779
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments from my side, please see them inline in the code.
return Response.status(Status.BAD_REQUEST).build(); | ||
} | ||
link = new ItemChannelLink(itemName, new ChannelUID(channelUid), new Configuration(bean.configuration)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary newline
; | ||
|
||
NUMBER returns ecore::EBigDecimal: | ||
ID ('.' ID )? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A number can contain any char from ID
, so also a-z
, A-Z
, _
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stolen from Thing.xtext. Why should it be different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@triller-telekom Think about numbers like -4.52E+6
and you will understand why it is that way :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaikreuzer Thank you for this explanation, but I still don't understand why you allow different characters than e
or E
and _
for a number. Or is it just out of convenience reasons that you do not want to define a slightly different ID
terminal? :)
This allows adding some configuration properties onto links, e.g. though Switch someItem { channel="a:b:c:channel" [ foo="bar", answer=42, always=true ] } or the REST API. As a consequence, ItemChannelLinks now also can be updated through the REST API. fixes eclipse-archived#583 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
d2deb3e
to
455b687
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have a look at the DSL items grammar, but the remaining part looks good to me.
@SJKA A question that I just stumbled over: As you know, the
How does your chosen syntax for the configurations fit to this? |
The same configuration obviously gets applied to all the links, i.e.
However, as far as I can see it is allowed to use the same binding configuration multiple times, i.e. if there should be different link configurations, then you'd simply split the one string up and make it three different ones like this:
|
Ok, thanks, that would be a solution. Do you just "believe" that it should work or did you check it? |
see eclipse-archived#4323 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
I'm a strong believer in things I have tried out! |
Thanks :-) |
see #4323 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
This allows adding some configuration properties onto links, e.g. though
or the REST API.
As a consequence, ItemChannelLinks now also can be updated through the REST API.
❗️ This is API breaking, it adds a
Configuration
argument toBindingConfigReader.processBindingConfiguration(...)
. I wouldn't expect many implementations out there - apart from the OH1 compatibility layer. Let me know any concerns, than I will think of something different - but I didn't want to clutter the API without a need.fixes #583
Signed-off-by: Simon Kaufmann simon.kfm@googlemail.com