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

Usage of StreamParameter #52

Closed
astedler opened this issue Oct 12, 2016 · 4 comments
Closed

Usage of StreamParameter #52

astedler opened this issue Oct 12, 2016 · 4 comments

Comments

@astedler
Copy link
Contributor

Unclear usage of Streamparameters due to lack of information.
There is no word said about whether a value must have the same type as the streamDescriptor tells us for the value within the stream. Furthermore there is no rule defined that the factor, when given, has to be used for the streamvalue too. And if so this has to be true for the formula as well and in that case the client has to calculate each single streamvalue using the formula...
The documentation needs an update here...

What if the provider sets the value to be an utf8 string, but the streamDescriptor points to a 16 bit little endian?
As far as i understand this is allowed... weird, but allowed

@mkeuck
Copy link
Contributor

mkeuck commented Oct 13, 2016

Hi,
the scenario to provide a streamDescriptor and a value of type string is invalid. A provider could provide such settings, but a consumer should ignore the value in that case. I will add a clarification in the documentation.

When a streamDescriptor is set, the type information has to be taken from there. The value is then reported in a different way. Streams are listed in a StreamCollection, with one StreamEntry per stream identifier. The value type is "Octets".
If a string shall be reported as stream, there must not be a streamDescriptor, but only a streamIdentifier instead.

Since there is no standard unit for streams, a formula or factor must be applied if provided.

I hope this clarifies the streamDescriptor usage.

@astedler
Copy link
Contributor Author

I guess we have a misunderstanding.
The value-type in the StreamDescriptor must not be STRING; that one for sure.
But there is no rule defining that the parameter-VALUE has anything to do with the value pointed by the streamDescriptor. For a PPM It might be the channelname and the value is in the stream.
Therefor i recommend to make clear: Either the value is a snapshot at a given moment in time of the value tranmitted in the stream and therefore MUST HAVE THE SAME TYPE (at least INTEGER or REAL) or it MUST NOT BE SET AT ALL.

@astedler
Copy link
Contributor Author

Second: I highly recommend to prohibit the usage of formula for streamparameters.
a factor is calculatable and ok, even on a slow embedded device,
but a formula needs an interpreter and streams should be fast and agile.

@mkeuck
Copy link
Contributor

mkeuck commented Oct 31, 2016

I have updated the documentation. It now clarifies that the type must numeric and that the value type has to match the type of the streamdescriptor, if specified.

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

3 participants