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: 1032
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: 1919

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 727

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1