@@ -140,6 +140,33 @@ def __init__(
140
140
file paths or using synthetic hardware modes.
141
141
"""
142
142
143
+ #: Tk top-level widget: Tk.tk GUI instance.
144
+ self .root = root
145
+
146
+ #: Tk top-level widget: Tk.tk GUI instance.
147
+ self .splash_screen = splash_screen
148
+
149
+ #: string: Path to the configuration yaml file.
150
+ self .configuration_path = configuration_path
151
+
152
+ #: string: Path to the experiment yaml file.
153
+ self .experiment_path = experiment_path
154
+
155
+ #: string: Path to the waveform constants yaml file.
156
+ self .waveform_constants_path = waveform_constants_path
157
+
158
+ #: string: Path to the REST API yaml file.
159
+ self .rest_api_path = rest_api_path
160
+
161
+ #: string: Path to the waveform templates yaml file.
162
+ self .waveform_templates_path = waveform_templates_path
163
+
164
+ #: string: Path to the GUI configuration yaml file.
165
+ self .gui_configuration_path = gui_configuration_path
166
+
167
+ #: iterable: Non-default command line input arguments for
168
+ self .args = args
169
+
143
170
#: Object: Thread pool for the controller.
144
171
self .threads_pool = SynchronizedThreadPool ()
145
172
@@ -152,34 +179,28 @@ def __init__(
152
179
#: dict: Configuration dictionary
153
180
self .configuration = load_configs (
154
181
self .manager ,
155
- configuration = configuration_path ,
156
- experiment = experiment_path ,
157
- waveform_constants = waveform_constants_path ,
158
- rest_api_config = rest_api_path ,
159
- waveform_templates = waveform_templates_path ,
160
- gui = gui_configuration_path ,
182
+ configuration = self . configuration_path ,
183
+ experiment = self . experiment_path ,
184
+ waveform_constants = self . waveform_constants_path ,
185
+ rest_api_config = self . rest_api_path ,
186
+ waveform_templates = self . waveform_templates_path ,
187
+ gui = self . gui_configuration_path ,
161
188
)
162
189
163
190
verify_configuration (self .manager , self .configuration )
164
191
verify_experiment_config (self .manager , self .configuration )
165
192
verify_waveform_constants (self .manager , self .configuration )
166
193
167
- # Initialize the Model
168
194
#: ObjectInSubprocess: Model object in MVC architecture.
169
195
self .model = ObjectInSubprocess (
170
196
Model , args , self .configuration , event_queue = self .event_queue
171
197
)
172
198
173
- logger .info (f"Spec - Configuration Path: { configuration_path } " )
174
- logger .info (f"Spec - Experiment Path: { experiment_path } " )
175
- logger .info (f"Spec - Waveform Constants Path: { waveform_constants_path } " )
176
- logger .info (f"Spec - Rest API Path: { rest_api_path } " )
177
-
178
199
#: mp.Pipe: Pipe for sending images from model to view.
179
200
self .show_img_pipe = self .model .create_pipe ("show_img_pipe" )
180
201
181
202
#: string: Path to the default experiment yaml file.
182
- self .default_experiment_file = experiment_path
203
+ self .default_experiment_file = self . experiment_path
183
204
184
205
#: string: Path to the waveform constants yaml file.
185
206
self .waveform_constants_path = waveform_constants_path
@@ -188,7 +209,7 @@ def __init__(
188
209
self .configuration_controller = ConfigurationController (self .configuration )
189
210
190
211
#: View: View object in MVC architecture.
191
- self .view = view (root )
212
+ self .view = view (self . root )
192
213
193
214
#: dict: Event listeners for the controller.
194
215
self .event_listeners = {}
@@ -289,14 +310,25 @@ def __init__(
289
310
self .initialize_cam_view ()
290
311
291
312
# destroy splash screen and show main screen
292
- splash_screen .destroy ()
293
- root .deiconify ()
313
+ self . splash_screen .destroy ()
314
+ self . root .deiconify ()
294
315
295
316
#: int: ID for the resize event.Only works on Windows OS.
296
317
self .resize_event_id = None
297
318
if platform .system () == "Windows" :
298
319
self .view .root .bind ("<Configure>" , self .resize )
299
320
321
+ logger .info (self .__repr__ ())
322
+
323
+ def __repr__ (self ):
324
+ return (
325
+ f'Controller("{ self .root } ", "{ self .splash_screen } ", '
326
+ f'"{ self .configuration_path } ", "{ self .experiment_path } ", '
327
+ f'"{ self .waveform_constants_path } ", "{ self .rest_api_path } ", '
328
+ f'"{ self .waveform_templates_path } ", "{ self .gui_configuration_path } ", '
329
+ f'"{ self .args } ")'
330
+ )
331
+
300
332
def update_buffer (self ):
301
333
"""Update the buffer size according to the camera
302
334
dimensions listed in the experimental parameters.
0 commit comments