Commit bfef60d9 authored by Claes Sjofors's avatar Claes Sjofors

GetDataRefp, pointer stored in object

parent 674fb529
......@@ -195,6 +195,12 @@
#define GetDatap_exec(object, in)\
memcpy( &object->Out, &in, 12);
/*_*
@aref getdatarefp GetDataRefp
*/
#define GetDataRefp_exec(object, in)\
memcpy( &object->ActVal, &in, sizeof(object->ActVal));
/*_*
@aref getdatainput GetDatainput
*/
......
......@@ -49,18 +49,16 @@ SObject pwrb:Class
!
! The complete name of quantity has to be supplied.
!
! The GetDataRefp object
! - is a pure address reference,
! - contains no relevant information (=data) in rtdb,
! - is without executable code.
!*/
Object GetDataRefp $ClassDef 622
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
Attr Flags = pwr_mClassDef_DevOnly
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "GetDataRefp"
EndBody
!/**
! Used by the PLC Editor.
!*/
......@@ -68,9 +66,7 @@ SObject pwrb:Class
Body SysBody
Attr PgmName = "ActVal"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_RTVIRTUAL
Attr Flags |= PWR_MASK_DEVBODYREF
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_NOEDIT
Attr TypeRef = "pwrs:Type-$DataRef"
Attr GraphName = "VAL"
EndBody
......@@ -124,7 +120,7 @@ SObject pwrb:Class
Attr default_mask[1] = 1
Attr segname_annotation = 0
Attr devbody_annotation = 1
Attr compmethod = 10
Attr compmethod = 36
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
......
......@@ -11014,7 +11014,8 @@ int gcg_comp_m36( gcg_ctx gcgctx, vldh_t_node node)
}
if ( info.type == pwr_eType_DataRef || info.flags & PWR_MASK_POINTER) {
if ( node->ln.cid != pwr_cClass_GetDatap) {
if ( !(node->ln.cid == pwr_cClass_GetDatap ||
node->ln.cid == pwr_cClass_GetDataRefp)) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
......
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