Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
5ef517b8
Commit
5ef517b8
authored
Jan 10, 2017
by
Caitlin Ross
Browse files
assigning specific numbers to model-net-base-lp event types for tracing
parent
227b7a0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/model-net-lp.c
View file @
5ef517b8
...
...
@@ -119,7 +119,26 @@ tw_lptype model_net_base_lp = {
*/
void
mn_event_collect
(
model_net_wrap_msg
*
m
,
tw_lp
*
lp
,
char
*
buffer
)
{
int
type
=
(
int
)
m
->
h
.
event_type
;
// assigning large numbers to message types to make it easier to
// determine which messages are model net base LP msgs
int
type
;
switch
(
m
->
h
.
event_type
){
case
MN_BASE_NEW_MSG
:
type
=
9000
;
break
;
case
MN_BASE_SCHED_NEXT
:
type
=
9001
;
break
;
case
MN_BASE_SAMPLE
:
type
=
9002
;
break
;
case
MN_BASE_PASS
:
type
=
9003
;
break
;
default:
type
=
9004
;
break
;
}
memcpy
(
buffer
,
&
type
,
sizeof
(
type
));
}
...
...
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