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
402ea828
Commit
402ea828
authored
Jul 05, 2017
by
Claes Sjofors
Committed by
Christoffer Ackelman
Jul 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt logging, logging of strings added
parent
6aa8bcfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
xtt/lib/xtt/src/xtt_logging.cpp
xtt/lib/xtt/src/xtt_logging.cpp
+9
-6
xtt/lib/xtt/src/xtt_logging.h
xtt/lib/xtt/src/xtt_logging.h
+1
-1
No files found.
xtt/lib/xtt/src/xtt_logging.cpp
View file @
402ea828
...
...
@@ -370,6 +370,7 @@ int XttLogging::logging_set(
case
pwr_eType_UInt32
:
case
pwr_eType_Int64
:
case
pwr_eType_UInt64
:
case
pwr_eType_String
:
case
pwr_eType_Objid
:
case
pwr_eType_AttrRef
:
case
pwr_eType_Time
:
...
...
@@ -1105,6 +1106,9 @@ static void *xtt_logproc( void *arg)
case
pwr_eType_UInt64
:
char_cnt
+=
logg
->
log_print
(
" %llu"
,
*
(
pwr_tUInt64
*
)
value_ptr
);
break
;
case
pwr_eType_String
:
char_cnt
+=
logg
->
log_print
(
" %s"
,
value_ptr
);
break
;
case
pwr_eType_Objid
:
objid
=
*
(
pwr_tObjid
*
)
value_ptr
;
if
(
!
objid
.
oix
)
...
...
@@ -1320,9 +1324,9 @@ static void *xtt_logproc( void *arg)
*
(
pwr_tUInt64
*
)
value_ptr
;
}
break
;
case
pwr_eType_
Int64
:
if
(
(
*
(
pwr_tInt64
*
)
value_ptr
!=
*
(
pwr_tInt64
*
)
old_value_ptr
)
||
first_scan
)
case
pwr_eType_
String
:
if
(
strncmp
(
value_ptr
,
old_value_ptr
,
sizeof
(
logg
->
old_value
[
0
]))
!=
0
||
first_scan
)
{
/* Value is changed, print */
time_AtoAscii
(
&
time
,
time_eFormat_DateAndTime
,
...
...
@@ -1330,9 +1334,8 @@ static void *xtt_logproc( void *arg)
logg
->
log_print
(
"%s"
,
&
time_str
);
logg
->
log_print
(
" %s"
,
&
(
logg
->
parameterstr
[
i
]));
logg
->
log_print
(
" %lld
\n
"
,
*
(
pwr_tInt64
*
)
value_ptr
);
*
(
pwr_tInt64
*
)
old_value_ptr
=
*
(
pwr_tInt64
*
)
value_ptr
;
logg
->
log_print
(
" %s
\n
"
,
value_ptr
);
strncpy
(
old_value_ptr
,
value_ptr
,
sizeof
(
logg
->
old_value
[
0
]));
}
break
;
case
pwr_eType_Objid
:
...
...
xtt/lib/xtt/src/xtt_logging.h
View file @
402ea828
...
...
@@ -81,7 +81,7 @@ class XttLogging {
float
logg_time
;
pwr_tFileName
logg_filename
;
FILE
*
logg_file
;
char
old_value
[
RTT_LOGG_MAXPAR
][
8
];
char
old_value
[
RTT_LOGG_MAXPAR
][
8
0
];
pwr_tTime
starttime
;
#if defined OS_POSIX
pthread_t
thread
;
...
...
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