07/09/2019
Hey,
the PublishedDataSet has the following structure:
<Definition Name="PublishedDataSetDataType"> <Field Name="Name" DataType="i=12" /> <Field Name="DataSetFolder" DataType="i=12" ValueRank="1" /> <Field Name="DataSetMetaData" DataType="i=14523" /> <Field Name="ExtensionFields" DataType="i=14533" ValueRank="1" /> <Field Name="DataSetSource" DataType="i=22" /> </Definition> Here the DataSetSource contains the list of PublishedVariables (or PublishedEvents, but let's ignore those for now) while the DataSetMetaData contains a list of FieldMetaData corresponding to the list of PublishedVariables. To my understanding each PublishedVariable maps to exactly one FieldMetaData, but how is this mapping represented? I can't see an index or whatever, is this just ensured by order of the lists? My next question is about the SamplingIntervalHint in a PublishedVariable and the PublishingInterval of the WriterGroup. I don't understand what sampling a variable (represented by a single field in the DataSetMessage) more often than publishing a NetworkMessage is good for because there is no way provided to accumulate multiple samples of a variable in a single field in a DataSetMessage since it has a fixed schema defined through the DataSetMetaData. As far as I understand it is possible to accumulate DataSetMessages, so e.g. it would make sense to have sampling intervals for DataSets, but I don't see this happening here.
05/30/2017
The Fields and PublishedVariablesare related by their index in the array. It is an invalid configuration if the array lengths are not the same.
There are many cases where you might want oversample or undersample a variable for publish.
i.e. a value that changes rarely can be sampled at a much slower rate.
or value that changes constantly and you want to make sure the most current value is sent with the publish.
07/09/2019
Randy Armstrong said
The Fields and PublishedVariablesare related by their index in the array. It is an invalid configuration if the array lengths are not the same.There are many cases where you might want oversample or undersample a variable for publish.
i.e. a value that changes rarely can be sampled at a much slower rate.
or value that changes constantly and you want to make sure the most current value is sent with the publish.
I see, so it is somewhat assumed that e.g. the PublishedDataSet context (implementation wise) really holds a set of samples from Variables in its own state. This was slightly confusing for me since in a trivial implementation you can just sample the data before the WriterGroup publishes the NetworkMessage and you are good to go (e.g. the WriterGroup triggers the sampling according to the PublishInterval). But since the WriterGroup seems to simply get available samples from the PublishedDataSet context it makes sense to have that SamplingIntervalHint in a PublishedVariable.
Many thanks Randy, you're really helping me a lot here.
1 Guest(s)