Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
d66ef7bb
Commit
d66ef7bb
authored
Apr 28, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time objects functions
parent
648d5e8e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
497 additions
and
18 deletions
+497
-18
wb/exp/wb/src/pwr_wb_palette.cnf
wb/exp/wb/src/pwr_wb_palette.cnf
+24
-1
wb/lib/wb/src/wb_gcg.c
wb/lib/wb/src/wb_gcg.c
+105
-8
wb/lib/wb/src/wb_gcg.h
wb/lib/wb/src/wb_gcg.h
+5
-1
wb/lib/wb/src/wb_gobj.c
wb/lib/wb/src/wb_gobj.c
+302
-3
wb/lib/wb/src/wb_goenm4.c
wb/lib/wb/src/wb_goenm4.c
+22
-2
wb/lib/wb/src/wb_gsx.c
wb/lib/wb/src/wb_gsx.c
+25
-1
wb/lib/wb/src/wb_pal.cpp
wb/lib/wb/src/wb_pal.cpp
+14
-2
No files found.
wb/exp/wb/src/pwr_wb_palette.cnf
View file @
d66ef7bb
...
...
@@ -36,10 +36,12 @@ palette NavigatorPalette
class Ai
class Ao
class Av
class ATv
class Co
class Di
class Do
class Dv
class DTv
class Ii
class Io
class Iv
...
...
@@ -641,8 +643,8 @@ palette PlcEditorPalette
menu String
{
class CStoNumSp
class CStoSv
class CStoSp
class CStoSv
class GetSp
class GetSv
class StoNumSp
...
...
@@ -651,6 +653,27 @@ palette PlcEditorPalette
class Strcat
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
{
class CStoAi
...
...
wb/lib/wb/src/wb_gcg.c
View file @
d66ef7bb
/*
* Proview $Id: wb_gcg.c,v 1.3
1 2006-04-26 07:22:3
2 claes Exp $
* Proview $Id: wb_gcg.c,v 1.3
2 2006-04-28 05:01:0
2 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1382,6 +1382,16 @@ int gcg_print_inputs(
"
\"
%s
\"
"
,
(
nocondef
+
i
)
->
str
);
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
;
...
...
@@ -3571,14 +3581,25 @@ static int gcg_get_outputstring_spec(
free
((
char
*
)
attrref
);
return
GSX__SPECFOUND
;
}
case
pwr_cClass_GetSp
:
{
case
pwr_cClass_GetSp
:
case
pwr_cClass_GetATp
:
case
pwr_cClass_GetDTp
:
{
/**********************************************************
* G
ETSP
* G
etSp, 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 */
sts
=
ldh_GetObjectPar
(
ldhses
,
output_node
->
ln
.
oid
,
"DevBody"
,
"SpObject"
,
"DevBody"
,
aname
,
(
char
**
)
&
attrref
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -6542,7 +6563,7 @@ vldh_t_node node;
*
* Description:
* 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.
* Prints declaration and directlink for a read rtdb pointer
* for the refereced io-object. The pointer will point at
...
...
@@ -6659,6 +6680,26 @@ vldh_t_node node;
gcg_aref_insert
(
gcgctx
,
attrref
,
GCG_PREFIX_REF
);
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 */
gcg_ioread_insert
(
gcgctx
,
attrref
,
GCG_PREFIX_REF
);
...
...
@@ -6751,7 +6792,7 @@ vldh_t_node node;
* vldh_t_node node I vldh node.
*
* Description:
* Compile method for G
ETDP, GETAP, GETSP
* Compile method for G
etDp, GetAp, GetSp, GetATp, GetDTp
* Checks that the referenced object exists and that the referenced
* parameter exists in that object, and that the type of the parameter
* is correct.
...
...
@@ -6876,6 +6917,18 @@ vldh_t_node node;
return
GSX__NEXTNODE
;
}
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:
/* Not allowed type */
gcg_error_msg
(
gcgctx
,
GSX__REFPARTYPE
,
node
);
...
...
@@ -8018,9 +8071,29 @@ vldh_t_node node;
strcpy
(
nocondef
[
0
].
str
,
(
char
*
)
nocondef_ptr
);
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
);
if
(
class
==
pwr_cClass_Sv
)
{
if
(
class
==
pwr_cClass_Sv
||
class
==
pwr_cClass_ATv
||
class
==
pwr_cClass_DTv
)
{
/* Insert io object in ref list */
gcg_aref_insert
(
gcgctx
,
refattrref
,
GCG_PREFIX_REF
);
...
...
@@ -8255,6 +8328,20 @@ vldh_t_node node;
return
GSX__NEXTNODE
;
}
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:
/* Not allowed type */
gcg_error_msg
(
gcgctx
,
GSX__REFPARTYPE
,
node
);
...
...
@@ -8299,6 +8386,16 @@ vldh_t_node node;
strcpy
(
nocondef
[
0
].
str
,
(
char
*
)
nocondef_ptr
);
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
);
/* Insert object in ref list */
...
...
wb/lib/wb/src/wb_gcg.h
View file @
d66ef7bb
/*
* Proview $Id: wb_gcg.h,v 1.
7 2005-11-22 12:22:4
2 claes Exp $
* Proview $Id: wb_gcg.h,v 1.
8 2006-04-28 05:01:0
2 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -47,6 +47,8 @@ extern "C" {
#define GCG_BOOLEAN 1
#define GCG_INT32 2
#define GCG_STRING 3
#define GCG_ATIME 4
#define GCG_DTIME 5
#define GCG_MAXFILES 6
...
...
@@ -100,6 +102,8 @@ typedef union {
int
bo
;
float
fl
;
char
str
[
80
];
pwr_tTime
atime
;
pwr_tDeltaTime
dtime
;
}
gcg_t_nocondef
;
typedef
struct
{
...
...
wb/lib/wb/src/wb_gobj.c
View file @
d66ef7bb
/*
* Proview $Id: wb_gobj.c,v 1.1
5 2005-10-25 15:28:11
claes Exp $
* Proview $Id: wb_gobj.c,v 1.1
6 2006-04-28 05:01:02
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -45,7 +45,7 @@
#define BEEP putchar( '\7' );
#define GOBJ_MAX_METHOD 2
7
#define GOBJ_MAX_METHOD 2
9
int
gobj_get_object_m0
();
int
gobj_get_object_m1
();
...
...
@@ -75,8 +75,10 @@ int gobj_get_object_m24();
int
gobj_get_object_m25
();
int
gobj_get_object_m26
();
int
gobj_get_object_m27
();
int
gobj_get_object_m28
();
int
gobj_get_object_m29
();
int
(
*
gobj_get_object_m
[
3
0
])
()
=
{
int
(
*
gobj_get_object_m
[
4
0
])
()
=
{
&
gobj_get_object_m0
,
&
gobj_get_object_m1
,
&
gobj_get_object_m2
,
...
...
@@ -105,6 +107,8 @@ int (* gobj_get_object_m[30]) () = {
&
gobj_get_object_m25
,
&
gobj_get_object_m26
,
&
gobj_get_object_m27
,
&
gobj_get_object_m28
,
&
gobj_get_object_m29
,
};
static
int
gobj_expand_m0
(
foe_ctx
foectx
,
...
...
@@ -2902,6 +2906,295 @@ unsigned long index;
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,
case
pwr_cClass_cstoii
:
case
pwr_cClass_cstoio
:
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
);
break
;
case
pwr_cClass_and
:
...
...
wb/lib/wb/src/wb_goenm4.c
View file @
d66ef7bb
/*
* 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.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -55,7 +55,11 @@ typedef enum {
goen_eGraphIndex_StoSgeneric
=
37
,
goen_eGraphIndex_GetIgeneric
=
38
,
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
;
static
float
f_pinlength
=
GOEN_F_PINLENGTH
;
...
...
@@ -406,6 +410,8 @@ int goen_create_nodetype_m4(
case
goen_eGraphIndex_GetDgeneric
:
case
goen_eGraphIndex_GetSgeneric
:
case
goen_eGraphIndex_GetIgeneric
:
case
goen_eGraphIndex_GetATgeneric
:
case
goen_eGraphIndex_GetDTgeneric
:
{
f_width
=
GOEN_F_GRID
*
4
;
f_height
=
GOEN_F_GRID
;
...
...
@@ -424,6 +430,12 @@ int goen_create_nodetype_m4(
else
if
(
graph_index
==
goen_eGraphIndex_GetIgeneric
)
flow_AddText
(
nc
,
"GetI"
,
f_strlength
,
0
.
5
*
f_strheight
,
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
flow_AddText
(
nc
,
"GetD"
,
f_strlength
,
0
.
5
*
f_strheight
,
flow_eDrawType_TextHelveticaBold
,
GOEN_F_TEXTSIZE
);
...
...
@@ -433,6 +445,8 @@ int goen_create_nodetype_m4(
case
goen_eGraphIndex_StoDgeneric
:
case
goen_eGraphIndex_StoSgeneric
:
case
goen_eGraphIndex_StoIgeneric
:
case
goen_eGraphIndex_StoATgeneric
:
case
goen_eGraphIndex_StoDTgeneric
:
{
f_width
=
GOEN_F_GRID
*
4
;
f_height
=
GOEN_F_GRID
;
...
...
@@ -451,6 +465,12 @@ int goen_create_nodetype_m4(
else
if
(
graph_index
==
goen_eGraphIndex_StoIgeneric
)
flow_AddText
(
nc
,
"StoI"
,
f_strlength
,
0
.
5
*
f_strheight
,
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
flow_AddText
(
nc
,
"StoD"
,
f_strlength
,
0
.
5
*
f_strheight
,
flow_eDrawType_TextHelveticaBold
,
GOEN_F_TEXTSIZE
);
...
...
wb/lib/wb/src/wb_gsx.c
View file @
d66ef7bb
/*
* 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.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -752,6 +752,18 @@ int gsx_auto_create(
if
(
EVEN
(
sts
))
return
sts
;
*
destpoint
=
0
;
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:
free
((
char
*
)
bodydef
);
return
0
;
...
...
@@ -785,6 +797,18 @@ int gsx_auto_create(
if
(
EVEN
(
sts
))
return
sts
;
*
destpoint
=
0
;
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:
free
((
char
*
)
bodydef
);
return
0
;
...
...
wb/lib/wb/src/wb_pal.cpp
View file @
d66ef7bb
/*
* 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.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -392,6 +392,8 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case
pwr_cClass_GetIi
:
case
pwr_cClass_GetIo
:
case
pwr_cClass_GetIv
:
case
pwr_cClass_GetATv
:
case
pwr_cClass_GetDTv
:
case
pwr_cClass_GetDattr
:
case
pwr_cClass_GetAattr
:
case
pwr_cClass_GetIattr
:
...
...
@@ -403,8 +405,10 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case
pwr_cClass_GetIpToA
:
case
pwr_cClass_GetIp
:
case
pwr_cClass_GetSp
:
case
pwr_cClass_GetATp
:
case
pwr_cClass_GetDTp
:
case
pwr_cClass_GetData
:
pixmap
=
pal
->
pixmap_get
p
;
pixmap
=
pal
->
pixmap_get
;
break
;
case
pwr_cClass_stoap
:
case
pwr_cClass_stodp
:
...
...
@@ -424,6 +428,14 @@ PalItemClass::PalItemClass( Pal *pal, char *item_name,
case
pwr_cClass_cstosv
:
case
pwr_cClass_cstosp
:
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_CStoIattr
:
case
pwr_cClass_CStoSattr
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment