2
Vote

opcRelationGetType not defined

description

There is no definition for opcRelationGetType which is declared in opc/relation.h:
    /**
      Returns the relations type.
      The string is interned. Must not be freed.
      */
    const xmlChar *opcRelationGetType(opcContainer *container, opcPart part, opcRelation relation);

comments

aglv wrote Mar 11, 2016 at 9:00 AM

I also ran into this...

wrote Mar 11, 2016 at 9:00 AM

aglv wrote Mar 11, 2016 at 11:05 AM

You can add this relation.c and recompile...
const xmlChar *opcRelationGetType(opcContainer *container, opcPart part, opcRelation relation) {
    if (OPC_PART_INVALID==part) {
        return NULL;
    } else {
        opcContainerRelation* rel=_opcRelationFind(container, part, relation);
        return (rel!=NULL?rel->relation_type:OPC_RELATION_INVALID);
    }
}

aglv wrote Mar 12, 2016 at 12:15 PM

Actually, better use this:
const xmlChar *opcRelationGetType(opcContainer *container, opcPart part, opcRelation relation) {
    opcContainerRelation* rel=_opcRelationFind(container, part, relation);
    return (NULL!=rel?rel->relation_type:OPC_RELATION_INVALID);
}