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
ce715d97
Commit
ce715d97
authored
Jun 10, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method for sim objects
parent
de392c5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
1 deletion
+72
-1
wb/lib/wb/src/wb_gobj.c
wb/lib/wb/src/wb_gobj.c
+72
-1
No files found.
wb/lib/wb/src/wb_gobj.c
View file @
ce715d97
...
...
@@ -30,7 +30,7 @@
#define BEEP putchar( '\7' );
#define GOBJ_MAX_METHOD 2
5
#define GOBJ_MAX_METHOD 2
6
int
gobj_get_object_m0
();
int
gobj_get_object_m1
();
...
...
@@ -58,6 +58,7 @@ int gobj_get_object_m22();
int
gobj_get_object_m23
();
int
gobj_get_object_m24
();
int
gobj_get_object_m25
();
int
gobj_get_object_m26
();
int
(
*
gobj_get_object_m
[
30
])
()
=
{
&
gobj_get_object_m0
,
...
...
@@ -86,6 +87,7 @@ int (* gobj_get_object_m[30]) () = {
&
gobj_get_object_m23
,
&
gobj_get_object_m24
,
&
gobj_get_object_m25
,
&
gobj_get_object_m26
,
};
static
int
gobj_expand_m0
(
foe_ctx
foectx
,
...
...
@@ -2490,6 +2492,8 @@ unsigned long index;
case
pwr_eType_UInt16
:
case
pwr_eType_Int8
:
case
pwr_eType_UInt8
:
case
pwr_eType_Enum
:
case
pwr_eType_Mask
:
/* Create a GetIp */
create_classid
=
pwr_cClass_GetIp
;
strcpy
(
parname
,
"IpObject"
);
...
...
@@ -2628,6 +2632,8 @@ unsigned long index;
case
pwr_eType_UInt16
:
case
pwr_eType_Int8
:
case
pwr_eType_UInt8
:
case
pwr_eType_Enum
:
case
pwr_eType_Mask
:
/* Create a StoIp */
strcpy
(
parname
,
"Object"
);
create_classid
=
pwr_cClass_StoIp
;
...
...
@@ -2698,6 +2704,71 @@ unsigned long index;
return
FOE__SUCCESS
;
}
/*************************************************************************
*
* Name: gobj_get_object_m26()
*
* 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:
* Connect method for a connected simulation function object.
*
**************************************************************************/
int
gobj_get_object_m26
(
foectx
,
node
,
index
)
foe_ctx
foectx
;
vldh_t_node
node
;
unsigned
long
index
;
{
ldh_tSesContext
ldhses
;
int
sts
;
vldh_t_plc
plc
;
pwr_sAttrRef
attrref
;
pwr_sAttrRef
nattrref
;
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
)
||
is_attr
==
1
)
{
foe_message
(
foectx
,
"Select an object in the navigator"
);
BEEP
;
return
sts
;
}
/* Set the PlcConnect attribute in the current object */
sts
=
ldh_SetObjectPar
(
ldhses
,
node
->
ln
.
oid
,
"RtBody"
,
"PlcConnect"
,
(
char
*
)
&
attrref
,
sizeof
(
attrref
));
if
(
EVEN
(
sts
))
{
foe_message
(
foectx
,
"No PlcConnect attribute in object"
);
BEEP
;
return
sts
;
}
/* Set the SimConnect attribute in the connected object */
nattrref
=
cdh_ObjidToAref
(
node
->
ln
.
oid
);
sts
=
ldh_SetObjectPar
(
ldhses
,
attrref
.
Objid
,
"RtBody"
,
"SimConnect"
,
(
char
*
)
&
nattrref
,
sizeof
(
nattrref
));
gre_node_update
(
foectx
->
grectx
,
node
);
gre_node_update
(
foectx
->
grectx
,
node
);
return
FOE__SUCCESS
;
}
/*************************************************************************
*
...
...
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