Commit 7b5ae99c authored by claes's avatar claes

New classes GetDatap, CompModePID and CompPID added

parent bd4d4872
This diff is collapsed.
/*
* Proview $Id: rt_plc_macro_div.h,v 1.4 2005-09-01 14:57:56 claes Exp $
* Proview $Id: rt_plc_macro_div.h,v 1.5 2006-05-23 13:53:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -156,6 +156,12 @@
#define BwOr_exec(t, o)\
o->Status = *o->In1P | *o->In2P;
/*_*
@aref getdatap GetDatap
*/
#define GetDatap_exec(object, in)\
memcpy( &object->Out, &in, 12);
......
......@@ -630,6 +630,7 @@ palette PlcEditorPalette
class CStoAttrRefP
class DataCollect
class GetData
class GetDatap
}
menu String
{
......
/*
* Proview $Id: wb_gcg.c,v 1.32 2006-04-28 05:01:02 claes Exp $
* Proview $Id: wb_gcg.c,v 1.33 2006-05-23 13:53:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -10984,14 +10984,14 @@ vldh_t_node node;
* vldh_t_node node I vldh node.
*
* Description:
* Compile method for GetIpToA and GetIp
* Compile method for GetIpToA, GetIp and GetDatap.
* Prints code for declaration and direkt link of a rtdbpointer.
* Prints an exec call :
* 'structname'_exec( 'objpointer');
* ex: GetIpToA_exec( Z80000811);
*
* Checks that the referenced object exists and that the referenced
* parameter exists in that objekt, and that the type of the parameter
* parameter exists in that object, and that the type of the parameter
* is correct.
* Prints declaration and direct link of pointer to referenced object.
*
......@@ -11094,28 +11094,35 @@ vldh_t_node node;
//}
}
switch ( info.type ) {
case pwr_eType_Int32:
case pwr_eType_UInt32:
case pwr_eType_Int16:
case pwr_eType_UInt16:
case pwr_eType_Int8:
case pwr_eType_UInt8:
case pwr_eType_Enum:
case pwr_eType_Mask:
case pwr_eType_Status:
case pwr_eType_NetStatus:
if ( !(node->ln.cid != pwr_cClass_GetIpToA ||
node->ln.cid != pwr_cClass_GetIp)) {
if ( info.flags & PWR_MASK_POINTER) {
if ( node->ln.cid != pwr_cClass_GetDatap) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
}
else {
switch ( info.type ) {
case pwr_eType_Int32:
case pwr_eType_UInt32:
case pwr_eType_Int16:
case pwr_eType_UInt16:
case pwr_eType_Int8:
case pwr_eType_UInt8:
case pwr_eType_Enum:
case pwr_eType_Mask:
case pwr_eType_Status:
case pwr_eType_NetStatus:
if ( !(node->ln.cid != pwr_cClass_GetIpToA ||
node->ln.cid != pwr_cClass_GetIp)) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
default:
/* Not allowed type */
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
default:
/* Not allowed type */
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
sts = gcg_print_exec_macro( gcgctx, node, node->ln.oid, GCG_PREFIX_REF);
......
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