Implementing a custom IModelMapper

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
Magnulas
Jr. Member
Jr. Member
Posts: 1
Joined: 07 Jan 2021, 10:30

Implementing a custom IModelMapper

Post by Magnulas »

I had a looked at the IModelMapper interface to see if I could create my own ModelMapper class.

When returning the ModelHandle from the GetModelHandle method, it has a list of ModelMapping objects set in its Mappings property.

The properties Instance, DataType etc. of the ModelMapping class do not have any public set functions though (In the online documentation the set funtions exist, but in the dlls these set functions are not public). So in the GetValue/SetValue I won't have access to these properties unless I put the data into the MappingData property instead. In the GetValue/SetValue function I need to access the linked object instance, which has the property the function is trying to access. Normaly I assume this is done through the Instance property of the ModelMapping object passed to the function.

Are you meant to be able to implement your own IModelMapper class? If so why are most ModelMapping properties not settable?

https://documentation.unified-automation.com/uasdknet/3.1.1/html/interfaceUnifiedAutomation_1_1UaBase_1_1IModelMapper.html
https://documentation.unified-automation.com/uasdknet/3.1.1/html/classUnifiedAutomation_1_1UaBase_1_1ModelHandle.html
https://documentation.unified-automation.com/uasdknet/3.1.1/html/classUnifiedAutomation_1_1UaBase_1_1ModelMapping.html

Post Reply