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
89550cb6
Commit
89550cb6
authored
Sep 27, 2019
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc, embedded plc build added to rootvolume build method
parent
c2d370df
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
14 deletions
+48
-14
wb/lib/wb/src/wb_build.cpp
wb/lib/wb/src/wb_build.cpp
+5
-0
wb/lib/wb/src/wb_gcg.cpp
wb/lib/wb/src/wb_gcg.cpp
+39
-10
wb/lib/wb/src/wb_gcg.h
wb/lib/wb/src/wb_gcg.h
+2
-2
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+2
-2
No files found.
wb/lib/wb/src/wb_build.cpp
View file @
89550cb6
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
#include "wb_build.h"
#include "wb_build.h"
#include "wb_env.h"
#include "wb_env.h"
#include "wb_lfu.h"
#include "wb_lfu.h"
#include "wb_gcg.h"
#include "wb_foe.h"
#include "wb_foe.h"
#include "wb_merep.h"
#include "wb_merep.h"
#include "wb_dblock.h"
#include "wb_dblock.h"
...
@@ -704,6 +705,10 @@ void wb_build::rootvolume(pwr_tVid vid)
...
@@ -704,6 +705,10 @@ void wb_build::rootvolume(pwr_tVid vid)
if
(
!
opt
.
manual
)
{
if
(
!
opt
.
manual
)
{
// Build all plcpgm
// Build all plcpgm
m_sts
=
gcg_comp_plcembed_all
((
ldh_tSession
*
)
&
m_session
,
opt
.
force
);
if
(
evenSts
())
return
;
classlist
(
pwr_cClass_plc
);
classlist
(
pwr_cClass_plc
);
if
(
evenSts
())
if
(
evenSts
())
return
;
return
;
...
...
wb/lib/wb/src/wb_gcg.cpp
View file @
89550cb6
...
@@ -15846,11 +15846,24 @@ static int gcg_in_libhier(gcg_ctx gcgctx, pwr_tOid oid)
...
@@ -15846,11 +15846,24 @@ static int gcg_in_libhier(gcg_ctx gcgctx, pwr_tOid oid)
return
0
;
return
0
;
}
}
int
gcg_comp_plcembed_all
(
ldh_tSession
ldhses
)
int
gcg_comp_plcembed_all
(
ldh_tSession
ldhses
,
int
force
)
{
{
pwr_tAttrRef
plcint_aref
;
pwr_tAttrRef
plcint_aref
;
pwr_tOid
last_oid
=
pwr_cNOid
;
pwr_tOid
last_oid
=
pwr_cNOid
;
pwr_tStatus
sts
;
pwr_tStatus
sts
,
rsts
;
bool
write_set
=
false
;
ldh_sSessInfo
info
;
sts
=
ldh_GetSessionInfo
(
ldhses
,
&
info
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
info
.
Access
==
ldh_eAccess_ReadOnly
)
{
sts
=
ldh_SetSession
(
ldhses
,
ldh_eAccess_SharedReadWrite
);
if
(
EVEN
(
sts
))
return
sts
;
write_set
=
true
;
}
for
(
sts
=
ldh_GetClassListAttrRef
(
ldhses
,
pwr_cClass_PlcEmbed
,
&
plcint_aref
);
for
(
sts
=
ldh_GetClassListAttrRef
(
ldhses
,
pwr_cClass_PlcEmbed
,
&
plcint_aref
);
ODD
(
sts
);
sts
=
ldh_GetNextAttrRef
(
ODD
(
sts
);
sts
=
ldh_GetNextAttrRef
(
...
@@ -15858,16 +15871,28 @@ int gcg_comp_plcembed_all(ldh_tSession ldhses)
...
@@ -15858,16 +15871,28 @@ int gcg_comp_plcembed_all(ldh_tSession ldhses)
if
(
cdh_ObjidIsEqual
(
last_oid
,
plcint_aref
.
Objid
))
if
(
cdh_ObjidIsEqual
(
last_oid
,
plcint_aref
.
Objid
))
continue
;
continue
;
sts
=
gcg_comp_plcembed
(
ldhses
,
plcint_aref
.
Objid
);
rsts
=
gcg_comp_plcembed
(
ldhses
,
plcint_aref
.
Objid
,
force
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
r
sts
))
return
sts
;
break
;
last_oid
=
plcint_aref
.
Objid
;
last_oid
=
plcint_aref
.
Objid
;
}
}
if
(
write_set
)
{
sts
=
ldh_SaveSession
(
ldhses
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetSession
(
ldhses
,
ldh_eAccess_ReadOnly
);
if
(
EVEN
(
sts
))
return
sts
;
}
if
(
EVEN
(
rsts
))
return
rsts
;
return
GSX__SUCCESS
;
return
GSX__SUCCESS
;
}
}
int
gcg_comp_plcembed
(
ldh_tSession
ldhses
,
pwr_tOid
oid
)
int
gcg_comp_plcembed
(
ldh_tSession
ldhses
,
pwr_tOid
oid
,
int
force
)
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
pwr_tAttrRef
aref
;
pwr_tAttrRef
aref
;
...
@@ -16007,10 +16032,14 @@ int gcg_comp_plcembed(ldh_tSession ldhses, pwr_tOid oid)
...
@@ -16007,10 +16032,14 @@ int gcg_comp_plcembed(ldh_tSession ldhses, pwr_tOid oid)
memcpy
(
&
mod_time
,
mod_time_ptr
,
sizeof
(
mod_time
));
memcpy
(
&
mod_time
,
mod_time_ptr
,
sizeof
(
mod_time
));
free
((
char
*
)
mod_time_ptr
);
free
((
char
*
)
mod_time_ptr
);
if
(
force
)
modified
=
1
;
else
{
if
(
template_time
->
tv_sec
!=
mod_time
.
tv_sec
)
if
(
template_time
->
tv_sec
!=
mod_time
.
tv_sec
)
modified
=
1
;
modified
=
1
;
else
else
modified
=
0
;
modified
=
0
;
}
if
(
modified
)
{
if
(
modified
)
{
// Delete old window
// Delete old window
...
...
wb/lib/wb/src/wb_gcg.h
View file @
89550cb6
...
@@ -240,8 +240,8 @@ pwr_tStatus gcg_read_volume_plclist(pwr_tVolumeId volid,
...
@@ -240,8 +240,8 @@ pwr_tStatus gcg_read_volume_plclist(pwr_tVolumeId volid,
unsigned
long
*
thread_count
,
gcg_t_threadlist
**
threadlist
,
unsigned
long
*
thread_count
,
gcg_t_threadlist
**
threadlist
,
unsigned
long
*
plcproc_count
,
gcg_t_plcproclist
**
plcproclist
);
unsigned
long
*
plcproc_count
,
gcg_t_plcproclist
**
plcproclist
);
int
gcg_comp_plcembed_all
(
ldh_tSession
ldhses
);
int
gcg_comp_plcembed_all
(
ldh_tSession
ldhses
,
int
force
);
int
gcg_comp_plcembed
(
ldh_tSession
ldhses
,
pwr_tOid
oid
);
int
gcg_comp_plcembed
(
ldh_tSession
ldhses
,
pwr_tOid
oid
,
int
force
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
89550cb6
...
@@ -1840,7 +1840,7 @@ static int wnav_compile_func(void* client_data, void* client_flag)
...
@@ -1840,7 +1840,7 @@ static int wnav_compile_func(void* client_data, void* client_flag)
return
sts
;
return
sts
;
if
(
allplcpgm
)
{
if
(
allplcpgm
)
{
sts
=
gcg_comp_plcembed_all
(
wnav
->
ldhses
);
sts
=
gcg_comp_plcembed_all
(
wnav
->
ldhses
,
0
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
wnav
->
message
(
'E'
,
wnav_get_message
(
sts
));
wnav
->
message
(
'E'
,
wnav_get_message
(
sts
));
return
sts
;
return
sts
;
...
@@ -1852,7 +1852,7 @@ static int wnav_compile_func(void* client_data, void* client_flag)
...
@@ -1852,7 +1852,7 @@ static int wnav_compile_func(void* client_data, void* client_flag)
return
sts
;
return
sts
;
}
}
sts
=
gcg_comp_plcembed
(
wnav
->
ldhses
,
oid
);
sts
=
gcg_comp_plcembed
(
wnav
->
ldhses
,
oid
,
0
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
wnav
->
message
(
'E'
,
wnav_get_message
(
sts
));
wnav
->
message
(
'E'
,
wnav_get_message
(
sts
));
return
sts
;
return
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