Hi,
I have the following data structure in my system, call it PV:
- PvName
- DataType (Boolean , int, string, double, array (one diamentional), etc)
- ServerTimeStamp
- Value
- Unit
- Size (size of data stored in the value field)
- quality
- alarm
Now I wanna create DataSet for the following structure on the PubSub communication model. I came up with the following structure:
<Fields>
<FieldMetaData>
<Name>DSS:FDS_SVC:CON_FDS_SVC</Name>
<Description>
<Locale i:nil=”true” />
<Text>FDS SVC Client Connection</Text>
</Description>
<FieldFlags>0</FieldFlags>
<BuiltInType>6</BuiltInType>
<DataType>
<Identifier>i=6</Identifier>
</DataType>
<ValueRank>-1</ValueRank>
<ArrayDimensions />
<MaxStringLength>0</MaxStringLength>
<DataSetFieldId>
<String>1bc6c8dd-724d-4f39-884c-630175bf37df</String>
</DataSetFieldId>
<Properties>
<KeyValuePair>
<Key>
<NamespaceIndex>0</NamespaceIndex>
<Name>Unit</Name>
</Key>
<Value>
<Value>
<String xmlns=”https://opcfoundation.org/UA/2008/02/Types.xsd” />
</Value>
</Value>
</KeyValuePair>
<KeyValuePair>
<Key>
<NamespaceIndex>0</NamespaceIndex>
<Name>Alarm</Name>
</Key>
<Value>
<Value>
<String xmlns=”https://opcfoundation.org/UA/2008/02/Types.xsd”>HH</String>
</Value>
</Value>
</KeyValuePair>
</Properties>
</FieldMetaData>
</Fields>
Now I have two questions:
1- Does the analogy created by me correct? Does it make sense?
2- When I change the value I only receive the value on the subscriber side not the properties. Why is that?
Thank you for your support.
05/30/2017
The properties are reported with the metadata.
If you want them in every message you need to create a field for them.
ServerTimeStamp, Value and quality (a.k.a. StatusCode) are part of the DataValue and can set the DataSetFieldContentMask to include information.
The generic word “alarm” should be replaced with something more specific.
i.e. LevelAlarmMessage.
1 Guest(s)