Passing UInt32 value to IntergerId|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Passing UInt32 value to IntergerId
Avatar
Deepali Ahirrao
Member
Members
Forum Posts: 25
Member Since:
08/16/2019
sp_UserOfflineSmall Offline
1
05/24/2020 - 23:41
sp_Permalink sp_Print

Hi,

I am trying to call the ConditionRefresh method wherein I am passing UInt32 value for SubscriptionId whereas expected datatype is IntegerId. Is this allowed - passing parent type where a child datatype is expected? 

I am getting Bad_SubscriptionIdInvalid error, so was wondering whether it was because of incorrect datatype being passed. 

Thanks,

Deepali

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/25/2020 - 01:46
sp_Permalink sp_Print

You can only pass values of built-in types in a method call.

If the information model datatype is not a built-in type then you need pass in a supertype.

In the case of IntegerId the basetype is UInt32 which means a UInt32 must be passed to the method call.

If the problem you are see was caused by a datatype mismatch you should get the BadTypeMismatch error code.

Avatar
Deepali Ahirrao
Member
Members
Forum Posts: 25
Member Since:
08/16/2019
sp_UserOfflineSmall Offline
3
05/25/2020 - 01:50
sp_Permalink sp_Print

Thanks Randy, that helps.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 24
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855