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
59e12976
Commit
59e12976
authored
Oct 06, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wtt command 'distribute /file' to copy a specific package added
parent
2fd78f4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
13 deletions
+43
-13
src/doc/man/en_us/man_dg.dat
src/doc/man/en_us/man_dg.dat
+4
-2
src/doc/man/sv_se/man_dg.dat
src/doc/man/sv_se/man_dg.dat
+2
-1
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+37
-10
No files found.
src/doc/man/en_us/man_dg.dat
View file @
59e12976
...
@@ -9300,10 +9300,12 @@ Distribute files to operator or process station.
...
@@ -9300,10 +9300,12 @@ Distribute files to operator or process station.
Creates a distribution package, copies the package to
Creates a distribution package, copies the package to
the station and unpacks the package.
the station and unpacks the package.
<B>wtt> distribute /node= [/package]
<B>wtt> distribute /node= [/package]
[/file=]
/node <t>Node to distribute to.
/node <t>Node to distribute to.
/package <t>Only create package. The packaged is created but not copied.
/package <t>Only create package. The package is created but not copied.
/file <t>Package file name. Copies an existing package without creating a
<t>new package.
</TOPIC>
</TOPIC>
...
...
src/doc/man/sv_se/man_dg.dat
View file @
59e12976
...
@@ -9183,10 +9183,11 @@ Distribuerar filer till operat
...
@@ -9183,10 +9183,11 @@ Distribuerar filer till operat
Skapar ett distributions paket, kopierar paketet till
Skapar ett distributions paket, kopierar paketet till
stationen och packar upp det.
stationen och packar upp det.
<B>wtt> distribute /node= [/package]
<B>wtt> distribute /node= [/package]
[/file=]
/node <t>Nod att distribuera till.
/node <t>Nod att distribuera till.
/package <t>Skapar enbar ett paket. Paketet skapas men kopieras inte.
/package <t>Skapar enbar ett paket. Paketet skapas men kopieras inte.
/file <t>Namn på paket. Kopierar angivet paket utan att skapa ett nytt.
</TOPIC>
</TOPIC>
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
59e12976
...
@@ -444,7 +444,7 @@ dcli_tCmdTable wnav_command_table[] = {
...
@@ -444,7 +444,7 @@ dcli_tCmdTable wnav_command_table[] = {
{
{
"DISTRIBUTE"
,
"DISTRIBUTE"
,
&
wnav_distribute_func
,
&
wnav_distribute_func
,
{
"/NODE"
,
"/PACKAGE"
,
""
}
{
"/NODE"
,
"/PACKAGE"
,
"
/FILE"
,
"
"
}
},
},
{
{
"RELEASE"
,
"RELEASE"
,
...
@@ -5003,8 +5003,10 @@ static int wnav_distribute_func( void *client_data,
...
@@ -5003,8 +5003,10 @@ static int wnav_distribute_func( void *client_data,
int
sts
;
int
sts
;
char
*
node_ptr
;
char
*
node_ptr
;
char
node_str
[
80
];
char
node_str
[
80
];
pwr_tFileName
file_str
,
file
;
int
package
;
int
package
;
bool
distribute
;
bool
distribute
;
char
*
s
;
if
(
ODD
(
dcli_get_qualifier
(
"/NODE"
,
node_str
,
sizeof
(
node_str
))))
if
(
ODD
(
dcli_get_qualifier
(
"/NODE"
,
node_str
,
sizeof
(
node_str
))))
node_ptr
=
node_str
;
node_ptr
=
node_str
;
...
@@ -5014,17 +5016,42 @@ static int wnav_distribute_func( void *client_data,
...
@@ -5014,17 +5016,42 @@ static int wnav_distribute_func( void *client_data,
package
=
ODD
(
dcli_get_qualifier
(
"/PACKAGE"
,
0
,
0
));
package
=
ODD
(
dcli_get_qualifier
(
"/PACKAGE"
,
0
,
0
));
distribute
=
package
?
false
:
true
;
distribute
=
package
?
false
:
true
;
sts
=
WNAV__SUCCESS
;
if
(
ODD
(
dcli_get_qualifier
(
"/FILE"
,
file_str
,
sizeof
(
file_str
))))
{
try
{
if
(
!
node_ptr
)
{
wb_pkg
*
pkg
=
new
wb_pkg
(
node_ptr
,
distribute
);
wnav
->
message
(
'E'
,
"Syntax error, node is missing"
);
delete
pkg
;
return
WNAV__SYNTAX
;
}
if
(
(
s
=
strchr
(
file_str
,
'/'
))
!=
0
)
strncpy
(
file
,
s
+
1
,
sizeof
(
file
));
else
strncpy
(
file
,
file_str
,
sizeof
(
file
));
sts
=
WNAV__SUCCESS
;
try
{
wb_pkg
*
pkg
=
new
wb_pkg
(
node_ptr
,
false
,
false
);
pkg
->
copyPackage
(
file
);
delete
pkg
;
}
catch
(
wb_error
&
e
)
{
wnav
->
message
(
' '
,
(
char
*
)
e
.
what
().
c_str
());
sts
=
e
.
sts
();
}
if
(
EVEN
(
sts
))
return
sts
;
}
}
catch
(
wb_error
&
e
)
{
else
{
wnav
->
message
(
' '
,
(
char
*
)
e
.
what
().
c_str
());
sts
=
WNAV__SUCCESS
;
sts
=
e
.
sts
();
try
{
wb_pkg
*
pkg
=
new
wb_pkg
(
node_ptr
,
distribute
);
delete
pkg
;
}
catch
(
wb_error
&
e
)
{
wnav
->
message
(
' '
,
(
char
*
)
e
.
what
().
c_str
());
sts
=
e
.
sts
();
}
if
(
EVEN
(
sts
))
return
sts
;
}
}
if
(
EVEN
(
sts
))
return
sts
;
return
1
;
return
1
;
}
}
...
...
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