Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Merge requests
!297
Ahmeda
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Ahmeda
ahmeda
into
master
Overview
0
Commits
17
Pipelines
0
Changes
8
Closed
Ludovic Apvrille
requested to merge
ahmeda
into
master
5 years ago
Overview
0
Commits
17
Pipelines
0
Changes
8
Expand
0
0
Merge request reports
Viewing commit
f4641c2c
Prev
Next
Show latest version
8 files
+
2486
−
2477
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
f4641c2c
Model 10/01
· f4641c2c
Abbe AHMED-KHALIFA
authored
5 years ago
executablecode/generated_src/Color.c
0 → 100644
+
76
−
0
Options
#include
"Color.h"
// Header code defined in the model
int
__userImplemented__Color__checkColor
(){
return
measure_color
();
}
// End of header code defined in the model
#define STATE__START__STATE 0
#define STATE__WAIT_FOR_READY 1
#define STATE__STOP__STATE 2
int
Color__checkColor
()
{
traceFunctionCall
(
"Color"
,
"checkColor"
,
"-"
);
return
__userImplemented__Color__checkColor
();
}
void
Color__waitt
(
int
distance
,
int
speed
,
int
factor
)
{
char
my__attr
[
CHAR_ALLOC_SIZE
];
sprintf
(
my__attr
,
"%d,%d,%d"
,
distance
,
speed
,
factor
);
traceFunctionCall
(
"Color"
,
"waitt"
,
my__attr
);
}
void
*
mainFunc__Color
(
void
*
arg
){
int
color
=
0
;
int
__currentState
=
STATE__START__STATE
;
__attribute__
((
unused
))
request
__req0
;
__attribute__
((
unused
))
int
*
__params0
[
1
];
__attribute__
((
unused
))
setOfRequests
__list
;
__attribute__
((
unused
))
pthread_cond_t
__myCond
;
__attribute__
((
unused
))
request
*
__returnRequest
;
char
*
__myname
=
(
char
*
)
arg
;
pthread_cond_init
(
&
__myCond
,
NULL
);
fillListOfRequests
(
&
__list
,
__myname
,
&
__myCond
,
&
__mainMutex
);
//printf("my name = %s\n", __myname);
/* Main loop on states */
while
(
__currentState
!=
STATE__STOP__STATE
)
{
switch
(
__currentState
)
{
case
STATE__START__STATE
:
traceStateEntering
(
__myname
,
"__StartState"
);
__currentState
=
STATE__WAIT_FOR_READY
;
break
;
case
STATE__WAIT_FOR_READY
:
traceStateEntering
(
__myname
,
"WAIT_FOR_READY"
);
makeNewRequest
(
&
__req0
,
13508
,
RECEIVE_SYNC_REQUEST
,
0
,
0
,
0
,
0
,
__params0
);
__req0
.
syncChannel
=
&
__Color_ready_to_receive__Data_Collector_ready_to_receive_color
;
__returnRequest
=
executeOneRequest
(
&
__list
,
&
__req0
);
clearListOfRequests
(
&
__list
);
traceRequest
(
__myname
,
__returnRequest
);
color
=
Color__checkColor
();
traceVariableModification
(
"Color"
,
"color"
,
color
,
0
);
__params0
[
0
]
=
&
color
;
makeNewRequest
(
&
__req0
,
13509
,
SEND_SYNC_REQUEST
,
0
,
0
,
0
,
1
,
__params0
);
__req0
.
syncChannel
=
&
__Color_sendColor__Data_Collector_receive_color
;
__returnRequest
=
executeOneRequest
(
&
__list
,
&
__req0
);
clearListOfRequests
(
&
__list
);
traceRequest
(
__myname
,
__returnRequest
);
__currentState
=
STATE__WAIT_FOR_READY
;
break
;
}
}
//printf("Exiting = %s\n", __myname);
return
NULL
;
}
Loading