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
1f5336b1
Commit
1f5336b1
authored
Mar 31, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_report, template tag <export> added btime, atime and object
parent
88e7565d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
4 deletions
+48
-4
src/exe/rt_report/src/rt_report.cpp
src/exe/rt_report/src/rt_report.cpp
+48
-4
No files found.
src/exe/rt_report/src/rt_report.cpp
View file @
1f5336b1
...
@@ -940,7 +940,7 @@ void rt_report::format_cmd( char *cmd, int cmd_size,
...
@@ -940,7 +940,7 @@ void rt_report::format_cmd( char *cmd, int cmd_size,
int
rt_report
::
parse
(
char
*
line
)
int
rt_report
::
parse
(
char
*
line
)
{
{
char
line_array
[
5
][
80
];
char
line_array
[
7
][
80
];
int
num
;
int
num
;
char
aline
[
200
];
char
aline
[
200
];
char
rline
[
200
];
char
rline
[
200
];
...
@@ -958,18 +958,62 @@ int rt_report::parse( char *line)
...
@@ -958,18 +958,62 @@ int rt_report::parse( char *line)
pwr_tFileName
fname
;
pwr_tFileName
fname
;
pwr_tFileName
tmpfile
=
"$pwrp_lis/report_print.rtt_com"
;
pwr_tFileName
tmpfile
=
"$pwrp_lis/report_print.rtt_com"
;
pwr_tCmd
cmd
;
pwr_tCmd
cmd
;
int
sts
;
float
btime
=
2
;
float
atime
=
0
;
pwr_tAName
object_str
=
""
;
char
graph_str
[
80
]
=
""
;
pwr_tFileName
image_str
=
""
;
int
argcnt
;
if
(
num
<
4
)
if
(
num
<
4
)
return
0
;
return
0
;
argcnt
=
0
;
for
(
int
i
=
2
;
i
<
num
;
i
++
)
{
if
(
cdh_NoCaseStrncmp
(
line_array
[
i
],
"btime="
,
6
)
==
0
)
{
sts
=
sscanf
(
&
line_array
[
i
][
6
],
"%f"
,
&
btime
);
if
(
sts
!=
1
)
btime
=
2
;
}
else
if
(
cdh_NoCaseStrncmp
(
line_array
[
i
],
"atime="
,
6
)
==
0
)
{
sts
=
sscanf
(
&
line_array
[
i
][
6
],
"%f"
,
&
atime
);
if
(
sts
!=
1
)
atime
=
2
;
}
else
if
(
cdh_NoCaseStrncmp
(
line_array
[
i
],
"object="
,
6
)
==
0
)
{
strncpy
(
object_str
,
line_array
[
i
],
sizeof
(
object_str
));
argcnt
++
;
// Replaces graph
}
else
{
if
(
argcnt
==
0
)
strncpy
(
graph_str
,
line_array
[
i
],
sizeof
(
graph_str
));
else
if
(
argcnt
==
1
)
strncpy
(
image_str
,
line_array
[
i
],
sizeof
(
image_str
));
argcnt
++
;
}
}
dcli_translate_filename
(
fname
,
tmpfile
);
dcli_translate_filename
(
fname
,
tmpfile
);
fout
.
open
(
fname
);
fout
.
open
(
fname
);
if
(
!
fout
)
if
(
!
fout
)
return
0
;
return
0
;
fout
<<
"open graph "
<<
line_array
[
2
]
<<
endl
;
// Should be with /hide but it sometimes doesn't work...
fout
<<
"main()"
<<
endl
;
fout
<<
"wait 2 "
<<
endl
;
if
(
strcmp
(
graph_str
,
""
)
==
0
)
fout
<<
"export graph /graph="
<<
line_array
[
2
]
<<
" /file=
\"
"
<<
line_array
[
3
]
<<
"
\"
"
<<
endl
;
fout
<<
" open graph /"
<<
object_str
<<
endl
;
// Should be with /hide but it sometimes doesn't work...
else
fout
<<
" open graph "
<<
graph_str
<<
endl
;
if
(
btime
!=
0
)
fout
<<
" wait "
<<
btime
<<
endl
;
if
(
strcmp
(
graph_str
,
""
)
==
0
)
fout
<<
" export graph /"
<<
object_str
<<
" /file=
\"
"
<<
line_array
[
3
]
<<
"
\"
"
<<
endl
;
else
fout
<<
" export graph /graph="
<<
graph_str
<<
" /file=
\"
"
<<
image_str
<<
"
\"
"
<<
endl
;
if
(
atime
!=
0
)
fout
<<
" wait "
<<
atime
<<
endl
;
fout
<<
"endmain"
<<
endl
;
fout
.
close
();
strcpy
(
cmd
,
"rt_xtt_cmd "
);
strcpy
(
cmd
,
"rt_xtt_cmd "
);
if
(
strcmp
(
display
,
""
)
!=
0
)
{
if
(
strcmp
(
display
,
""
)
!=
0
)
{
...
...
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