Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

CreateItemSource: mappingContext.ParentMapping is null

  • miron
  • Topic Author
  • Visitor
  • Visitor
12 May 2015 12:06 #3127 by miron
Ok. I added code to tests that value is null and know is good.

Please Log in or Create an account to join the conversation.

More
05 May 2015 14:04 #3073 by support
I am not aware of a change in this area between the versions you mentioned. Are you sure the same code behaved differently before?

Are you saying that the ParentMapping is always null? (it is OK for it to be null when there is, indeed, no parent).

Best regards

Please Log in or Create an account to join the conversation.

  • miron
  • Topic Author
  • Visitor
  • Visitor
05 May 2015 12:55 #3072 by miron
I have updated QuickOPC 5.32 --> 5.34.

And I have problem baceous mappingContext.ParentMapping is null.

 protected override DAItemSource CreateItemSource(DAMappingContext mappingContext,
            DAMemberMappingDefinition memberMappingDefinition)
        {
         var mappingParent = mappingContext.ParentMapping; 
            if (mappingParent != null)
            {
 
                var mappingTarget = (OpcLabs.BaseLib.LiveMapping.ObjectMemberMappingTarget)mappingParent.MappingTarget;
                var t = mappingTarget.MemberInfo.DeclaringType.GenericTypeArguments[0];
 
                /*var t =
                    ((((OpcLabs.BaseLib.LiveMapping.ObjectMemberMappingTarget)
                        (mappingParent.MappingTarget))
                        .MemberInfo).DeclaringType).GenericTypeArguments[0];*/
 
                memberMappingDefinition.ItemAttribute.ItemType = t;
            }
}

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.052 seconds