roby 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -5
- data/Manifest.txt +91 -16
- data/README.txt +24 -24
- data/Rakefile +92 -64
- data/app/config/app.yml +42 -43
- data/app/config/init.rb +26 -0
- data/benchmark/alloc_misc.rb +123 -0
- data/benchmark/discovery_latency.rb +67 -0
- data/benchmark/garbage_collection.rb +48 -0
- data/benchmark/genom.rb +31 -0
- data/benchmark/transactions.rb +62 -0
- data/bin/roby +1 -1
- data/bin/roby-log +16 -6
- data/doc/guide/.gitignore +2 -0
- data/doc/guide/config.yaml +34 -0
- data/doc/guide/ext/init.rb +14 -0
- data/doc/guide/ext/previous_next.rb +40 -0
- data/doc/guide/ext/rdoc_links.rb +33 -0
- data/doc/guide/index.rdoc +16 -0
- data/doc/guide/overview.rdoc +62 -0
- data/doc/guide/plan_modifications.rdoc +67 -0
- data/doc/guide/src/abstraction/achieve_with.page +8 -0
- data/doc/guide/src/abstraction/forwarding.page +8 -0
- data/doc/guide/src/abstraction/hierarchy.page +19 -0
- data/doc/guide/src/abstraction/index.page +28 -0
- data/doc/guide/src/abstraction/task_models.page +13 -0
- data/doc/guide/src/basics.template +6 -0
- data/doc/guide/src/basics/app.page +139 -0
- data/doc/guide/src/basics/code_examples.page +33 -0
- data/doc/guide/src/basics/dry.page +69 -0
- data/doc/guide/src/basics/errors.page +443 -0
- data/doc/guide/src/basics/events.page +179 -0
- data/doc/guide/src/basics/hierarchy.page +275 -0
- data/doc/guide/src/basics/index.page +11 -0
- data/doc/guide/src/basics/log_replay/goForward_1.png +0 -0
- data/doc/guide/src/basics/log_replay/goForward_2.png +0 -0
- data/doc/guide/src/basics/log_replay/goForward_3.png +0 -0
- data/doc/guide/src/basics/log_replay/goForward_4.png +0 -0
- data/doc/guide/src/basics/log_replay/goForward_5.png +0 -0
- data/doc/guide/src/basics/log_replay/hierarchy_error_1.png +0 -0
- data/doc/guide/src/basics/log_replay/hierarchy_error_2.png +0 -0
- data/doc/guide/src/basics/log_replay/hierarchy_error_3.png +0 -0
- data/doc/guide/src/basics/log_replay/plan_repair_1.png +0 -0
- data/doc/guide/src/basics/log_replay/plan_repair_2.png +0 -0
- data/doc/guide/src/basics/log_replay/plan_repair_3.png +0 -0
- data/doc/guide/src/basics/log_replay/plan_repair_4.png +0 -0
- data/doc/guide/src/basics/log_replay/roby_log_main_window.png +0 -0
- data/doc/guide/src/basics/log_replay/roby_log_relation_window.png +0 -0
- data/doc/guide/src/basics/log_replay/roby_replay_event_representation.png +0 -0
- data/doc/guide/src/basics/plan_objects.page +71 -0
- data/doc/guide/src/basics/relations_display.page +203 -0
- data/doc/guide/src/basics/roby_cycle_overview.png +0 -0
- data/doc/guide/src/basics/shell.page +102 -0
- data/doc/guide/src/basics/summary.page +32 -0
- data/doc/guide/src/basics/tasks.page +357 -0
- data/doc/guide/src/basics_shell_header.txt +16 -0
- data/doc/guide/src/cycle/cycle-overview.png +0 -0
- data/doc/guide/src/cycle/cycle-overview.svg +208 -0
- data/doc/guide/src/cycle/error_handling.page +168 -0
- data/doc/guide/src/cycle/error_instantaneous_repair.png +0 -0
- data/doc/guide/src/cycle/error_instantaneous_repair.svg +1224 -0
- data/doc/guide/src/cycle/garbage_collection.page +10 -0
- data/doc/guide/src/cycle/index.page +23 -0
- data/doc/guide/src/cycle/propagation.page +154 -0
- data/doc/guide/src/cycle/propagation_diamond.png +0 -0
- data/doc/guide/src/cycle/propagation_diamond.svg +1279 -0
- data/doc/guide/src/default.css +319 -0
- data/doc/guide/src/default.template +74 -0
- data/doc/guide/src/htmldoc.metainfo +20 -0
- data/doc/guide/src/htmldoc.virtual +18 -0
- data/doc/guide/src/images/bodybg.png +0 -0
- data/doc/guide/src/images/contbg.png +0 -0
- data/doc/guide/src/images/footerbg.png +0 -0
- data/doc/guide/src/images/gradient1.png +0 -0
- data/doc/guide/src/images/gradient2.png +0 -0
- data/doc/guide/src/index.page +7 -0
- data/doc/guide/src/introduction/index.page +29 -0
- data/doc/guide/src/introduction/install.page +133 -0
- data/doc/{papers.rdoc → guide/src/introduction/publications.page} +5 -2
- data/doc/{videos.rdoc → guide/src/introduction/videos.page} +4 -2
- data/doc/guide/src/plugins/fault_tolerance.page +44 -0
- data/doc/guide/src/plugins/index.page +11 -0
- data/doc/guide/src/plugins/subsystems.page +45 -0
- data/doc/guide/src/relations/dependency.page +89 -0
- data/doc/guide/src/relations/index.page +12 -0
- data/doc/misc/update_github +24 -0
- data/doc/tutorials/02-GoForward.rdoc +3 -3
- data/ext/graph/graph.cc +46 -0
- data/lib/roby.rb +57 -22
- data/lib/roby/app.rb +132 -112
- data/lib/roby/app/plugins/rake.rb +21 -0
- data/lib/roby/app/rake.rb +0 -7
- data/lib/roby/app/run.rb +1 -1
- data/lib/roby/app/scripts/distributed.rb +1 -2
- data/lib/roby/app/scripts/generate/bookmarks.rb +1 -1
- data/lib/roby/app/scripts/results.rb +2 -1
- data/lib/roby/app/scripts/run.rb +6 -2
- data/lib/roby/app/scripts/shell.rb +11 -11
- data/lib/roby/config.rb +1 -1
- data/lib/roby/decision_control.rb +62 -3
- data/lib/roby/distributed.rb +4 -0
- data/lib/roby/distributed/base.rb +8 -0
- data/lib/roby/distributed/communication.rb +12 -8
- data/lib/roby/distributed/connection_space.rb +61 -44
- data/lib/roby/distributed/distributed_object.rb +1 -1
- data/lib/roby/distributed/notifications.rb +22 -30
- data/lib/roby/distributed/peer.rb +13 -8
- data/lib/roby/distributed/proxy.rb +5 -5
- data/lib/roby/distributed/subscription.rb +4 -4
- data/lib/roby/distributed/transaction.rb +3 -3
- data/lib/roby/event.rb +176 -110
- data/lib/roby/exceptions.rb +12 -4
- data/lib/roby/execution_engine.rb +1604 -0
- data/lib/roby/external_process_task.rb +225 -0
- data/lib/roby/graph.rb +0 -6
- data/lib/roby/interface.rb +221 -137
- data/lib/roby/log/console.rb +5 -3
- data/lib/roby/log/data_stream.rb +94 -16
- data/lib/roby/log/dot.rb +8 -8
- data/lib/roby/log/event_stream.rb +13 -3
- data/lib/roby/log/file.rb +43 -18
- data/lib/roby/log/gui/basic_display_ui.rb +89 -0
- data/lib/roby/log/gui/chronicle_view_ui.rb +90 -0
- data/lib/roby/log/gui/data_displays.rb +4 -5
- data/lib/roby/log/gui/data_displays_ui.rb +146 -0
- data/lib/roby/log/gui/relations.rb +18 -18
- data/lib/roby/log/gui/relations_ui.rb +120 -0
- data/lib/roby/log/gui/relations_view_ui.rb +144 -0
- data/lib/roby/log/gui/replay.rb +41 -13
- data/lib/roby/log/gui/replay_controls.rb +3 -0
- data/lib/roby/log/gui/replay_controls.ui +133 -110
- data/lib/roby/log/gui/replay_controls_ui.rb +249 -0
- data/lib/roby/log/hooks.rb +19 -18
- data/lib/roby/log/logger.rb +7 -6
- data/lib/roby/log/notifications.rb +4 -4
- data/lib/roby/log/plan_rebuilder.rb +20 -22
- data/lib/roby/log/relations.rb +44 -16
- data/lib/roby/log/server.rb +1 -4
- data/lib/roby/log/timings.rb +88 -19
- data/lib/roby/plan-object.rb +135 -11
- data/lib/roby/plan.rb +408 -224
- data/lib/roby/planning/loops.rb +32 -25
- data/lib/roby/planning/model.rb +157 -51
- data/lib/roby/planning/task.rb +47 -20
- data/lib/roby/query.rb +128 -92
- data/lib/roby/relations.rb +254 -136
- data/lib/roby/relations/conflicts.rb +6 -9
- data/lib/roby/relations/dependency.rb +358 -0
- data/lib/roby/relations/ensured.rb +0 -1
- data/lib/roby/relations/error_handling.rb +0 -1
- data/lib/roby/relations/events.rb +0 -2
- data/lib/roby/relations/executed_by.rb +26 -11
- data/lib/roby/relations/planned_by.rb +14 -14
- data/lib/roby/robot.rb +46 -0
- data/lib/roby/schedulers/basic.rb +34 -0
- data/lib/roby/standalone.rb +4 -0
- data/lib/roby/standard_errors.rb +21 -15
- data/lib/roby/state/events.rb +5 -4
- data/lib/roby/support.rb +107 -6
- data/lib/roby/task-operations.rb +23 -19
- data/lib/roby/task.rb +522 -148
- data/lib/roby/task_index.rb +80 -0
- data/lib/roby/test/common.rb +283 -44
- data/lib/roby/test/distributed.rb +53 -37
- data/lib/roby/test/testcase.rb +9 -204
- data/lib/roby/test/tools.rb +3 -3
- data/lib/roby/transactions.rb +154 -111
- data/lib/roby/transactions/proxy.rb +40 -7
- data/manifest.xml +20 -0
- data/plugins/fault_injection/README.txt +0 -3
- data/plugins/fault_injection/Rakefile +2 -8
- data/plugins/fault_injection/app.rb +1 -1
- data/plugins/fault_injection/fault_injection.rb +3 -3
- data/plugins/fault_injection/test/test_fault_injection.rb +19 -25
- data/plugins/subsystems/README.txt +0 -3
- data/plugins/subsystems/Rakefile +2 -7
- data/plugins/subsystems/app.rb +27 -16
- data/plugins/subsystems/test/app/config/init.rb +3 -0
- data/plugins/subsystems/test/app/planners/main.rb +1 -1
- data/plugins/subsystems/test/app/tasks/services.rb +1 -1
- data/plugins/subsystems/test/test_subsystems.rb +23 -16
- data/test/distributed/test_communication.rb +32 -15
- data/test/distributed/test_connection.rb +28 -26
- data/test/distributed/test_execution.rb +59 -54
- data/test/distributed/test_mixed_plan.rb +34 -34
- data/test/distributed/test_plan_notifications.rb +26 -26
- data/test/distributed/test_protocol.rb +57 -48
- data/test/distributed/test_query.rb +11 -7
- data/test/distributed/test_remote_plan.rb +71 -71
- data/test/distributed/test_transaction.rb +50 -47
- data/test/mockups/external_process +28 -0
- data/test/planning/test_loops.rb +163 -119
- data/test/planning/test_model.rb +3 -3
- data/test/planning/test_task.rb +27 -7
- data/test/relations/test_conflicts.rb +3 -3
- data/test/relations/test_dependency.rb +324 -0
- data/test/relations/test_ensured.rb +2 -2
- data/test/relations/test_executed_by.rb +94 -19
- data/test/relations/test_planned_by.rb +11 -9
- data/test/suite_core.rb +6 -3
- data/test/suite_distributed.rb +1 -0
- data/test/suite_planning.rb +1 -0
- data/test/suite_relations.rb +2 -2
- data/test/tasks/test_external_process.rb +126 -0
- data/test/{test_thread_task.rb → tasks/test_thread_task.rb} +17 -20
- data/test/test_bgl.rb +21 -1
- data/test/test_event.rb +229 -155
- data/test/test_exceptions.rb +79 -80
- data/test/test_execution_engine.rb +987 -0
- data/test/test_gui.rb +1 -1
- data/test/test_interface.rb +11 -5
- data/test/test_log.rb +18 -7
- data/test/test_log_server.rb +1 -0
- data/test/test_plan.rb +229 -395
- data/test/test_query.rb +193 -35
- data/test/test_relations.rb +88 -8
- data/test/test_state.rb +55 -37
- data/test/test_support.rb +1 -1
- data/test/test_task.rb +371 -218
- data/test/test_testcase.rb +32 -16
- data/test/test_transactions.rb +211 -170
- data/test/test_transactions_proxy.rb +37 -19
- metadata +169 -71
- data/.gitignore +0 -29
- data/doc/styles/allison.css +0 -314
- data/doc/styles/allison.js +0 -316
- data/doc/styles/allison.rb +0 -276
- data/doc/styles/jamis.rb +0 -593
- data/lib/roby/control.rb +0 -746
- data/lib/roby/executives/simple.rb +0 -30
- data/lib/roby/propagation.rb +0 -562
- data/lib/roby/relations/hierarchy.rb +0 -239
- data/lib/roby/transactions/updates.rb +0 -139
- data/test/relations/test_hierarchy.rb +0 -158
- data/test/test_control.rb +0 -399
- data/test/test_propagation.rb +0 -210
@@ -0,0 +1,249 @@
|
|
1
|
+
=begin
|
2
|
+
** Form generated from reading ui file 'replay_controls.ui'
|
3
|
+
**
|
4
|
+
** Created: Mon Jan 25 15:21:37 2010
|
5
|
+
** by: Qt User Interface Compiler version 4.5.3
|
6
|
+
**
|
7
|
+
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
+
=end
|
9
|
+
|
10
|
+
class Ui_ReplayControls
|
11
|
+
attr_reader :actionBookmarksAdd
|
12
|
+
attr_reader :actionGoto
|
13
|
+
attr_reader :actionBookmarksSave
|
14
|
+
attr_reader :actionBookmarksSaveAs
|
15
|
+
attr_reader :actionBookmarksLoad
|
16
|
+
attr_reader :actionBookmarksSetMark
|
17
|
+
attr_reader :vboxLayout
|
18
|
+
attr_reader :grp_play
|
19
|
+
attr_reader :verticalLayout
|
20
|
+
attr_reader :horizontalLayout
|
21
|
+
attr_reader :progress
|
22
|
+
attr_reader :goto
|
23
|
+
attr_reader :time_lcd
|
24
|
+
attr_reader :hboxLayout
|
25
|
+
attr_reader :textLabel1
|
26
|
+
attr_reader :speed
|
27
|
+
attr_reader :slower
|
28
|
+
attr_reader :play
|
29
|
+
attr_reader :faster
|
30
|
+
attr_reader :horizontalLayout_2
|
31
|
+
attr_reader :bookmarks
|
32
|
+
attr_reader :spacerItem
|
33
|
+
attr_reader :gridLayout
|
34
|
+
attr_reader :seek_start
|
35
|
+
attr_reader :play_step
|
36
|
+
attr_reader :play_next_nonempty
|
37
|
+
|
38
|
+
def setupUi(replayControls)
|
39
|
+
if replayControls.objectName.nil?
|
40
|
+
replayControls.objectName = "replayControls"
|
41
|
+
end
|
42
|
+
replayControls.resize(442, 167)
|
43
|
+
@actionBookmarksAdd = Qt::Action.new(replayControls)
|
44
|
+
@actionBookmarksAdd.objectName = "actionBookmarksAdd"
|
45
|
+
@actionGoto = Qt::Action.new(replayControls)
|
46
|
+
@actionGoto.objectName = "actionGoto"
|
47
|
+
@actionGoto.shortcutContext = Qt::ApplicationShortcut
|
48
|
+
@actionBookmarksSave = Qt::Action.new(replayControls)
|
49
|
+
@actionBookmarksSave.objectName = "actionBookmarksSave"
|
50
|
+
@actionBookmarksSave.enabled = false
|
51
|
+
@actionBookmarksSaveAs = Qt::Action.new(replayControls)
|
52
|
+
@actionBookmarksSaveAs.objectName = "actionBookmarksSaveAs"
|
53
|
+
@actionBookmarksSaveAs.enabled = true
|
54
|
+
@actionBookmarksLoad = Qt::Action.new(replayControls)
|
55
|
+
@actionBookmarksLoad.objectName = "actionBookmarksLoad"
|
56
|
+
@actionBookmarksSetMark = Qt::Action.new(replayControls)
|
57
|
+
@actionBookmarksSetMark.objectName = "actionBookmarksSetMark"
|
58
|
+
@vboxLayout = Qt::VBoxLayout.new(replayControls)
|
59
|
+
@vboxLayout.objectName = "vboxLayout"
|
60
|
+
@grp_play = Qt::GroupBox.new(replayControls)
|
61
|
+
@grp_play.objectName = "grp_play"
|
62
|
+
@verticalLayout = Qt::VBoxLayout.new(@grp_play)
|
63
|
+
@verticalLayout.objectName = "verticalLayout"
|
64
|
+
@horizontalLayout = Qt::HBoxLayout.new()
|
65
|
+
@horizontalLayout.objectName = "horizontalLayout"
|
66
|
+
@progress = Qt::ProgressBar.new(@grp_play)
|
67
|
+
@progress.objectName = "progress"
|
68
|
+
@progress.value = 0
|
69
|
+
@progress.orientation = Qt::Horizontal
|
70
|
+
|
71
|
+
@horizontalLayout.addWidget(@progress)
|
72
|
+
|
73
|
+
@goto = Qt::PushButton.new(@grp_play)
|
74
|
+
@goto.objectName = "goto"
|
75
|
+
|
76
|
+
@horizontalLayout.addWidget(@goto)
|
77
|
+
|
78
|
+
@time_lcd = Qt::LCDNumber.new(@grp_play)
|
79
|
+
@time_lcd.objectName = "time_lcd"
|
80
|
+
@time_lcd.numDigits = 6
|
81
|
+
@time_lcd.segmentStyle = Qt::LCDNumber::Flat
|
82
|
+
@time_lcd.setProperty("value", Qt::Variant.new(0))
|
83
|
+
|
84
|
+
@horizontalLayout.addWidget(@time_lcd)
|
85
|
+
|
86
|
+
|
87
|
+
@verticalLayout.addLayout(@horizontalLayout)
|
88
|
+
|
89
|
+
@hboxLayout = Qt::HBoxLayout.new()
|
90
|
+
@hboxLayout.objectName = "hboxLayout"
|
91
|
+
@textLabel1 = Qt::Label.new(@grp_play)
|
92
|
+
@textLabel1.objectName = "textLabel1"
|
93
|
+
@textLabel1.wordWrap = false
|
94
|
+
|
95
|
+
@hboxLayout.addWidget(@textLabel1)
|
96
|
+
|
97
|
+
@speed = Qt::LineEdit.new(@grp_play)
|
98
|
+
@speed.objectName = "speed"
|
99
|
+
@sizePolicy = Qt::SizePolicy.new(Qt::SizePolicy::Minimum, Qt::SizePolicy::Fixed)
|
100
|
+
@sizePolicy.setHorizontalStretch(1)
|
101
|
+
@sizePolicy.setVerticalStretch(0)
|
102
|
+
@sizePolicy.heightForWidth = @speed.sizePolicy.hasHeightForWidth
|
103
|
+
@speed.sizePolicy = @sizePolicy
|
104
|
+
@speed.maximumSize = Qt::Size.new(80, 32767)
|
105
|
+
@speed.alignment = Qt::AlignRight
|
106
|
+
|
107
|
+
@hboxLayout.addWidget(@speed)
|
108
|
+
|
109
|
+
@slower = Qt::PushButton.new(@grp_play)
|
110
|
+
@slower.objectName = "slower"
|
111
|
+
|
112
|
+
@hboxLayout.addWidget(@slower)
|
113
|
+
|
114
|
+
@play = Qt::PushButton.new(@grp_play)
|
115
|
+
@play.objectName = "play"
|
116
|
+
@sizePolicy1 = Qt::SizePolicy.new(Qt::SizePolicy::MinimumExpanding, Qt::SizePolicy::Fixed)
|
117
|
+
@sizePolicy1.setHorizontalStretch(2)
|
118
|
+
@sizePolicy1.setVerticalStretch(0)
|
119
|
+
@sizePolicy1.heightForWidth = @play.sizePolicy.hasHeightForWidth
|
120
|
+
@play.sizePolicy = @sizePolicy1
|
121
|
+
@play.checkable = true
|
122
|
+
|
123
|
+
@hboxLayout.addWidget(@play)
|
124
|
+
|
125
|
+
@faster = Qt::PushButton.new(@grp_play)
|
126
|
+
@faster.objectName = "faster"
|
127
|
+
|
128
|
+
@hboxLayout.addWidget(@faster)
|
129
|
+
|
130
|
+
|
131
|
+
@verticalLayout.addLayout(@hboxLayout)
|
132
|
+
|
133
|
+
@horizontalLayout_2 = Qt::HBoxLayout.new()
|
134
|
+
@horizontalLayout_2.objectName = "horizontalLayout_2"
|
135
|
+
@bookmarks = Qt::ToolButton.new(@grp_play)
|
136
|
+
@bookmarks.objectName = "bookmarks"
|
137
|
+
@bookmarks.popupMode = Qt::ToolButton::InstantPopup
|
138
|
+
@bookmarks.toolButtonStyle = Qt::ToolButtonTextBesideIcon
|
139
|
+
@bookmarks.arrowType = Qt::DownArrow
|
140
|
+
|
141
|
+
@horizontalLayout_2.addWidget(@bookmarks)
|
142
|
+
|
143
|
+
@spacerItem = Qt::SpacerItem.new(101, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
144
|
+
|
145
|
+
@horizontalLayout_2.addItem(@spacerItem)
|
146
|
+
|
147
|
+
@gridLayout = Qt::GridLayout.new()
|
148
|
+
@gridLayout.objectName = "gridLayout"
|
149
|
+
@seek_start = Qt::PushButton.new(@grp_play)
|
150
|
+
@seek_start.objectName = "seek_start"
|
151
|
+
|
152
|
+
@gridLayout.addWidget(@seek_start, 0, 0, 1, 1)
|
153
|
+
|
154
|
+
@play_step = Qt::PushButton.new(@grp_play)
|
155
|
+
@play_step.objectName = "play_step"
|
156
|
+
|
157
|
+
@gridLayout.addWidget(@play_step, 0, 1, 1, 1)
|
158
|
+
|
159
|
+
@play_next_nonempty = Qt::PushButton.new(@grp_play)
|
160
|
+
@play_next_nonempty.objectName = "play_next_nonempty"
|
161
|
+
|
162
|
+
@gridLayout.addWidget(@play_next_nonempty, 1, 0, 1, 2)
|
163
|
+
|
164
|
+
|
165
|
+
@horizontalLayout_2.addLayout(@gridLayout)
|
166
|
+
|
167
|
+
|
168
|
+
@verticalLayout.addLayout(@horizontalLayout_2)
|
169
|
+
|
170
|
+
play_next_nonempty.raise()
|
171
|
+
faster.raise()
|
172
|
+
|
173
|
+
@vboxLayout.addWidget(@grp_play)
|
174
|
+
|
175
|
+
|
176
|
+
retranslateUi(replayControls)
|
177
|
+
|
178
|
+
Qt::MetaObject.connectSlotsByName(replayControls)
|
179
|
+
end # setupUi
|
180
|
+
|
181
|
+
def setup_ui(replayControls)
|
182
|
+
setupUi(replayControls)
|
183
|
+
end
|
184
|
+
|
185
|
+
def retranslateUi(replayControls)
|
186
|
+
replayControls.windowTitle = Qt::Application.translate("ReplayControls", "Form", nil, Qt::Application::UnicodeUTF8)
|
187
|
+
@actionBookmarksAdd.text = Qt::Application.translate("ReplayControls", "Add...", nil, Qt::Application::UnicodeUTF8)
|
188
|
+
@actionGoto.text = Qt::Application.translate("ReplayControls", "goto", nil, Qt::Application::UnicodeUTF8)
|
189
|
+
@actionGoto.shortcut = Qt::Application.translate("ReplayControls", "Shift+G, G", nil, Qt::Application::UnicodeUTF8)
|
190
|
+
@actionBookmarksSave.text = Qt::Application.translate("ReplayControls", "Save", nil, Qt::Application::UnicodeUTF8)
|
191
|
+
@actionBookmarksSaveAs.text = Qt::Application.translate("ReplayControls", "Save As", nil, Qt::Application::UnicodeUTF8)
|
192
|
+
@actionBookmarksLoad.text = Qt::Application.translate("ReplayControls", "Load", nil, Qt::Application::UnicodeUTF8)
|
193
|
+
@actionBookmarksSetMark.text = Qt::Application.translate("ReplayControls", "Set mark", nil, Qt::Application::UnicodeUTF8)
|
194
|
+
@grp_play.title = Qt::Application.translate("ReplayControls", "Play", nil, Qt::Application::UnicodeUTF8)
|
195
|
+
@goto.text = Qt::Application.translate("ReplayControls", "&Goto", nil, Qt::Application::UnicodeUTF8)
|
196
|
+
@textLabel1.text = Qt::Application.translate("ReplayControls", "Speed", nil, Qt::Application::UnicodeUTF8)
|
197
|
+
@speed.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
198
|
+
"p, li { white-space: pre-wrap; }\n" \
|
199
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
200
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Current playing speed</span></p>\n" \
|
201
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"><span style=\" font-weight:400;\">it is the factor between the time in the log file and the time of replay. For instance, 2 means that we replay twice as fast as in reality.</span></p>\n" \
|
202
|
+
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
203
|
+
@speed.text = Qt::Application.translate("ReplayControls", "1", nil, Qt::Application::UnicodeUTF8)
|
204
|
+
@slower.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
205
|
+
"p, li { white-space: pre-wrap; }\n" \
|
206
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
207
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Decrease speed</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
208
|
+
@slower.text = Qt::Application.translate("ReplayControls", "Slower", nil, Qt::Application::UnicodeUTF8)
|
209
|
+
@play.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
210
|
+
"p, li { white-space: pre-wrap; }\n" \
|
211
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
212
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Play</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
213
|
+
@play.text = Qt::Application.translate("ReplayControls", "Play", nil, Qt::Application::UnicodeUTF8)
|
214
|
+
@faster.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
215
|
+
"p, li { white-space: pre-wrap; }\n" \
|
216
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
217
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Increase speed</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
218
|
+
@faster.text = Qt::Application.translate("ReplayControls", "Faster", nil, Qt::Application::UnicodeUTF8)
|
219
|
+
@bookmarks.text = Qt::Application.translate("ReplayControls", "Bookmarks", nil, Qt::Application::UnicodeUTF8)
|
220
|
+
@seek_start.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
221
|
+
"p, li { white-space: pre-wrap; }\n" \
|
222
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
223
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Go to start</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
224
|
+
@seek_start.text = Qt::Application.translate("ReplayControls", "Go To Beginning", nil, Qt::Application::UnicodeUTF8)
|
225
|
+
@seek_start.shortcut = ''
|
226
|
+
@play_step.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
227
|
+
"p, li { white-space: pre-wrap; }\n" \
|
228
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
229
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Go forward one step</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
230
|
+
@play_step.text = Qt::Application.translate("ReplayControls", "Step", nil, Qt::Application::UnicodeUTF8)
|
231
|
+
@play_next_nonempty.toolTip = Qt::Application.translate("ReplayControls", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
|
232
|
+
"p, li { white-space: pre-wrap; }\n" \
|
233
|
+
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\">\n" \
|
234
|
+
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Go to start</p></body></html>", nil, Qt::Application::UnicodeUTF8)
|
235
|
+
@play_next_nonempty.text = Qt::Application.translate("ReplayControls", "Play next non-empty cycle", nil, Qt::Application::UnicodeUTF8)
|
236
|
+
@play_next_nonempty.shortcut = ''
|
237
|
+
end # retranslateUi
|
238
|
+
|
239
|
+
def retranslate_ui(replayControls)
|
240
|
+
retranslateUi(replayControls)
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
|
245
|
+
module Ui
|
246
|
+
class ReplayControls < Ui_ReplayControls
|
247
|
+
end
|
248
|
+
end # module Ui
|
249
|
+
|
data/lib/roby/log/hooks.rb
CHANGED
@@ -33,30 +33,31 @@ module Roby::Log
|
|
33
33
|
Roby::Task.include TaskHooks
|
34
34
|
|
35
35
|
module PlanHooks
|
36
|
-
HOOKS = %w{
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
HOOKS = %w{
|
37
|
+
added_mission unmarked_mission
|
38
|
+
added_permanent unmarked_permanent
|
39
|
+
added_tasks added_events finalized_task finalized_event
|
40
|
+
replaced_tasks garbage_task added_transaction removed_transaction}
|
40
41
|
|
41
|
-
def
|
42
|
+
def added_mission(tasks)
|
42
43
|
super if defined? super
|
43
|
-
Roby::Log.log(:
|
44
|
+
Roby::Log.log(:added_mission) { [self, tasks] }
|
44
45
|
end
|
45
|
-
def
|
46
|
+
def unmarked_mission(tasks)
|
46
47
|
super if defined? super
|
47
|
-
Roby::Log.log(:
|
48
|
+
Roby::Log.log(:unmarked_mission) { [self, tasks] }
|
48
49
|
end
|
49
50
|
def replaced(from, to)
|
50
51
|
super if defined? super
|
51
52
|
Roby::Log.log(:replaced_tasks) { [self, from, to] }
|
52
53
|
end
|
53
|
-
def
|
54
|
+
def added_events(tasks)
|
54
55
|
super if defined? super
|
55
|
-
Roby::Log.log(:
|
56
|
+
Roby::Log.log(:added_events) { [self, tasks] }
|
56
57
|
end
|
57
|
-
def
|
58
|
+
def added_tasks(tasks)
|
58
59
|
super if defined? super
|
59
|
-
Roby::Log.log(:
|
60
|
+
Roby::Log.log(:added_tasks) { [self, tasks] }
|
60
61
|
end
|
61
62
|
def garbage(task)
|
62
63
|
super if defined? super
|
@@ -114,7 +115,7 @@ module Roby::Log
|
|
114
115
|
|
115
116
|
def calling(context)
|
116
117
|
super if defined? super
|
117
|
-
Roby::Log.log(:generator_calling) { [self,
|
118
|
+
Roby::Log.log(:generator_calling) { [self, plan.engine.propagation_source_generators, context.to_s] }
|
118
119
|
end
|
119
120
|
|
120
121
|
def called(context)
|
@@ -134,7 +135,7 @@ module Roby::Log
|
|
134
135
|
|
135
136
|
def emitting(context)
|
136
137
|
super if defined? super
|
137
|
-
Roby::Log.log(:generator_emitting) { [self,
|
138
|
+
Roby::Log.log(:generator_emitting) { [self, plan.engine.propagation_source_generators, context.to_s] }
|
138
139
|
end
|
139
140
|
|
140
141
|
def forwarding(event, to)
|
@@ -149,7 +150,7 @@ module Roby::Log
|
|
149
150
|
end
|
150
151
|
Roby::EventGenerator.include EventGeneratorHooks
|
151
152
|
|
152
|
-
module
|
153
|
+
module ExecutionHooks
|
153
154
|
HOOKS = %w{cycle_end}
|
154
155
|
|
155
156
|
def cycle_end(timings)
|
@@ -170,12 +171,12 @@ module Roby::Log
|
|
170
171
|
end
|
171
172
|
end
|
172
173
|
end
|
173
|
-
Roby::
|
174
|
+
Roby::ExecutionEngine.include ExecutionHooks
|
174
175
|
|
175
176
|
def self.each_hook
|
176
177
|
[TransactionHooks, BasicObjectHooks, TaskHooks,
|
177
|
-
PlanHooks, EventGeneratorHooks,
|
178
|
-
|
178
|
+
PlanHooks, EventGeneratorHooks, ExecutionHooks,
|
179
|
+
ExecutionHooks::ClassExtension].each do |klass|
|
179
180
|
klass::HOOKS.each do |m|
|
180
181
|
yield(klass, m.to_sym)
|
181
182
|
end
|
data/lib/roby/log/logger.rb
CHANGED
@@ -45,6 +45,7 @@ module Roby::Log
|
|
45
45
|
stop_logging
|
46
46
|
end
|
47
47
|
@loggers.delete logger
|
48
|
+
logger.close
|
48
49
|
end
|
49
50
|
|
50
51
|
# Remove all loggers
|
@@ -66,7 +67,7 @@ module Roby::Log
|
|
66
67
|
# Returns true if there is at least one loggr for the +m+ message
|
67
68
|
def has_logger?(m)
|
68
69
|
for l in @loggers
|
69
|
-
return true if l.
|
70
|
+
return true if l.logs_message?(m)
|
70
71
|
end
|
71
72
|
false
|
72
73
|
end
|
@@ -84,8 +85,8 @@ module Roby::Log
|
|
84
85
|
# Logs +message+ with argument +args+. The block is called only once if
|
85
86
|
# there is at least one logger which listens for +message+.
|
86
87
|
def log(m, args = nil)
|
87
|
-
if m == :
|
88
|
-
Roby
|
88
|
+
if m == :added_tasks || m == :added_events
|
89
|
+
Roby.synchronize do
|
89
90
|
args ||= yield
|
90
91
|
objects = args[1].to_value_set
|
91
92
|
# Do not give a 'peer' argument at Distributed.format, to
|
@@ -94,7 +95,7 @@ module Roby::Log
|
|
94
95
|
known_objects.merge(objects)
|
95
96
|
end
|
96
97
|
elsif m == :finalized_task || m == :finalized_event
|
97
|
-
Roby
|
98
|
+
Roby.synchronize do
|
98
99
|
args ||= yield
|
99
100
|
object = args[1]
|
100
101
|
args = Roby::Distributed.format(args, self) if has_logger?(m)
|
@@ -104,7 +105,7 @@ module Roby::Log
|
|
104
105
|
|
105
106
|
if has_logger?(m)
|
106
107
|
if !args && block_given?
|
107
|
-
Roby
|
108
|
+
Roby.synchronize do
|
108
109
|
args = Roby::Distributed.format(yield, self)
|
109
110
|
end
|
110
111
|
end
|
@@ -139,7 +140,7 @@ module Roby::Log
|
|
139
140
|
end
|
140
141
|
|
141
142
|
rescue Exception => e
|
142
|
-
Roby.fatal "logger thread dies with #{e.full_message}" unless e.kind_of?(Interrupt)
|
143
|
+
Roby::Log.fatal "logger thread dies with #{e.full_message}" unless e.kind_of?(Interrupt)
|
143
144
|
|
144
145
|
ensure
|
145
146
|
# Wake up any waiting thread
|
@@ -42,17 +42,17 @@ module Roby
|
|
42
42
|
data.each_slice(4) do |m, sec, usec, args|
|
43
43
|
time = Time.at(sec, usec)
|
44
44
|
case m.to_s
|
45
|
-
when /
|
45
|
+
when /added_mission/
|
46
46
|
task = tasks[args[1]]
|
47
47
|
task.mission = true
|
48
48
|
event :added_mission, args[0], task
|
49
49
|
|
50
|
-
when /
|
50
|
+
when /unmarked_mission/
|
51
51
|
task = tasks[args[1]]
|
52
52
|
task.mission = false
|
53
|
-
event :
|
53
|
+
event :unmarked_mission, args[0], task
|
54
54
|
|
55
|
-
when /
|
55
|
+
when /added_tasks/
|
56
56
|
args[1].each { |t| added_task(t) }
|
57
57
|
|
58
58
|
when /finalized_task/
|
@@ -239,18 +239,30 @@ module Roby
|
|
239
239
|
clear
|
240
240
|
end
|
241
241
|
|
242
|
+
# Processes one cycle worth of data coming from an EventStream, and
|
243
|
+
# builds the corresponding plan representation
|
244
|
+
#
|
245
|
+
# It returns true if there was something noteworthy in there, and
|
246
|
+
# false otherwise.
|
242
247
|
def process(data)
|
243
248
|
@time = data.last[0][:start]
|
244
249
|
@start_time ||= @time
|
245
250
|
|
251
|
+
done_something = false
|
246
252
|
data.each_slice(4) do |m, sec, usec, args|
|
247
253
|
time = Time.at(sec, usec)
|
248
254
|
reason = catch :ignored do
|
249
255
|
begin
|
250
256
|
if respond_to?(m)
|
251
257
|
send(m, time, *args)
|
258
|
+
done_someting = true
|
252
259
|
end
|
253
|
-
displays.each
|
260
|
+
displays.each do |d|
|
261
|
+
if d.respond_to?(m)
|
262
|
+
done_something = true
|
263
|
+
d.send(m, time, *args)
|
264
|
+
end
|
265
|
+
end
|
254
266
|
rescue Exception => e
|
255
267
|
display_args = args.map do |obj|
|
256
268
|
case obj
|
@@ -269,6 +281,7 @@ module Roby
|
|
269
281
|
Roby.warn "Ignored #{m}(#{args.join(", ")}): #{reason}"
|
270
282
|
end
|
271
283
|
end
|
284
|
+
done_something
|
272
285
|
end
|
273
286
|
|
274
287
|
def local_object(object)
|
@@ -295,29 +308,14 @@ module Roby
|
|
295
308
|
end
|
296
309
|
|
297
310
|
def clear_integrated
|
298
|
-
|
311
|
+
updated = false
|
299
312
|
plans.each do |plan|
|
313
|
+
updated = !(plan.finalized_events.empty? && plan.finalized_tasks.empty?)
|
300
314
|
plan.clear_finalized(plan.finalized_tasks.dup, plan.finalized_events.dup)
|
301
315
|
end
|
302
316
|
|
303
|
-
super
|
304
|
-
|
305
|
-
|
306
|
-
def display
|
307
|
-
plans.each do |plan|
|
308
|
-
if finalized = last_finalized[plan]
|
309
|
-
plan.clear_finalized(*finalized)
|
310
|
-
end
|
311
|
-
end
|
312
|
-
|
313
|
-
super
|
314
|
-
|
315
|
-
# Save a per-plan set of finalized tasks, to be removed the
|
316
|
-
# next time #display is called
|
317
|
-
@last_finalized = Hash.new
|
318
|
-
plans.each do |plan|
|
319
|
-
last_finalized[plan] = [plan.finalized_tasks.dup, plan.finalized_events.dup]
|
320
|
-
end
|
317
|
+
super_result = super
|
318
|
+
super_result || updated
|
321
319
|
end
|
322
320
|
|
323
321
|
def local_plan(plan, allow_new = false)
|
@@ -353,14 +351,14 @@ module Roby
|
|
353
351
|
end
|
354
352
|
def replaced_tasks(time, plan, from, to)
|
355
353
|
end
|
356
|
-
def
|
354
|
+
def added_events(time, plan, events)
|
357
355
|
plan = local_plan(plan)
|
358
356
|
events.each do |ev|
|
359
357
|
ev = local_event(ev) { plan }
|
360
358
|
plan.free_events << ev
|
361
359
|
end
|
362
360
|
end
|
363
|
-
def
|
361
|
+
def added_tasks(time, plan, tasks)
|
364
362
|
plan = local_plan(plan)
|
365
363
|
tasks.each do |t|
|
366
364
|
t = local_task(t) { plan }
|