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
2595f1a9
Commit
2595f1a9
authored
Dec 21, 2011
by
Simon Tenbusch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sequencechart]
- various bugfixes
parent
8aeaaccc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
ide/org.omnetpp.sequencechart/src/org/omnetpp/sequencechart/widgets/SequenceChart.java
.../src/org/omnetpp/sequencechart/widgets/SequenceChart.java
+6
-4
src/eventlog/sequencechartfacade.cc
src/eventlog/sequencechartfacade.cc
+15
-4
src/eventlog/sequencechartfacade.h
src/eventlog/sequencechartfacade.h
+3
-0
No files found.
ide/org.omnetpp.sequencechart/src/org/omnetpp/sequencechart/widgets/SequenceChart.java
View file @
2595f1a9
...
...
@@ -353,6 +353,7 @@ public class SequenceChart
setupListeners
();
parallelSelectionUpdater
=
new
ParallelSelectionUpdater
(
this
);
}
private
void
setupHoverSupport
()
{
...
...
@@ -2530,8 +2531,10 @@ public class SequenceChart
/*long longestEventOffset = getPixelLength(sequenceChartFacade.getLargestEventDuration());
System.out.println(longestEventOffset);
*/
long
longestEventOffset
=
0
;
//TODO: Make this work to fix error with long events getting not displayed even when they are visible.
long
[]
eventPtrRange
=
getFirstLastEventPtrForViewportRange
(
Rectangle
.
SINGLETON
.
x
-
(
extraClipping
+
longestEventOffset
),
Rectangle
.
SINGLETON
.
right
()
+
extraClipping
);
//long longestEventOffset = 0; //TODO: Make this work to fix error with long events getting not displayed even when they are visible.
//long[] eventPtrRange = getFirstLastEventPtrForViewportRange(Rectangle.SINGLETON.x - (extraClipping+longestEventOffset), Rectangle.SINGLETON.right() + extraClipping);
long
[]
eventPtrRange
=
getFirstLastEventPtrForViewportRange
(
0
,
Rectangle
.
SINGLETON
.
right
()
+
extraClipping
);
long
startEventPtr
=
eventPtrRange
[
0
];
long
endEventPtr
=
eventPtrRange
[
1
];
...
...
@@ -3986,9 +3989,8 @@ public class SequenceChart
if
(
lastEvent
!=
null
)
{
BigDecimal
endSimulationTime
;
if
(
getTimelineMode
()
==
TimelineMode
.
REAL_TIME
){
//TODO cache this
lastEvent
=
sequenceChartFacade
.
IEvent_getEvent
(
sequenceChartFacade
.
getLargestEndtimeInEventRange
(
eventLog
.
getFirstEvent
().
getCPtr
(),
eventLog
.
getLastEvent
().
getCPtr
()));
endSimulationTime
=
lastEvent
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
lastEvent
.
getEarliestProcessingTime
()/
1000000
.0
);
endSimulationTime
=
lastEvent
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
lastEvent
.
getEarliestProcessingTime
()/
1000000
);
}
else
if
(
getEventLengthMode
()
==
EventLengthMode
.
DURATION
){
endSimulationTime
=
lastEvent
==
null
?
BigDecimal
.
ZERO
:
lastEvent
.
getSimulationTime
().
toBigDecimal
().
add
(
lastEvent
.
getEventEntry
().
getDuration
().
toBigDecimal
());
}
else
{
...
...
src/eventlog/sequencechartfacade.cc
View file @
2595f1a9
...
...
@@ -42,6 +42,8 @@ SequenceChartFacade::SequenceChartFacade(IEventLog *eventLog) : EventLogFacade(e
smallestDuration
=
-
1
;
largestDuration
=
-
1
;
biggestEarliestProcessingTime
=
0
;
cachedParallelSet
.
clear
();
cachedCriticalPath
.
clear
();
}
...
...
@@ -452,9 +454,7 @@ simtime_t SequenceChartFacade::getSimulationTimeForTimelineCoordinate(double tim
{
case
REAL_TIME
:
{
simtime_t
lastEventSimulationTime
=
(
eventLog
->
getLastEvent
()
->
getEarliestStartTime
())
/
1000000.0
;
//NOTE: This sometimes crashes the Sequencechart because the returned value might be too big
simulationTime
=
max
(
BigDecimal
::
Zero
,
min
(
lastEventSimulationTime
,
(
timelineCoordinate
+
timelineCoordinateOriginRealTime
)));
simulationTime
=
max
(
BigDecimal
::
Zero
,
min
(
biggestEarliestProcessingTime
,
(
timelineCoordinate
+
timelineCoordinateOriginRealTime
)));
}
break
;
case
SIMULATION_TIME
:
...
...
@@ -976,6 +976,9 @@ void SequenceChartFacade::calculateCriticalPath() {
}
//Now produce the convex hull of critical antecessors/predecessors:
cachedCriticalPath
.
clear
();
//Cache largest processing time:
biggestEarliestProcessingTime
=
maxEarliestProcessingTime
/
1000000.0
;
biggestEarliestProcessingTimeEvent
=
maxEarliestProcessingTimeEvent
;
for
(
IEvent
*
predecessor
=
maxEarliestProcessingTimeEvent
;
predecessor
;
predecessor
=
predecessor
->
getCriticalPredecessor
())
{
cachedCriticalPath
.
insert
((
ptr_t
)
predecessor
);
if
(
predecessor
->
getEventNumber
()
==
0
)
{
...
...
@@ -983,7 +986,10 @@ void SequenceChartFacade::calculateCriticalPath() {
}
}
}
/*
* Returns the event with the largest calculated earliest Processing time in REAL_TIME mode
* or the largest endtime in other modes within the given event range.
*/
ptr_t
SequenceChartFacade
::
getLargestEndtimeInEventRange
(
ptr_t
startEventPtr
,
ptr_t
endEventPtr
)
{
IEvent
*
startEvent
=
(
IEvent
*
)
startEventPtr
;
IEvent
*
endEvent
=
(
IEvent
*
)
endEventPtr
;
...
...
@@ -991,6 +997,11 @@ ptr_t SequenceChartFacade::getLargestEndtimeInEventRange(ptr_t startEventPtr, pt
{
case
REAL_TIME
:
{
//Use cached result when range contains all events
if
(
startEvent
==
eventLog
->
getFirstEvent
()
&&
endEvent
==
eventLog
->
getLastEvent
())
{
return
(
ptr_t
)
biggestEarliestProcessingTimeEvent
;
}
long
largest
=
0
;
IEvent
*
largestEvent
=
startEvent
;
...
...
src/eventlog/sequencechartfacade.h
View file @
2595f1a9
...
...
@@ -52,6 +52,9 @@ class EVENTLOG_API SequenceChartFacade : public EventLogFacade
simtime_t
smallestDuration
;
simtime_t
largestDuration
;
simtime_t
biggestEarliestProcessingTime
;
IEvent
*
biggestEarliestProcessingTimeEvent
;
std
::
set
<
ptr_t
>
cachedParallelSet
;
IEvent
*
lastSelected
;
...
...
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