Commit f6cde318 authored by Claes Sjofors's avatar Claes Sjofors

Plc editor, fix for GetDataRefp referencing pwr_tDataRef attributes

parent f2f951e5
...@@ -3739,6 +3739,7 @@ static int gcg_get_outputstring_spec( ...@@ -3739,6 +3739,7 @@ static int gcg_get_outputstring_spec(
int sts, size; int sts, size;
pwr_sAttrRef *attrref; pwr_sAttrRef *attrref;
pwr_tClassId cid; pwr_tClassId cid;
pwr_tTid tid;
ldh_tSesContext ldhses; ldh_tSesContext ldhses;
char *name_p; char *name_p;
pwr_tAName aname; pwr_tAName aname;
...@@ -3899,7 +3900,7 @@ static int gcg_get_outputstring_spec( ...@@ -3899,7 +3900,7 @@ static int gcg_get_outputstring_spec(
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
/* Check that this is objdid of an existing object */ /* Check that this is objdid of an existing object */
sts = ldh_GetAttrRefOrigTid( ldhses, attrref, &cid); sts = ldh_GetAttrRefOrigTid( ldhses, attrref, &tid);
if ( EVEN(sts)) { if ( EVEN(sts)) {
gcg_error_msg( gcgctx, GSX__REFOBJ, output_node); gcg_error_msg( gcgctx, GSX__REFOBJ, output_node);
free((char *) attrref); free((char *) attrref);
...@@ -3944,6 +3945,9 @@ static int gcg_get_outputstring_spec( ...@@ -3944,6 +3945,9 @@ static int gcg_get_outputstring_spec(
sts = gcg_parname_to_pgmname(ldhses, cid, s+1, parstring); sts = gcg_parname_to_pgmname(ldhses, cid, s+1, parstring);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
if ( tid == pwr_eType_DataRef)
strcat( parstring, ".Ptr");
*parprefix = GCG_PREFIX_REF; *parprefix = GCG_PREFIX_REF;
*partype = GCG_OTYPE_AREF; *partype = GCG_OTYPE_AREF;
return GSX__SPECFOUND; return GSX__SPECFOUND;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment