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
b17a49ec
Commit
b17a49ec
authored
Jun 30, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb volume configuration support for renameing objects and local script
parent
f7c41d59
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
17 deletions
+76
-17
src/lib/co/src/co_cnf.c
src/lib/co/src/co_cnf.c
+2
-0
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
+7
-0
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
+7
-0
wb/lib/wb/src/wb_c_node.cpp
wb/lib/wb/src/wb_c_node.cpp
+60
-17
No files found.
src/lib/co/src/co_cnf.c
View file @
b17a49ec
...
@@ -55,6 +55,7 @@ char default_values[][2][200] = {
...
@@ -55,6 +55,7 @@ char default_values[][2][200] = {
{
"defaultProductionQbus"
,
"1"
},
{
"defaultProductionQbus"
,
"1"
},
{
"defaultSimulationQbus"
,
"999"
},
{
"defaultSimulationQbus"
,
"999"
},
{
"defaultNodeHierRoot"
,
"Nodes"
},
{
"defaultNodeHierRoot"
,
"Nodes"
},
{
"defaultSecurity"
,
"Security"
},
{
"defaultOpPlaces"
,
"OpPlaces"
},
{
"defaultOpPlaces"
,
"OpPlaces"
},
{
"defaultServers"
,
"Servers"
},
{
"defaultServers"
,
"Servers"
},
{
"defaultIO"
,
"IO"
},
{
"defaultIO"
,
"IO"
},
...
@@ -62,6 +63,7 @@ char default_values[][2][200] = {
...
@@ -62,6 +63,7 @@ char default_values[][2][200] = {
{
"defaultOpOp"
,
"Op"
},
{
"defaultOpOp"
,
"Op"
},
{
"defaultOpMaintenance"
,
"Maintenance"
},
{
"defaultOpMaintenance"
,
"Maintenance"
},
{
"defaultOpDefault"
,
"OpDefault"
},
{
"defaultOpDefault"
,
"OpDefault"
},
{
"defaultWebBrowser"
,
"WebBrowser"
},
};
};
...
...
wb/exp/com/src/wb_wiz_directoryvolume.pwr_com
View file @
b17a49ec
...
@@ -164,6 +164,7 @@ main()
...
@@ -164,6 +164,7 @@ main()
string oname;
string oname;
string hw;
string hw;
string os;
string os;
string localscript;
verify(0);
verify(0);
...
@@ -642,6 +643,12 @@ page_4:
...
@@ -642,6 +643,12 @@ page_4:
save/quiet
save/quiet
noedit
noedit
# Call local script
localscript = translate_filename( "$pwr_directoryvolume_setup");
if ( localscript != "")
@'localscript'
endif
found = 0;
found = 0;
for ( i = 0; i < volcnt; i++)
for ( i = 0; i < volcnt; i++)
if ( dv_vol_class[i] == 0)
if ( dv_vol_class[i] == 0)
...
...
wb/exp/com/src/wb_wiz_rootvolume.pwr_com
View file @
b17a49ec
...
@@ -77,6 +77,7 @@ main()
...
@@ -77,6 +77,7 @@ main()
string current_node;
string current_node;
string hw;
string hw;
string os;
string os;
string localscript;
verify(0);
verify(0);
...
@@ -259,6 +260,12 @@ page_4:
...
@@ -259,6 +260,12 @@ page_4:
save/quiet
save/quiet
# Call local script
localscript = translate_filename( "$pwr_rootvolume_setup");
if ( localscript != "")
@'localscript'
endif
# Build
# Build
#noedit
#noedit
#current_node = get_node_name();
#current_node = get_node_name();
...
...
wb/lib/wb/src/wb_c_node.cpp
View file @
b17a49ec
...
@@ -56,8 +56,65 @@ static pwr_tStatus PostCreate (
...
@@ -56,8 +56,65 @@ static pwr_tStatus PostCreate (
pwr_tStatus
sts
;
pwr_tStatus
sts
;
pwr_tObjName
name
;
pwr_tObjName
name
;
pwr_tOid
srv_oid
,
opp_oid
;
pwr_tOid
srv_oid
,
opp_oid
;
pwr_tBoolean
bval
;
pwr_tUInt32
ival
;
cnf_get_value
(
"defaultSecurity"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
pwr_eClass_Security
,
Object
,
ldh_eDest_IntoLast
);
ival
=
1
;
cnf_get_value
(
"defaultXttPriv"
,
name
,
sizeof
(
name
));
if
(
strcmp
(
name
,
""
)
!=
0
)
{
sts
=
sscanf
(
name
,
"%d"
,
&
ival
);
if
(
sts
==
1
)
{
sts
=
ldh_SetObjectPar
(
Session
,
oid
,
"SysBody"
,
"DefaultXttPriv"
,
(
char
*
)
&
ival
,
sizeof
(
ival
));
if
(
EVEN
(
sts
))
return
sts
;
}
}
cnf_get_value
(
"defaultWebPriv"
,
name
,
sizeof
(
name
));
if
(
strcmp
(
name
,
""
)
!=
0
)
{
sts
=
sscanf
(
name
,
"%d"
,
&
ival
);
if
(
sts
==
1
)
{
sts
=
ldh_SetObjectPar
(
Session
,
oid
,
"SysBody"
,
"DefaultWebPriv"
,
(
char
*
)
&
ival
,
sizeof
(
ival
));
if
(
EVEN
(
sts
))
return
sts
;
}
}
cnf_get_value
(
"defaultWebSystemGroup"
,
name
,
sizeof
(
name
));
if
(
strcmp
(
name
,
""
)
!=
0
)
{
sts
=
ldh_SetObjectPar
(
Session
,
oid
,
"SysBody"
,
"WebSystemGroup"
,
(
char
*
)
name
,
sizeof
(
name
));
if
(
EVEN
(
sts
))
return
sts
;
}
// OpPlace objects
cnf_get_value
(
"defaultOpPlaces"
,
name
,
sizeof
(
name
));
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"$NodeHier"
);
sts
=
ldh_CreateObject
(
Session
,
&
opp_oid
,
name
,
cid
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"Security"
,
pwr_eClass_Security
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"OpPlace"
);
cnf_get_value
(
"defaultOpOp"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
cnf_get_value
(
"defaultOpMaintenance"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
cnf_get_value
(
"defaultOpSystemManager"
,
name
,
sizeof
(
name
));
if
(
strcmp
(
name
,
""
)
!=
0
)
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
cnf_get_value
(
"defaultOpDefault"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
bval
=
1
;
sts
=
ldh_SetObjectPar
(
Session
,
oid
,
"RtBody"
,
"IsDefaultOp"
,
(
char
*
)
&
bval
,
sizeof
(
bval
));
if
(
EVEN
(
sts
))
return
sts
;
cnf_get_value
(
"defaultWebBrowser"
,
name
,
sizeof
(
name
));
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"WebBrowserConfig"
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"$NodeHier"
);
cnf_get_value
(
"defaultGraphHier"
,
name
,
sizeof
(
name
));
if
(
strcmp
(
name
,
""
)
!=
0
)
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
// Server objects
// Server objects
cnf_get_value
(
"defaultServers"
,
name
,
sizeof
(
name
));
cnf_get_value
(
"defaultServers"
,
name
,
sizeof
(
name
));
...
@@ -76,28 +133,14 @@ static pwr_tStatus PostCreate (
...
@@ -76,28 +133,14 @@ static pwr_tStatus PostCreate (
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"StatusServerConfig"
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"StatusServerConfig"
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"StatusServer"
,
cid
,
srv_oid
,
ldh_eDest_IntoLast
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"StatusServer"
,
cid
,
srv_oid
,
ldh_eDest_IntoLast
);
// OpPlace objects
// Plc process
cnf_get_value
(
"defaultOpPlaces"
,
name
,
sizeof
(
name
));
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"$NodeHier"
);
sts
=
ldh_CreateObject
(
Session
,
&
opp_oid
,
name
,
cid
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"OpPlace"
);
cnf_get_value
(
"defaultOpOp"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
cnf_get_value
(
"defaultOpMaintenance"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
cnf_get_value
(
"defaultOpDefault"
,
name
,
sizeof
(
name
));
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
name
,
cid
,
opp_oid
,
ldh_eDest_IntoLast
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"PlcProcess"
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"PlcProcess"
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"Plc"
,
cid
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"Plc"
,
cid
,
Object
,
ldh_eDest_IntoLast
);
// Web handler
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"WebHandler"
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"WebHandler"
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"WebHandler"
,
cid
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"WebHandler"
,
cid
,
Object
,
ldh_eDest_IntoLast
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"WebBrowserConfig"
);
sts
=
ldh_CreateObject
(
Session
,
&
oid
,
"WebBrowser"
,
cid
,
Object
,
ldh_eDest_IntoLast
);
// IO
// IO
cnf_get_value
(
"defaultIO"
,
name
,
sizeof
(
name
));
cnf_get_value
(
"defaultIO"
,
name
,
sizeof
(
name
));
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"$NodeHier"
);
sts
=
ldh_ClassNameToId
(
Session
,
&
cid
,
"$NodeHier"
);
...
...
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