Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
DataSetFieldContentMask is not working in MQTT Json
September 5, 2021
15:13, EEST
Avatar
HOYOUNG KANG
Member
Members
Forum Posts: 11
Member Since:
April 22, 2016
sp_UserOfflineSmall Offline

I’m using OPC UA PubSub 4.5.8.

This version is the latest version provided by you. I also found the following in the release notes:
“Fixed: JSON encoding of Network and DataSet Messages is now following the defined JsonNetworkMessageContentMask and DataSetFieldContentMask.”
but i think it’s not fixed.

It is intended to display the StatusCode using a DataSetFieldContentMask.
——————————————————————————————————
// DataSetFieldContentMask defines if we want to include meta information like StatusCode or
// SourceTimestamp for the published variables.
DataSetFieldContentMask fieldContentMask = DataSetFieldContentMask.of(
DataSetFieldContentMask.StatusCode,
DataSetFieldContentMask.SourceTimestamp,
DataSetFieldContentMask.ServerTimestamp);
variableDataSetWriterConf.setFieldContentMask(fieldContentMask);
———————————————————————————————————-

but StatusCode is still not displayed.
———————————————————————————————————-
{
“MessageId”: “bf009c78-61fe-4a33-8d0d-65d183ad5a68”,
“MessageType”: “ua-data”,
“PublisherId”: “default-publisher”,
“Messages”: [
{
“DataSetWriterId”: “0”,
“Payload”: {}
},
{
“DataSetWriterId”: “0”,
“Timestamp”: “2021-09-05T21:00:57+0900”,
“Payload”: {
“LIPS_03_TRIO_trio_event_and_rollover_clear”: {
“Value”: false,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},
“LIPS_03_TRIO_trio_do1_on_select”: {
“Value”: false,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},
“LIPS_03_TRIO_trio_do1_on_op”: {
“Value”: false,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},
“LIPS_03_TRIO_trio_do1_off_select”: {
“Value”: false,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},
“LIPS_03_TRIO_trio_do1_off_op”: {
“Value”: false,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},
“LIPS_03_TRIO_trio_do2_on_select”: {
“Value”: true,
“SourceTimestamp”: “2021-09-05T21:00:55+0900”
},

———————————————————————————————————-

If I’m using it wrong, I’d like to know when to use DataSetFieldContentMask.

September 6, 2021
11:43, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1045
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The current implementation should be as specified in the UA spec. Unless I’m mistaken, it is only visible if it is not exactly the ‘Good’ (base StatusCode) value.

https://reference.opcfoundatio…../#5.4.2.12

“The Code is omitted if the numeric code is 0 (Good).” + “The Symbol is omitted if the numeric code is 0 (Good).”.

And https://reference.opcfoundatio…../#5.4.2.18

“If a field has a null or default value it is omitted.”

September 7, 2021
12:49, EEST
Avatar
HOYOUNG KANG
Member
Members
Forum Posts: 11
Member Since:
April 22, 2016
sp_UserOfflineSmall Offline

Thank you for your quick response.
Your answer gives me a big help because we are in major release phase.
I will read the urls which you point.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 35
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 733
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1545
Posts: 6516
Newest Members:
basilpullman, Richardmip, mood edibles, LouieWreve, daniellabdx, janessan21, sammiebeak359, gena7127517, thorstenbouldin, Brett.Rollason
Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 1, Bjarne Boström: 1045, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1