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
d62c91d4
Commit
d62c91d4
authored
Jun 26, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method 66 for class GetDataInput added
parent
c8f813cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
2 deletions
+111
-2
wb/lib/wb/src/wb_gcg.cpp
wb/lib/wb/src/wb_gcg.cpp
+111
-2
No files found.
wb/lib/wb/src/wb_gcg.cpp
View file @
d62c91d4
/*
/*
* Proview $Id: wb_gcg.cpp,v 1.1
3 2008-06-24 07:51:06
claes Exp $
* Proview $Id: wb_gcg.cpp,v 1.1
4 2008-06-26 13:19:31
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
...
@@ -225,6 +225,7 @@ int gcg_comp_m62( gcg_ctx gcgctx, vldh_t_node node);
...
@@ -225,6 +225,7 @@ int gcg_comp_m62( gcg_ctx gcgctx, vldh_t_node node);
int
gcg_comp_m63
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m63
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m64
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m64
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m65
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m65
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
int
gcg_comp_m66
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
gcg_tMethod
gcg_comp_m
[
70
]
=
{
gcg_tMethod
gcg_comp_m
[
70
]
=
{
(
gcg_tMethod
)
gcg_comp_m0
,
(
gcg_tMethod
)
gcg_comp_m0
,
...
@@ -292,7 +293,8 @@ gcg_tMethod gcg_comp_m[70] = {
...
@@ -292,7 +293,8 @@ gcg_tMethod gcg_comp_m[70] = {
gcg_comp_m62
,
gcg_comp_m62
,
gcg_comp_m63
,
gcg_comp_m63
,
gcg_comp_m64
,
gcg_comp_m64
,
gcg_comp_m65
gcg_comp_m65
,
gcg_comp_m66
};
};
...
@@ -15396,6 +15398,113 @@ int gcg_comp_m65( gcg_ctx gcgctx, vldh_t_node node)
...
@@ -15396,6 +15398,113 @@ int gcg_comp_m65( gcg_ctx gcgctx, vldh_t_node node)
return
GSX__SUCCESS
;
return
GSX__SUCCESS
;
}
}
/*************************************************************************
*
* Name: gcg_comp_m66()
*
* Type void
*
* Type Parameter IOGF Description
* gcg_ctx gcgctx I gcg context.
* vldh_t_node node I vldh node.
*
* Description:
* Compile method for GetDataP
* Prints code for declaration and direkt link of a rtdbpointer.
* Prints an exec call :
* 'structname'_exec( 'objpointer');
* ex: getpi_exec( Z80000811);
*
* Checks that the referenced object exists and that the referenced
* parameter exists in that objekt, and that the type of the parameter
* is correct.
* Prints declaration and direct link of pointer to referenced object.
*
**************************************************************************/
int
gcg_comp_m66
(
gcg_ctx
gcgctx
,
vldh_t_node
node
)
{
ldh_sParDef
*
bodydef
;
int
rows
,
sts
;
int
size
;
pwr_tAttrRef
refattrref
;
pwr_tAttrRef
*
refattrref_ptr
;
ldh_sAttrRefInfo
info
;
char
*
name_p
;
pwr_tOName
aname
;
char
*
s
;
ldh_tSesContext
ldhses
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
sts
=
gcg_ref_insert
(
gcgctx
,
node
->
ln
.
oid
,
GCG_PREFIX_REF
);
/* Get the attrref of the referenced io object stored in the
first parameter in defbody */
/* Get the devbody parameters for this class */
sts
=
ldh_GetObjectBodyDef
(
ldhses
,
node
->
ln
.
cid
,
"DevBody"
,
1
,
&
bodydef
,
&
rows
);
if
(
EVEN
(
sts
)
)
return
sts
;
sts
=
ldh_GetObjectPar
(
ldhses
,
node
->
ln
.
oid
,
"DevBody"
,
bodydef
[
0
].
ParName
,
(
char
**
)
&
refattrref_ptr
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
free
((
char
*
)
bodydef
);
refattrref
=
*
refattrref_ptr
;
free
((
char
*
)
refattrref_ptr
);
sts
=
gcg_replace_ref
(
gcgctx
,
&
refattrref
,
node
);
if
(
EVEN
(
sts
))
return
sts
;
/* Get properties of referenced attribute */
sts
=
ldh_GetAttrRefInfo
(
(
node
->
hn
.
wind
)
->
hw
.
ldhses
,
&
refattrref
,
&
info
);
if
(
EVEN
(
sts
))
{
gcg_error_msg
(
gcgctx
,
GSX__REFOBJ
,
node
);
free
((
char
*
)
bodydef
);
return
GSX__NEXTNODE
;
}
if
(
!
(
info
.
flags
&
PWR_MASK_POINTER
&&
info
.
adefCid
==
pwr_eClass_Input
))
{
gcg_error_msg
(
gcgctx
,
GSX__REFPARTYPE
,
node
);
return
GSX__NEXTNODE
;
}
/* Get parameter name of attrref */
sts
=
ldh_AttrRefToName
(
ldhses
,
&
refattrref
,
ldh_eName_ArefVol
,
&
name_p
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
(
s
=
strchr
(
name_p
,
'.'
))
==
0
)
{
gcg_error_msg
(
gcgctx
,
GSX__REFOBJ
,
node
);
return
GSX__NEXTPAR
;
}
strcpy
(
aname
,
s
+
1
);
sts
=
gcg_print_exec_macro
(
gcgctx
,
node
,
node
->
ln
.
oid
,
GCG_PREFIX_REF
);
if
(
EVEN
(
sts
))
return
sts
;
/* Print the referenced attribute */
IF_PR
fprintf
(
gcgctx
->
files
[
GCGM1_CODE_FILE
],
"%c%s->%sP);
\n
"
,
GCG_PREFIX_REF
,
vldh_IdToStr
(
0
,
refattrref
.
Objid
),
aname
);
/* Insert object in ref list */
gcg_ref_insert
(
gcgctx
,
refattrref
.
Objid
,
GCG_PREFIX_REF
);
return
GSX__SUCCESS
;
}
/*************************************************************************
/*************************************************************************
*
*
* Name: gcg_wind_check_modification()
* Name: gcg_wind_check_modification()
...
...
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