Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
X-Lap
Commits
b7d5f55c
Commit
b7d5f55c
authored
Nov 06, 2017
by
Andreas Schmidt
Browse files
Timestamping scratch row is now ignored.
parent
acdb88b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
xlap.c
View file @
b7d5f55c
...
...
@@ -24,7 +24,8 @@ static inline unsigned long long timestampByTime(struct timespec *ts)
void
XlapTimestampTableDump
(
FILE
*
out
,
XlapTimestampPacketKind
kind
,
XlapTimestampTable
*
table
)
{
# define OUT(id) fprintf(out, ",%llu,%llu", timestampByTime(&table->rows[row].time[ts_##id].actual.t), (unsigned long long) table->rows[row].time[ts_##id].actual.c);
for
(
unsigned
int
row
=
0
;
row
<
TS_ROWS
;
row
++
)
{
// Start at 1 to remove the scratch row 0 from output.
for
(
unsigned
int
row
=
1
;
row
<
TS_ROWS
;
row
++
)
{
fprintf
(
out
,
"%u,%u"
,
row
,
(
unsigned
)
kind
);
PP_foreach
(
PP_join_space
,
OUT
,
TIMESTAMP_ID_LIST
)
fprintf
(
out
,
"
\n
"
);
...
...
xlap/parse.py
View file @
b7d5f55c
...
...
@@ -18,9 +18,8 @@ def _extract_stamps_by_src_and_kind(all_stamps, src, kind=None):
return
[
x
+
"_T"
for
x
in
columns
]
+
[
x
+
"_C"
for
x
in
columns
]
def
_evaluate_file
(
file_name
,
stamps
,
kind
,
sender
=
False
):
# Remove first line, as this is the dummy line for intermittently storing data.
df
=
pd
.
read_csv
(
file_name
)[
1
:]
def
_evaluate_file
(
file_name
,
stamps
,
kind
,
measured_column
,
sender
=
False
):
df
=
pd
.
read_csv
(
file_name
)
df
=
df
[
df
[
"Kind"
]
==
kind
].
drop
([
"Kind"
],
axis
=
1
).
set_index
(
"SeqNo"
)
...
...
Write
Preview
Supports
Markdown
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