Avatar

Please consider registering
guest

sp_LogInOut Log In sp_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 RSS sp_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: 983
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.opcfoundation.org/v104/Core/docs/Part6/5.4.2/#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.opcfoundation.org/v104/Core/docs/Part6/5.4.2/#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: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1