Commit d66ef7bb authored by claes's avatar claes

Time objects functions

parent 648d5e8e
...@@ -36,10 +36,12 @@ palette NavigatorPalette ...@@ -36,10 +36,12 @@ palette NavigatorPalette
class Ai class Ai
class Ao class Ao
class Av class Av
class ATv
class Co class Co
class Di class Di
class Do class Do
class Dv class Dv
class DTv
class Ii class Ii
class Io class Io
class Iv class Iv
...@@ -641,8 +643,8 @@ palette PlcEditorPalette ...@@ -641,8 +643,8 @@ palette PlcEditorPalette
menu String menu String
{ {
class CStoNumSp class CStoNumSp
class CStoSv
class CStoSp class CStoSp
class CStoSv
class GetSp class GetSp
class GetSv class GetSv
class StoNumSp class StoNumSp
...@@ -651,6 +653,27 @@ palette PlcEditorPalette ...@@ -651,6 +653,27 @@ palette PlcEditorPalette
class Strcat class Strcat
class SubStr class SubStr
} }
menu Time
{
class AtAdd
class AtSub
class AtDtSub
class CStoATp
class CStoATv
class CStoDTp
class CStoDTv
class DtAdd
class DtSub
class DtToA
class GetATp
class GetATv
class GetDTp
class GetDTv
class StoATp
class StoATv
class StoDTp
class StoDTv
}
menu Simulate menu Simulate
{ {
class CStoAi class CStoAi
......
/* /*
* Proview $Id: wb_gcg.c,v 1.31 2006-04-26 07:22:32 claes Exp $ * Proview $Id: wb_gcg.c,v 1.32 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -1382,6 +1382,16 @@ int gcg_print_inputs( ...@@ -1382,6 +1382,16 @@ int gcg_print_inputs(
"\"%s\"", "\"%s\"",
(nocondef + i)->str); (nocondef + i)->str);
break; break;
case GCG_ATIME:
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
"{%ld,%ld}",
(long int)(nocondef + i)->atime.tv_sec, (nocondef + i)->atime.tv_nsec);
break;
case GCG_DTIME:
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
"{%d,%d}",
(nocondef + i)->dtime.tv_sec, (nocondef + i)->dtime.tv_nsec);
break;
} }
} }
first_par = 0; first_par = 0;
...@@ -3571,14 +3581,25 @@ static int gcg_get_outputstring_spec( ...@@ -3571,14 +3581,25 @@ static int gcg_get_outputstring_spec(
free((char *) attrref); free((char *) attrref);
return GSX__SPECFOUND; return GSX__SPECFOUND;
} }
case pwr_cClass_GetSp: { case pwr_cClass_GetSp:
case pwr_cClass_GetATp:
case pwr_cClass_GetDTp: {
/********************************************************** /**********************************************************
* GETSP * GetSp, GetATP, GetDTp
***********************************************************/ ***********************************************************/
char aname[32];
switch ( output_node->ln.cid) {
case pwr_cClass_GetSp: strcpy( aname, "SpObject"); break;
case pwr_cClass_GetATp: strcpy( aname, "ATpObject"); break;
case pwr_cClass_GetDTp: strcpy( aname, "DTpObject"); break;
default: ;
}
/* Get the objdid stored in the parameter */ /* Get the objdid stored in the parameter */
sts = ldh_GetObjectPar( ldhses, output_node->ln.oid, sts = ldh_GetObjectPar( ldhses, output_node->ln.oid,
"DevBody", "SpObject", "DevBody", aname,
(char **)&attrref, &size); (char **)&attrref, &size);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
...@@ -6542,7 +6563,7 @@ vldh_t_node node; ...@@ -6542,7 +6563,7 @@ vldh_t_node node;
* *
* Description: * Description:
* Compile method for GETDI, GETDO, GETDV, GETAI, GETAO, GETAV, * Compile method for GETDI, GETDO, GETDV, GETAI, GETAO, GETAV,
* GETII, GETIO and GETIV node. * GETII, GETIO, GETIV, GetSv, GetATv and GetDTv node.
* Checks that the class of the referenced object is correct. * Checks that the class of the referenced object is correct.
* Prints declaration and directlink for a read rtdb pointer * Prints declaration and directlink for a read rtdb pointer
* for the refereced io-object. The pointer will point at * for the refereced io-object. The pointer will point at
...@@ -6659,6 +6680,26 @@ vldh_t_node node; ...@@ -6659,6 +6680,26 @@ vldh_t_node node;
gcg_aref_insert( gcgctx, attrref, GCG_PREFIX_REF); gcg_aref_insert( gcgctx, attrref, GCG_PREFIX_REF);
return GSX__SUCCESS; return GSX__SUCCESS;
} }
else if ( node->ln.cid == pwr_cClass_GetATv) {
if ( class != pwr_cClass_ATv) {
gcg_error_msg( gcgctx, GSX__REFCLASS, node);
return GSX__NEXTNODE;
}
/* Insert io object in ioread list */
gcg_aref_insert( gcgctx, attrref, GCG_PREFIX_REF);
return GSX__SUCCESS;
}
else if ( node->ln.cid == pwr_cClass_GetDTv) {
if ( class != pwr_cClass_DTv) {
gcg_error_msg( gcgctx, GSX__REFCLASS, node);
return GSX__NEXTNODE;
}
/* Insert io object in ioread list */
gcg_aref_insert( gcgctx, attrref, GCG_PREFIX_REF);
return GSX__SUCCESS;
}
/* Insert io object in ioread list */ /* Insert io object in ioread list */
gcg_ioread_insert( gcgctx, attrref, GCG_PREFIX_REF); gcg_ioread_insert( gcgctx, attrref, GCG_PREFIX_REF);
...@@ -6751,7 +6792,7 @@ vldh_t_node node; ...@@ -6751,7 +6792,7 @@ vldh_t_node node;
* vldh_t_node node I vldh node. * vldh_t_node node I vldh node.
* *
* Description: * Description:
* Compile method for GETDP, GETAP, GETSP * Compile method for GetDp, GetAp, GetSp, GetATp, GetDTp
* Checks that the referenced object exists and that the referenced * Checks that the referenced object exists and that the referenced
* parameter exists in that object, and that the type of the parameter * parameter exists in that object, and that the type of the parameter
* is correct. * is correct.
...@@ -6876,6 +6917,18 @@ vldh_t_node node; ...@@ -6876,6 +6917,18 @@ vldh_t_node node;
return GSX__NEXTNODE; return GSX__NEXTNODE;
} }
break; break;
case pwr_eType_Time :
if ( node->ln.cid != pwr_cClass_GetATp) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
case pwr_eType_DeltaTime :
if ( node->ln.cid != pwr_cClass_GetDTp) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
default: default:
/* Not allowed type */ /* Not allowed type */
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node); gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
...@@ -8018,9 +8071,29 @@ vldh_t_node node; ...@@ -8018,9 +8071,29 @@ vldh_t_node node;
strcpy( nocondef[0].str, (char *) nocondef_ptr); strcpy( nocondef[0].str, (char *) nocondef_ptr);
nocontype[0] = GCG_STRING; nocontype[0] = GCG_STRING;
} }
else if ( node->ln.cid == pwr_cClass_StoATv ||
node->ln.cid == pwr_cClass_CStoATv) {
if ( class != pwr_cClass_ATv) {
gcg_error_msg( gcgctx, GSX__REFCLASS, node);
return GSX__NEXTNODE;
}
nocondef[0].atime = *(pwr_tTime *) nocondef_ptr;
nocontype[0] = GCG_ATIME;
}
else if ( node->ln.cid == pwr_cClass_StoDTv ||
node->ln.cid == pwr_cClass_CStoDTv) {
if ( class != pwr_cClass_DTv) {
gcg_error_msg( gcgctx, GSX__REFCLASS, node);
return GSX__NEXTNODE;
}
nocondef[0].dtime = *(pwr_tDeltaTime *) nocondef_ptr;
nocontype[0] = GCG_DTIME;
}
free(nocondef_ptr); free(nocondef_ptr);
if ( class == pwr_cClass_Sv) { if ( class == pwr_cClass_Sv ||
class == pwr_cClass_ATv ||
class == pwr_cClass_DTv) {
/* Insert io object in ref list */ /* Insert io object in ref list */
gcg_aref_insert( gcgctx, refattrref, GCG_PREFIX_REF); gcg_aref_insert( gcgctx, refattrref, GCG_PREFIX_REF);
...@@ -8255,6 +8328,20 @@ vldh_t_node node; ...@@ -8255,6 +8328,20 @@ vldh_t_node node;
return GSX__NEXTNODE; return GSX__NEXTNODE;
} }
break; break;
case pwr_eType_Time :
if ( !( node->ln.cid == pwr_cClass_StoATp ||
node->ln.cid == pwr_cClass_CStoATp )) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
case pwr_eType_DeltaTime :
if ( !( node->ln.cid == pwr_cClass_StoDTp ||
node->ln.cid == pwr_cClass_CStoDTp )) {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
return GSX__NEXTNODE;
}
break;
default: default:
/* Not allowed type */ /* Not allowed type */
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node); gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
...@@ -8299,6 +8386,16 @@ vldh_t_node node; ...@@ -8299,6 +8386,16 @@ vldh_t_node node;
strcpy( nocondef[0].str, (char *) nocondef_ptr); strcpy( nocondef[0].str, (char *) nocondef_ptr);
nocontype[0] = GCG_STRING; nocontype[0] = GCG_STRING;
} }
else if ( node->ln.cid == pwr_cClass_StoATp ||
node->ln.cid == pwr_cClass_CStoATp) {
nocondef[0].atime = *(pwr_tTime *) nocondef_ptr;
nocontype[0] = GCG_ATIME;
}
else if ( node->ln.cid == pwr_cClass_StoDTp ||
node->ln.cid == pwr_cClass_CStoDTp) {
nocondef[0].dtime = *(pwr_tDeltaTime *) nocondef_ptr;
nocontype[0] = GCG_DTIME;
}
free(nocondef_ptr); free(nocondef_ptr);
/* Insert object in ref list */ /* Insert object in ref list */
......
/* /*
* Proview $Id: wb_gcg.h,v 1.7 2005-11-22 12:22:42 claes Exp $ * Proview $Id: wb_gcg.h,v 1.8 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -47,6 +47,8 @@ extern "C" { ...@@ -47,6 +47,8 @@ extern "C" {
#define GCG_BOOLEAN 1 #define GCG_BOOLEAN 1
#define GCG_INT32 2 #define GCG_INT32 2
#define GCG_STRING 3 #define GCG_STRING 3
#define GCG_ATIME 4
#define GCG_DTIME 5
#define GCG_MAXFILES 6 #define GCG_MAXFILES 6
...@@ -100,6 +102,8 @@ typedef union { ...@@ -100,6 +102,8 @@ typedef union {
int bo; int bo;
float fl; float fl;
char str[80]; char str[80];
pwr_tTime atime;
pwr_tDeltaTime dtime;
} gcg_t_nocondef; } gcg_t_nocondef;
typedef struct { typedef struct {
......
/* /*
* Proview $Id: wb_gobj.c,v 1.15 2005-10-25 15:28:11 claes Exp $ * Proview $Id: wb_gobj.c,v 1.16 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define BEEP putchar( '\7' ); #define BEEP putchar( '\7' );
#define GOBJ_MAX_METHOD 27 #define GOBJ_MAX_METHOD 29
int gobj_get_object_m0(); int gobj_get_object_m0();
int gobj_get_object_m1(); int gobj_get_object_m1();
...@@ -75,8 +75,10 @@ int gobj_get_object_m24(); ...@@ -75,8 +75,10 @@ int gobj_get_object_m24();
int gobj_get_object_m25(); int gobj_get_object_m25();
int gobj_get_object_m26(); int gobj_get_object_m26();
int gobj_get_object_m27(); int gobj_get_object_m27();
int gobj_get_object_m28();
int gobj_get_object_m29();
int (* gobj_get_object_m[30]) () = { int (* gobj_get_object_m[40]) () = {
&gobj_get_object_m0, &gobj_get_object_m0,
&gobj_get_object_m1, &gobj_get_object_m1,
&gobj_get_object_m2, &gobj_get_object_m2,
...@@ -105,6 +107,8 @@ int (* gobj_get_object_m[30]) () = { ...@@ -105,6 +107,8 @@ int (* gobj_get_object_m[30]) () = {
&gobj_get_object_m25, &gobj_get_object_m25,
&gobj_get_object_m26, &gobj_get_object_m26,
&gobj_get_object_m27, &gobj_get_object_m27,
&gobj_get_object_m28,
&gobj_get_object_m29,
}; };
static int gobj_expand_m0( foe_ctx foectx, static int gobj_expand_m0( foe_ctx foectx,
...@@ -2902,6 +2906,295 @@ unsigned long index; ...@@ -2902,6 +2906,295 @@ unsigned long index;
return FOE__SUCCESS; return FOE__SUCCESS;
} }
/*************************************************************************
*
* Name: gobj_get_object_m28()
*
* Type void
*
* Type Parameter IOGF Description
* foe_ctx foectx I foe context.
* vldh_t_node node I vldh node.
* unsigned long index I index indicating if the click has hit
* the upper or the lower part of the node.
*
* Description:
* Method for GetATgeneric. The selected object in the navigator is
* inserted.
*
*
**************************************************************************/
int gobj_get_object_m28( foe_ctx foectx, vldh_t_node node, unsigned long index)
{
pwr_tTid tid;
ldh_tSesContext ldhses;
int sts;
vldh_t_plc plc;
vldh_t_con *con_list;
vldh_t_con *con_ptr;
vldh_t_node new_node, source, dest;
unsigned long source_point, dest_point;
unsigned long con_count;
int j;
pwr_sAttrRef attrref;
pwr_tClassId create_classid;
char parname[40];
int is_attr;
/* Get the selected object in the navigator */
plc = (node->hn.wind)->hw.plc;
ldhses =(node->hn.wind)->hw.ldhses;
sts = gobj_get_select( foectx, &attrref, &is_attr);
if ( EVEN(sts)) {
foe_message( foectx,"Select string value or attribute in the navigator");
BEEP;
return sts;
}
sts = ldh_GetAttrRefTid( ldhses, &attrref, &tid);
if (EVEN(sts)) return sts;
if ( !cdh_tidIsCid(tid)) {
sts = ldh_GetAttrRefType( ldhses, &attrref, &tid);
if (EVEN(sts)) return sts;
}
sts = vldh_get_cons_node( node, &con_count, &con_list);
if ( EVEN(sts)) return sts;
switch ( node->ln.cid) {
case pwr_cClass_GetATgeneric:
switch ( tid) {
case pwr_eType_Time:
/* Create a GetATp */
create_classid = pwr_cClass_GetATp;
strcpy( parname, "ATpObject");
break;
case pwr_cClass_ATv:
strcpy( parname, "ATvObject");
create_classid = pwr_cClass_GetATv;
break;
default:
foe_message( foectx,"Select a time value or attribute in the navigator");
BEEP;
return 0;
}
break;
case pwr_cClass_GetDTgeneric:
switch ( tid) {
case pwr_eType_DeltaTime:
/* Create a GetDTp */
create_classid = pwr_cClass_GetDTp;
strcpy( parname, "DTpObject");
break;
case pwr_cClass_DTv:
strcpy( parname, "DTvObject");
create_classid = pwr_cClass_GetDTv;
break;
default:
foe_message( foectx,"Select a time value or attribute in the navigator");
BEEP;
return 0;
}
break;
}
sts = gre_create_node( foectx->grectx, create_classid,
node->ln.x, node->ln.y, &new_node);
if ( EVEN(sts)) return sts;
/* Create new connections */
con_ptr = con_list;
for ( j = 0; j < con_count; j++) {
if ( (*con_ptr)->hc.source_node == node) {
source = new_node;
source_point = 0;
dest = (*con_ptr)->hc.dest_node;
dest_point = (*con_ptr)->lc.dest_point;
}
else {
dest = new_node;
dest_point = 0;
source = (*con_ptr)->hc.source_node;
source_point = (*con_ptr)->lc.source_point;
}
sts = gre_create_con( foectx->grectx, (*con_ptr)->lc.cid,
source, source_point,
dest, dest_point, (*con_ptr)->lc.drawtype);
if (EVEN(sts)) return sts;
con_ptr++;
}
/* Remove old node and connections */
gre_delete_node( foectx->grectx, node);
foectx->popupmenu_node = 0;
if ( cdh_IsClassVolume( node->ln.oid.vid)) {
gobj_ref_replace( ldhses, node, &attrref);
if ( EVEN(sts)) return sts;
}
/* Set the parameter value */
sts = ldh_SetObjectPar( ldhses,
new_node->ln.oid,
"DevBody",
parname,
(char *)&attrref, sizeof(attrref));
if ( EVEN(sts)) return sts;
gre_node_update( foectx->grectx, new_node);
if ( con_count > 0) XtFree((char *) con_list);
return FOE__SUCCESS;
}
/*************************************************************************
*
* Name: gobj_get_object_m29()
*
* Type void
*
* Type Parameter IOGF Description
* foe_ctx foectx I foe context.
* vldh_t_node node I vldh node.
* unsigned long index I index indicating if the click has hit
* the upper or the lower part of the node.
*
* Description:
* Method for StoATgeneric. The selected object in the navigator is
* inserted.
*
*
**************************************************************************/
int gobj_get_object_m29( foe_ctx foectx, vldh_t_node node, unsigned long index)
{
pwr_tTid tid;
ldh_tSesContext ldhses;
int sts;
vldh_t_plc plc;
vldh_t_con *con_list;
vldh_t_con *con_ptr;
vldh_t_node new_node, source, dest;
unsigned long source_point, dest_point;
unsigned long con_count;
int j;
pwr_sAttrRef attrref;
pwr_tClassId create_classid;
char parname[40];
int is_attr;
/* Get the selected object in the navigator */
plc = (node->hn.wind)->hw.plc;
ldhses =(node->hn.wind)->hw.ldhses;
sts = gobj_get_select( foectx, &attrref, &is_attr);
if ( EVEN(sts)) {
foe_message( foectx,"Select a string value or attribute in the navigator");
BEEP;
return sts;
}
sts = ldh_GetAttrRefTid( ldhses, &attrref, &tid);
if (EVEN(sts)) return sts;
if ( !cdh_tidIsCid(tid)) {
sts = ldh_GetAttrRefType( ldhses, &attrref, &tid);
if (EVEN(sts)) return sts;
}
sts = vldh_get_cons_node( node, &con_count, &con_list);
if ( EVEN(sts)) return sts;
switch ( node->ln.cid) {
case pwr_cClass_StoATgeneric:
switch ( tid) {
case pwr_eType_Time:
/* Create a StoATp */
strcpy( parname, "Object");
create_classid = pwr_cClass_StoATp;
break;
case pwr_cClass_ATv:
strcpy( parname, "ATvObject");
create_classid = pwr_cClass_StoATv;
break;
default:
foe_message( foectx,"Select a time value or attribute in the navigator");
BEEP;
return 0;
}
break;
case pwr_cClass_StoDTgeneric:
switch ( tid) {
case pwr_eType_DeltaTime:
/* Create a StoDTp */
strcpy( parname, "Object");
create_classid = pwr_cClass_StoDTp;
break;
case pwr_cClass_DTv:
strcpy( parname, "DTvObject");
create_classid = pwr_cClass_StoDTv;
break;
default:
foe_message( foectx,"Select a time value or attribute in the navigator");
BEEP;
return 0;
}
break;
default:
return 0;
}
sts = gre_create_node( foectx->grectx, create_classid,
node->ln.x, node->ln.y, &new_node);
if ( EVEN(sts)) return sts;
/* Create new connections */
con_ptr = con_list;
for ( j = 0; j < con_count; j++) {
if ( (*con_ptr)->hc.source_node == node) {
source = new_node;
source_point = 0;
dest = (*con_ptr)->hc.dest_node;
dest_point = (*con_ptr)->lc.dest_point;
}
else {
dest = new_node;
dest_point = 0;
source = (*con_ptr)->hc.source_node;
source_point = (*con_ptr)->lc.source_point;
}
sts = gre_create_con( foectx->grectx, (*con_ptr)->lc.cid,
source, source_point,
dest, dest_point, (*con_ptr)->lc.drawtype);
if (EVEN(sts)) return sts;
con_ptr++;
}
/* Remove old node and connections */
gre_delete_node( foectx->grectx, node);
foectx->popupmenu_node = 0;
if ( cdh_IsClassVolume( node->ln.oid.vid)) {
gobj_ref_replace( ldhses, node, &attrref);
if ( EVEN(sts)) return sts;
}
/* Set the parameter value */
sts = ldh_SetObjectPar( ldhses,
new_node->ln.oid,
"DevBody",
parname,
(char *)&attrref, sizeof(attrref));
if ( EVEN(sts)) return sts;
gre_node_update( foectx->grectx, new_node);
if ( con_count > 0) XtFree((char *) con_list);
return FOE__SUCCESS;
}
/************************************************************************* /*************************************************************************
* *
...@@ -2973,6 +3266,12 @@ int gobj_expand( foe_ctx foectx, ...@@ -2973,6 +3266,12 @@ int gobj_expand( foe_ctx foectx,
case pwr_cClass_cstoii: case pwr_cClass_cstoii:
case pwr_cClass_cstoio: case pwr_cClass_cstoio:
case pwr_cClass_cstoiv: case pwr_cClass_cstoiv:
case pwr_cClass_GetATv:
case pwr_cClass_GetDTv:
case pwr_cClass_StoATv:
case pwr_cClass_StoDTv:
case pwr_cClass_CStoATv:
case pwr_cClass_CStoDTv:
sts = gobj_expand_m1( foectx, node, compress); sts = gobj_expand_m1( foectx, node, compress);
break; break;
case pwr_cClass_and: case pwr_cClass_and:
......
/* /*
* Proview $Id: wb_goenm4.c,v 1.8 2005-09-06 10:43:31 claes Exp $ * Proview $Id: wb_goenm4.c,v 1.9 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -55,7 +55,11 @@ typedef enum { ...@@ -55,7 +55,11 @@ typedef enum {
goen_eGraphIndex_StoSgeneric = 37, goen_eGraphIndex_StoSgeneric = 37,
goen_eGraphIndex_GetIgeneric = 38, goen_eGraphIndex_GetIgeneric = 38,
goen_eGraphIndex_StoIgeneric = 39, goen_eGraphIndex_StoIgeneric = 39,
goen_eGraphIndex_FirstScan = 40 goen_eGraphIndex_FirstScan = 40,
goen_eGraphIndex_GetATgeneric = 41,
goen_eGraphIndex_StoATgeneric = 42,
goen_eGraphIndex_GetDTgeneric = 43,
goen_eGraphIndex_StoDTgeneric = 44
} goen_eGraphIndex; } goen_eGraphIndex;
static float f_pinlength = GOEN_F_PINLENGTH; static float f_pinlength = GOEN_F_PINLENGTH;
...@@ -406,6 +410,8 @@ int goen_create_nodetype_m4( ...@@ -406,6 +410,8 @@ int goen_create_nodetype_m4(
case goen_eGraphIndex_GetDgeneric: case goen_eGraphIndex_GetDgeneric:
case goen_eGraphIndex_GetSgeneric: case goen_eGraphIndex_GetSgeneric:
case goen_eGraphIndex_GetIgeneric: case goen_eGraphIndex_GetIgeneric:
case goen_eGraphIndex_GetATgeneric:
case goen_eGraphIndex_GetDTgeneric:
{ {
f_width = GOEN_F_GRID * 4; f_width = GOEN_F_GRID * 4;
f_height = GOEN_F_GRID; f_height = GOEN_F_GRID;
...@@ -424,6 +430,12 @@ int goen_create_nodetype_m4( ...@@ -424,6 +430,12 @@ int goen_create_nodetype_m4(
else if ( graph_index == goen_eGraphIndex_GetIgeneric) else if ( graph_index == goen_eGraphIndex_GetIgeneric)
flow_AddText( nc, "GetI", f_strlength, 0.5 * f_strheight, flow_AddText( nc, "GetI", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE); flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else if ( graph_index == goen_eGraphIndex_GetATgeneric)
flow_AddText( nc, "GetAT", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else if ( graph_index == goen_eGraphIndex_GetDTgeneric)
flow_AddText( nc, "GetDT", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else else
flow_AddText( nc, "GetD", f_strlength, 0.5 * f_strheight, flow_AddText( nc, "GetD", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE); flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
...@@ -433,6 +445,8 @@ int goen_create_nodetype_m4( ...@@ -433,6 +445,8 @@ int goen_create_nodetype_m4(
case goen_eGraphIndex_StoDgeneric: case goen_eGraphIndex_StoDgeneric:
case goen_eGraphIndex_StoSgeneric: case goen_eGraphIndex_StoSgeneric:
case goen_eGraphIndex_StoIgeneric: case goen_eGraphIndex_StoIgeneric:
case goen_eGraphIndex_StoATgeneric:
case goen_eGraphIndex_StoDTgeneric:
{ {
f_width = GOEN_F_GRID * 4; f_width = GOEN_F_GRID * 4;
f_height = GOEN_F_GRID; f_height = GOEN_F_GRID;
...@@ -451,6 +465,12 @@ int goen_create_nodetype_m4( ...@@ -451,6 +465,12 @@ int goen_create_nodetype_m4(
else if ( graph_index == goen_eGraphIndex_StoIgeneric) else if ( graph_index == goen_eGraphIndex_StoIgeneric)
flow_AddText( nc, "StoI", f_strlength, 0.5 * f_strheight, flow_AddText( nc, "StoI", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE); flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else if ( graph_index == goen_eGraphIndex_StoATgeneric)
flow_AddText( nc, "StoAT", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else if ( graph_index == goen_eGraphIndex_StoDTgeneric)
flow_AddText( nc, "StoDT", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
else else
flow_AddText( nc, "StoD", f_strlength, 0.5 * f_strheight, flow_AddText( nc, "StoD", f_strlength, 0.5 * f_strheight,
flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE); flow_eDrawType_TextHelveticaBold, GOEN_F_TEXTSIZE);
......
/* /*
* Proview $Id: wb_gsx.c,v 1.6 2005-09-06 10:43:31 claes Exp $ * Proview $Id: wb_gsx.c,v 1.7 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -752,6 +752,18 @@ int gsx_auto_create( ...@@ -752,6 +752,18 @@ int gsx_auto_create(
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
*destpoint = 0; *destpoint = 0;
break; break;
case pwr_eType_Time:
sts = gre_create_node( foectx->grectx, pwr_cClass_GetATgeneric,
x, y, dest);
if ( EVEN(sts)) return sts;
*destpoint = 0;
break;
case pwr_eType_DeltaTime:
sts = gre_create_node( foectx->grectx, pwr_cClass_GetDTgeneric,
x, y, dest);
if ( EVEN(sts)) return sts;
*destpoint = 0;
break;
default: default:
free((char *) bodydef); free((char *) bodydef);
return 0; return 0;
...@@ -785,6 +797,18 @@ int gsx_auto_create( ...@@ -785,6 +797,18 @@ int gsx_auto_create(
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
*destpoint = 0; *destpoint = 0;
break; break;
case pwr_eType_Time:
sts = gre_create_node( foectx->grectx, pwr_cClass_StoATgeneric,
x, y, dest);
if ( EVEN(sts)) return sts;
*destpoint = 0;
break;
case pwr_eType_DeltaTime:
sts = gre_create_node( foectx->grectx, pwr_cClass_StoDTgeneric,
x, y, dest);
if ( EVEN(sts)) return sts;
*destpoint = 0;
break;
default: default:
free((char *) bodydef); free((char *) bodydef);
return 0; return 0;
......
/* /*
* Proview $Id: wb_pal.cpp,v 1.8 2005-09-06 10:43:31 claes Exp $ * Proview $Id: wb_pal.cpp,v 1.9 2006-04-28 05:01:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -392,6 +392,8 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name, ...@@ -392,6 +392,8 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case pwr_cClass_GetIi: case pwr_cClass_GetIi:
case pwr_cClass_GetIo: case pwr_cClass_GetIo:
case pwr_cClass_GetIv: case pwr_cClass_GetIv:
case pwr_cClass_GetATv:
case pwr_cClass_GetDTv:
case pwr_cClass_GetDattr: case pwr_cClass_GetDattr:
case pwr_cClass_GetAattr: case pwr_cClass_GetAattr:
case pwr_cClass_GetIattr: case pwr_cClass_GetIattr:
...@@ -403,8 +405,10 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name, ...@@ -403,8 +405,10 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case pwr_cClass_GetIpToA: case pwr_cClass_GetIpToA:
case pwr_cClass_GetIp: case pwr_cClass_GetIp:
case pwr_cClass_GetSp: case pwr_cClass_GetSp:
case pwr_cClass_GetATp:
case pwr_cClass_GetDTp:
case pwr_cClass_GetData: case pwr_cClass_GetData:
pixmap = pal->pixmap_getp; pixmap = pal->pixmap_get;
break; break;
case pwr_cClass_stoap: case pwr_cClass_stoap:
case pwr_cClass_stodp: case pwr_cClass_stodp:
...@@ -424,6 +428,14 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name, ...@@ -424,6 +428,14 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case pwr_cClass_cstosv: case pwr_cClass_cstosv:
case pwr_cClass_cstosp: case pwr_cClass_cstosp:
case pwr_cClass_stosp: case pwr_cClass_stosp:
case pwr_cClass_StoATp:
case pwr_cClass_StoDTp:
pixmap = pal->pixmap_sto;
break;
case pwr_cClass_CStoATv:
case pwr_cClass_CStoDTv:
case pwr_cClass_CStoATp:
case pwr_cClass_CStoDTp:
case pwr_cClass_CStoAattr: case pwr_cClass_CStoAattr:
case pwr_cClass_CStoIattr: case pwr_cClass_CStoIattr:
case pwr_cClass_CStoSattr: case pwr_cClass_CStoSattr:
......
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