Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
Horizon Simulation Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
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
redmine-legacy
Horizon Simulation Framework
Commits
17a06e54
Commit
17a06e54
authored
Jan 18, 2012
by
Simon Tenbusch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sequencechart]
- implemented the overlapping indication now also for the REAL TIME domain
parent
5e706c5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
6 deletions
+44
-6
ide/org.omnetpp.sequencechart/src/org/omnetpp/sequencechart/widgets/SequenceChart.java
.../src/org/omnetpp/sequencechart/widgets/SequenceChart.java
+31
-4
src/eventlog/sequencechartfacade.cc
src/eventlog/sequencechartfacade.cc
+8
-2
src/eventlog/sequencechartfacade.h
src/eventlog/sequencechartfacade.h
+5
-0
No files found.
ide/org.omnetpp.sequencechart/src/org/omnetpp/sequencechart/widgets/SequenceChart.java
View file @
17a06e54
...
...
@@ -2985,14 +2985,41 @@ public class SequenceChart
}
else
{
//showEventOverlapping:
graphics
.
setForegroundColor
(
EVENT_BORDER_COLOR
);
if
(
isParallelWithSelection
(
eventPtr
))
{
graphics
.
setBackgroundColor
(
OVERLAPPING_EVENT_BACKGROUND_COLOR
);
}
else
{
graphics
.
setBackgroundColor
(
NON_OVERLAPPING_EVENT_BACKGROUND_COLOR
);
switch
(
getTimelineMode
())
{
case
REAL_TIME:
if
(
isOverlappingRealTimeWithSelection
(
eventPtr
))
{
graphics
.
setBackgroundColor
(
OVERLAPPING_EVENT_BACKGROUND_COLOR
);
}
else
{
graphics
.
setBackgroundColor
(
NON_OVERLAPPING_EVENT_BACKGROUND_COLOR
);
}
break
;
default
:
if
(
isParallelWithSelection
(
eventPtr
))
{
graphics
.
setBackgroundColor
(
OVERLAPPING_EVENT_BACKGROUND_COLOR
);
}
else
{
graphics
.
setBackgroundColor
(
NON_OVERLAPPING_EVENT_BACKGROUND_COLOR
);
}
}
}
}
private
boolean
isOverlappingRealTimeWithSelection
(
long
eventPtr
)
{
if
(
selectionEventNumbers
.
isEmpty
())
{
return
false
;
}
IEvent
selected
=
eventLog
.
getEventForEventNumber
(
selectionEventNumbers
.
get
(
0
));
if
(
selected
.
getEventNumber
()==
0
)
{
return
false
;
//Exclude Event 0 (management event)
}
if
(
isLegacyTrace
())
{
return
false
;
//Legacy: no duration
}
return
sequenceChartFacade
.
isOverlappingInRealTimeDomain
(
eventPtr
,
selected
.
getCPtr
());
}
/**
* Draws a single event at the given coordinates and axis module.
*/
...
...
src/eventlog/sequencechartfacade.cc
View file @
17a06e54
...
...
@@ -1099,7 +1099,6 @@ double SequenceChartFacade::getOverlapping(ptr_t eventPtr) {
overlapping
+=
event
->
getComplexity
();
}
}
printf
(
"overlapping %i %f %i %i
\n
"
,
overlapping
,
overlapping
/
(
event
->
getComplexity
()
*
1.0
),
event
->
getComplexity
(),
event
->
getEventNumber
());
return
overlapping
/
(
event
->
getComplexity
()
*
1.0
);
}
...
...
@@ -1114,7 +1113,6 @@ double SequenceChartFacade::getMaximumOverlapping() {
maxOverlapping
=
overlapping
;
}
}
printf
(
"maxoverlapping %i
\n
"
,
maxOverlapping
);
return
maxOverlapping
;
}
...
...
@@ -1137,3 +1135,11 @@ double SequenceChartFacade::getOverlappingQuotient(ptr_t eventPtr) {
return
overlapping
/
maximumOverlapping
;
}
bool
SequenceChartFacade
::
isOverlappingInRealTimeDomain
(
ptr_t
eventPtr1
,
ptr_t
eventPtr2
)
{
long
eventProcessingTime1
=
((
IEvent
*
)
eventPtr1
)
->
getEarliestProcessingTime
();
long
eventStartTime1
=
((
IEvent
*
)
eventPtr1
)
->
getEarliestStartTime
();
long
eventProcessingTime2
=
((
IEvent
*
)
eventPtr2
)
->
getEarliestProcessingTime
();
long
eventStartTime2
=
((
IEvent
*
)
eventPtr2
)
->
getEarliestStartTime
();
return
!
(
eventProcessingTime1
<
eventStartTime2
||
eventProcessingTime2
<
eventStartTime1
);
}
src/eventlog/sequencechartfacade.h
View file @
17a06e54
...
...
@@ -119,6 +119,11 @@ class EVENTLOG_API SequenceChartFacade : public EventLogFacade
double
getOverlappingQuotient
(
ptr_t
eventPtr
);
/*
* returns true when the events overlap in the REAL_TIME domain (i.e. are executed on two cpus in parallel)
*/
bool
isOverlappingInRealTimeDomain
(
ptr_t
eventPtr1
,
ptr_t
eventPtr2
);
/*
* Returns whether an event not part of a set of parallel events with more than treshold elements.
...
...
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