videoLat  2.1
Video conferencing delay measurements
Instance Methods | Class Methods | Protected Attributes | Properties | List of all members
BaseRunManager Class Reference

#import <BaseRunManager.h>

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

Instance Methods

(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) - startPreMeasuring:
 Called when premeasuring button has been pressed.
(void) - stopPreMeasuring:
 Stop pre-measuring because we have enough prerun samples.
(IBAction) - startMeasuring:
 Called when user presses "start" button.
(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
(void) - triggerNewOutputValueAfterDelay
(void) - prepareReceivedNoValidCode
 Internal: no QR code was received in time during prerun.
(void) - prepareReceivedValidCode:
 Internal: QR code was received in time during prerun.
(BOOL) - prepareInputDevice
(BOOL) - prepareOutputDevice
(BOOL) - prepareMeasurementFromRemoteData
(void) - reportResultsToRemote:
 Report measurement results to remote input or output handler.
(void) - codeRequestedByMaster:
 Called when an incoming request for showing a code is received over the network.
(void) - reportHeartbeat
 Called whenever "nothing really happened", will cause a heartbeat to be sent when helper.
(void) - receivedMeasurementResult:
 Called when a measurement report has been received from the master.

Class Methods

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

Protected Attributes

BOOL networkHelper
 true if this is a networked helper, i.e. it has no collector.
BOOL networkServer
 true if this run manager is a network server (i.e. producing visual output to let the other side connect back here)
BOOL showPreviewDuringRun
 True if we want to see the preview while running (false for QR-code roundtrip)
uint64_t prepareMaxWaitTime
 Internal: How long to wait for prerun code finding.
int prepareMoreNeeded
 Internal: How many more prerun correct catches we need.
uint64_t averageFinderDuration
 Running average of how much the patternfinder takes.
uint64_t outputCodeTimestamp
 When the last output code change was made.
NSString * prevInputCode
 Last input code detected.
int prevInputCodeDetectionCount
 How often prevInputCode was detected.
int uncertainDetectionCount
 How often we detected no reasonable code.
NSString * baseName


IBOutlet NSObject< InputSelectionView > * selectionView
 Assigned in NIB: view that allows selection of input device.
IBOutlet NSObject< InputDeviceProtocol > * capturer
 Assigned in NIB: input capturer.
IBOutlet NSorUIView< OutputDeviceProtocol > * outputView
 Assigned in NIB: Displays current output QR code.
IBOutlet NSObject< NewMeasurementDelegate > * completionHandler
 Optionally assigned in NIB: handler to open completed measurement.
IBOutlet NetworkIODevicenetworkIODevice
 For hetwork measurements: the connection to the other side.
IBOutlet NSObject< ClockProtocol > * clock
 Input manager clock.
NSString * outputCode
NSString * prevOutputCode
bool running
 True after user has pressed "run" button, false again after pressing "stop".
bool preparing
 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.

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.

The class is also responsible for reporting measurements to a remote side (if this is a two-ended measurement run).

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).

Method Documentation

◆ classForMeasurementType:()

+ (Class) classForMeasurementType: (NSString *)  name

Return the class implementing a measurement type.

namethe name of the measurement type
the class object implementing the measurement type

◆ nibForMeasurementType:()

+ (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

◆ prepareMeasurementFromRemoteData()

- (BOOL) prepareMeasurementFromRemoteData

Update settings to measurement based on parameters (device name, etc) received from a remote input or output handler.

◆ registerClass:forMeasurementType:()

+ (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

◆ registerNib:forMeasurementType:()

+ (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

◆ selectMeasurementType:()

- (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 QR Code Roundtrip and Video Calibration) share an awful lot of code.

◆ triggerNewOutputValue()

- (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 in AudioRunManager, and VideoRunManager.

◆ triggerNewOutputValueAfterDelay()

- (void) triggerNewOutputValueAfterDelay

Prepare data for a new delay measurement, possibly after a delay to forestall lock-step behaviour. Called on the output companion, will call triggerNewOutputValue after a delay.

Property Documentation

◆ outputCode

- (NSString*) outputCode

Textual representation of the current output code. For example "white", or @"123456789" for QR code measurements.

◆ prevOutputCode

- (NSString*) prevOutputCode

Previous value of outputCode, only valid if we have more than 2 output codes. Used to forestall error messages in case we get a late detection of a previous code.

The documentation for this class was generated from the following files: