videoLat 2.0
Video conferencing delay measurements
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties
BaseRunManager Class Reference

#import <BaseRunManager.h>

Inheritance diagram for BaseRunManager:
Inheritance graph
Collaboration diagram for BaseRunManager:
Collaboration graph

List of all members.

Public Member Functions

(void) - terminate
 Prepare for deallocation. Severs links with companion and releases resources.
(void) - stop
 Called when the user stops a measurement run, via stopMeasuring from RunTypeView.
(IBAction) - stopMeasuring:
 Called when user presses "stop" button.
(void) - selectMeasurementType:
(void) - restart
 Signals that a measurement run should be restarted (for example because the input device has changed).
(void) - triggerNewOutputValue
(NSString *) - genPrerunCode

Static Public Member Functions

(void) + initialize
 Class initializer.
(void) + registerClass:forMeasurementType:
(Class) + classForMeasurementType:
(void) + registerNib:forMeasurementType:
(NSString *) + nibForMeasurementType:

Protected Attributes

BOOL handlesInput
 true if we are responsible for input processing
BOOL handlesOutput
 true if we are responsible for output processing
BOOL slaveHandler
 true if this is a slave, i.e. it has no collector.
uint64_t maxDelay
 Internal: How log to wait for prerun code finding.
int prerunMoreNeeded
 Internal: How many more prerun correct catches we need.
NSString * baseName


IBOutlet NSObject
< SelectionView > * 
 Assigned in NIB: view that allows selection of input device.
IBOutlet NSObject
< InputCaptureProtocol > * 
 Assigned in NIB: input capturer.
IBOutlet NSorUIView
< OutputViewProtocol > * 
 Assigned in NIB: Displays current output QR code.
IBOutlet NSObject
< NewMeasurementDelegate > * 
 Optionally assigned in NIB: handler to open completed measurement.
 The type of measurement we are doing.
NSString * outputCode
bool running
 True after user has pressed "run" button, false again after pressing "stop".
bool preRunning
 True after user has pressed "prepare" button, false again after pressing "run".
IBOutlet RunCollectorcollector
 Initialized in the NIB, RunCollector for this measurement run.
IBOutlet RunStatusViewstatusView
 Initialized in the NIB, RunStatusView for this measurement run.
IBOutlet RunManagerViewmeasurementMaster
 Initialized in the NIB, our parent object.
IBOutlet NSObject
< RunInputManagerProtocol > * 
 Our companion object that handles input.
IBOutlet NSObject
< RunOutputManagerProtocol > * 
 Our companion object that handles output.

Detailed Description

Base class for objects that control a delay measurement run, i.e. a sequence of many individual delay measurements and collects and stores the individual delays.

Implementations of this class should be able to handle both input and output, but they may have to handle only one of those, based on how things are initialized in the NIB. If the object should handle both (for example during a VideoRun) both inputCompanion and outputCompanion refer to self. If the object should handle only input or output (for example during a MixedRun) the inputCompanion of the output object refers to the other object and vice versa.

In addition, the class methods implement a repository for remembering all available measurement types and their NIBs (initialized by the class initializers of the subclasses).

Member Function Documentation

+ (Class) classForMeasurementType: (NSString *)  name

Return the class implementing a measurement type.

namethe name of the measurement type
the class object implementing the measurement type
- (NSString *) genPrerunCode

Can be overridden by RunManagers responsible for input, to enforce certain codes to be used during prerunning. Implemented by the NetworkRunManager to communicate the ip/port of the listener to the remote end.

the prerun code to use.

Reimplemented from <RunInputManagerProtocol>.

Reimplemented in NetworkRunManager.

+ (NSString *) nibForMeasurementType: (NSString *)  name

Return the NIB filename implementing a measurement type.

namethe name of the measurement type
the NIB name implementing the measurement type
+ (void) registerClass: (Class)  managerClass
forMeasurementType: (NSString *)  name 

Register a BaseRunManager subclass for a specific measurement type.

managerClassthe class object that implements the measurement type
namethe (human readable) name of this measurement type
+ (void) registerNib: (NSString*)  nibName
forMeasurementType: (NSString *)  name 

Register a NIB file that implements a specific measurement type.

nibNamethe name of the nibfile
namethe (human readable) name of the measurement type
- (void) selectMeasurementType: (NSString *)  typeName

Select the actual measurement type this run will use.

typeNamethe (human readable) measurement type name. This method is needed because many measurement types (for example Video Roundtrip and Video Calibration) share an awful lot of code.
- (void) triggerNewOutputValue

Prepare data for a new delay measurement. Called on the output companion, should create a pattern that is distinghuisable from the previous pattern and display it.

Reimplemented from <RunOutputManagerProtocol>.

Reimplemented in AudioRunManager, HardwareRunManager, and VideoRunManager.

Property Documentation

- (IBOutlet NSObject<RunInputManagerProtocol>*) inputCompanion [read, write, assign]

Our companion object that handles input.

The inputCompanion and outputCompanion properties need a bit of explanation. If the same RunManager is used for both input and output the following two outlets are NOT assigned in the NIB. The will then be both set to self in awakeFromNib, and this run manager handles both input and output. But for non-symetric measurements (say, hardware light to camera) the NIB instantiates two BaseRunManager subclass instances, and ties them together through the inputCompanion and outputCompanion.

Reimplemented from <RunOutputManagerProtocol>.

- (NSString*) outputCode [read, write, assign]

Textual representation of the current output code, for example "white", or @"123456789" for QR code measurements. Set by the BaseRunManager that is responsible for output, read by its inputCompanion.

Reimplemented from <RunOutputManagerProtocol>.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Properties Defines