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
9dc551bf
Commit
9dc551bf
authored
May 27, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Crossreference files with simulate references
parent
269cd605
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
wb/lib/wb/src/wb_crrgen.cpp
wb/lib/wb/src/wb_crrgen.cpp
+17
-3
wb/lib/wb/src/wb_crrgen.h
wb/lib/wb/src/wb_crrgen.h
+1
-1
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+6
-2
No files found.
wb/lib/wb/src/wb_crrgen.cpp
View file @
9dc551bf
...
...
@@ -39,7 +39,8 @@ typedef enum {
typedef
enum
{
crrgen_eTable_
,
crrgen_eTable_Object
,
crrgen_eTable_Signal
crrgen_eTable_Signal
,
crrgen_eTable_SimSignal
}
crrgen_eTable
;
typedef
struct
sCrrKey
...
...
@@ -133,7 +134,16 @@ static crrgen_tRefList reflist[] = {
{
pwr_cClass_Ao
,
"RtBody"
,
"SigChanCon"
,
crrgen_eType_Ref
,
crrgen_eTable_Object
,
0
},
{
pwr_cClass_Ii
,
"RtBody"
,
"SigChanCon"
,
crrgen_eType_Ref
,
crrgen_eTable_Object
,
0
},
{
pwr_cClass_Io
,
"RtBody"
,
"SigChanCon"
,
crrgen_eType_Ref
,
crrgen_eTable_Object
,
0
},
{
pwr_cClass_Co
,
"RtBody"
,
"SigChanCon"
,
crrgen_eType_Ref
,
crrgen_eTable_Object
,
0
}
};
{
pwr_cClass_Co
,
"RtBody"
,
"SigChanCon"
,
crrgen_eType_Ref
,
crrgen_eTable_Object
,
0
},
{
pwr_cClass_resdi
,
"DevBody"
,
"DiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_setdi
,
"DevBody"
,
"DiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_stodi
,
"DevBody"
,
"DiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_toggledi
,
"DevBody"
,
"DiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_stopi
,
"DevBody"
,
"CoObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_cstoai
,
"DevBody"
,
"AiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_stoai
,
"DevBody"
,
"AiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_cstoii
,
"DevBody"
,
"IiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
},
{
pwr_cClass_stoii
,
"DevBody"
,
"IiObject"
,
crrgen_eType_Write
,
crrgen_eTable_SimSignal
,
0
}};
static
crrgen_tRefList
codelist
[]
=
{
{
pwr_cClass_dataarithm
,
"DevBody"
,
"Code"
,
crrgen_eType_
,
crrgen_eTable_
,
0
},
...
...
@@ -234,12 +244,15 @@ wb_crrgen::~wb_crrgen()
tree_DeleteTable
(
&
sts
,
m_signal_th
);
}
void
wb_crrgen
::
load
(
pwr_tStatus
*
rsts
)
void
wb_crrgen
::
load
(
pwr_tStatus
*
rsts
,
int
sim
)
{
pwr_tStatus
sts
;
for
(
int
i
=
0
;
i
<
int
(
sizeof
(
reflist
)
/
sizeof
(
reflist
[
0
]));
i
++
)
{
if
(
!
sim
&&
reflist
[
i
].
table
==
crrgen_eTable_SimSignal
)
continue
;
for
(
wb_object
o
=
m_sp
->
object
(
reflist
[
i
].
cid
);
o
;
o
=
o
.
next
())
{
pwr_tAttrRef
aref
;
...
...
@@ -276,6 +289,7 @@ void wb_crrgen::load( pwr_tStatus *rsts)
key
.
type
=
reflist
[
i
].
type
;
switch
(
reflist
[
i
].
table
)
{
case
crrgen_eTable_Signal
:
case
crrgen_eTable_SimSignal
:
tree_Insert
(
&
sts
,
m_signal_th
,
&
key
);
break
;
case
crrgen_eTable_Object
:
...
...
wb/lib/wb/src/wb_crrgen.h
View file @
9dc551bf
...
...
@@ -36,7 +36,7 @@ class wb_crrgen {
public:
wb_crrgen
(
wb_session
*
sp
);
~
wb_crrgen
();
void
load
(
pwr_tStatus
*
sts
);
void
load
(
pwr_tStatus
*
sts
,
int
sim
=
0
);
void
write
(
pwr_tStatus
*
sts
);
void
write_code
(
pwr_tStatus
*
rsts
);
};
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
9dc551bf
...
...
@@ -274,7 +274,8 @@ dcli_tCmdTable wnav_command_table[] = {
"/CLASS"
,
"/DEBUG"
,
"/NODECONFIG"
,
"/NAME"
,
"/IDENTITY"
,
"/FILES"
,
"/OUT"
,
"/IGNORE"
,
"/DIRECTORY"
,
"/BUILDVERSION"
,
"/DATABASE"
,
"/SERVER"
,
"/PLCPGM"
,
"/HIERARCHY"
,
"/FROM_PLCPGM"
,
"/TEMPLATE"
,
""
}
"/PLCPGM"
,
"/HIERARCHY"
,
"/FROM_PLCPGM"
,
"/TEMPLATE"
,
"/SIMULATE"
,
""
}
},
{
"NEW"
,
...
...
@@ -4003,8 +4004,11 @@ static int wnav_create_func( void *client_data,
sts
=
wnav_wccm_get_ldhsession_cb
(
wnav
,
&
wnav
->
ldhses
);
if
(
EVEN
(
sts
))
return
sts
;
int
simulate
=
ODD
(
dcli_get_qualifier
(
"/SIMULATE"
,
0
,
0
));
wb_crrgen
crrgen
(
(
wb_session
*
)
wnav
->
ldhses
);
crrgen
.
load
(
&
sts
);
crrgen
.
load
(
&
sts
,
simulate
);
crrgen
.
write
(
&
sts
);
crrgen
.
write_code
(
&
sts
);
}
...
...
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