Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tommy Olofsson
LabComm
Commits
64e5e381
Commit
64e5e381
authored
10 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
experimental sigparser
parent
3ca451b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/c/experimental/labcomm_sig_parser.c
+7
-0
7 additions, 0 deletions
lib/c/experimental/labcomm_sig_parser.c
with
7 additions
and
0 deletions
lib/c/experimental/labcomm_sig_parser.c
+
7
−
0
View file @
64e5e381
...
@@ -401,11 +401,13 @@ int accept_packet(labcomm_sig_parser_t *d) {
...
@@ -401,11 +401,13 @@ int accept_packet(labcomm_sig_parser_t *d) {
advancen
(
d
,
nbytes
);
advancen
(
d
,
nbytes
);
d
->
current_decl_is_varsize
=
FALSE
;
// <-- a conveniance flag in labcomm_sig_parser_t
d
->
current_decl_is_varsize
=
FALSE
;
// <-- a conveniance flag in labcomm_sig_parser_t
VERBOSE_PRINTF
(
"type_decl "
);
VERBOSE_PRINTF
(
"type_decl "
);
get_varint
(
d
);
//ignore length field
accept_signature
(
d
);
accept_signature
(
d
);
}
else
if
(
type
==
SAMPLE_DECL
)
{
}
else
if
(
type
==
SAMPLE_DECL
)
{
d
->
current_decl_is_varsize
=
FALSE
;
// <-- a conveniance flag in labcomm_sig_parser_t
d
->
current_decl_is_varsize
=
FALSE
;
// <-- a conveniance flag in labcomm_sig_parser_t
advancen
(
d
,
nbytes
);
advancen
(
d
,
nbytes
);
VERBOSE_PRINTF
(
"sample_decl "
);
VERBOSE_PRINTF
(
"sample_decl "
);
get_varint
(
d
);
//ignore length field
accept_signature
(
d
);
accept_signature
(
d
);
}
else
if
(
type
>=
LABCOMM_USER
)
{
}
else
if
(
type
>=
LABCOMM_USER
)
{
#ifdef EXIT_WHEN_RECEIVING_DATA
#ifdef EXIT_WHEN_RECEIVING_DATA
...
@@ -603,14 +605,19 @@ static int accept_sample_data(labcomm_sig_parser_t *d){
...
@@ -603,14 +605,19 @@ static int accept_sample_data(labcomm_sig_parser_t *d){
accept_user_id
(
d
);
accept_user_id
(
d
);
unsigned
int
uid
=
pop_val
(
d
);
unsigned
int
uid
=
pop_val
(
d
);
printf
(
"sample data... uid=0x%x
\n
"
,
uid
);
printf
(
"sample data... uid=0x%x
\n
"
,
uid
);
int
len
=
get_varint
(
d
);
//length field
#ifdef DEBUG
#ifdef DEBUG
dump_signature
(
d
,
uid
);
dump_signature
(
d
,
uid
);
#endif
#endif
#ifdef SKIP_BY_PARSING
labcomm_signature_t
*
sigt
=
get_sig_t
(
d
,
uid
);
labcomm_signature_t
*
sigt
=
get_sig_t
(
d
,
uid
);
int
encoded_size
=
sigt
->
encoded_size
(
sigt
,
NULL
);
int
encoded_size
=
sigt
->
encoded_size
(
sigt
,
NULL
);
INFO_PRINTF
(
"encoded_size from sig: %d
\n
"
,
encoded_size
);
INFO_PRINTF
(
"encoded_size from sig: %d
\n
"
,
encoded_size
);
labcomm_signature_t
*
sig
=
get_sig_t
(
d
,
uid
);
labcomm_signature_t
*
sig
=
get_sig_t
(
d
,
uid
);
skip_packed_sample_data
(
d
,
sig
);
skip_packed_sample_data
(
d
,
sig
);
#else
advancen
(
d
,
len
);
#endif
return
TRUE
;
return
TRUE
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment