MimiTestController
public protocol MimiTestController : MimiCoreController
Controller which provides access to Test management.
MimiTestController can be used to submit, view and manage Hearing Tests
related to the currently authenticated user.
-
MimiTestControllerObservable
Declaration
Swift
var observable: MimiCoreObservable<MimiTestControllerObservable> { get } -
Latest test results that have been loaded.
Once this is loaded, it will be automatically updated whenever the test data changes.
Warning
This is cached and potentially out of date. To ensure you have the latest data useloadLatestResults()Declaration
Swift
var latestResults: MimiTestResults? { get } -
A weakly referenced
MimiConnectedHeadphoneProviderobject.Declaration
Swift
var connectedHeadphoneProvider: MimiConnectedHeadphoneProvider? { get set } -
Loads the test type configuration.
Declaration
Swift
func loadTestTypeConfiguration(headphoneIdentifier: MimiHeadphoneIdentifier?, result: MimiCoreResultHandler<MimiTestTypeConfiguration>)Parameters
headphoneIdentifierIdentifier of the currently connected headphone if available.
resultResult handler.
-
Submit a new test.
Test results are provided in the result handler.
Declaration
Swift
func submit(test: MimiTest, result: MimiCoreResultHandler<MimiTestResults>)Parameters
testNew test to submit.
resultResult handler.
-
Submit a new Hearing Test Audiogram.
The submitted audiogram must include data points for 250Hz, 500Hz, 1000Hz, 2000Hz, 4000Hz and 8000Hz.
Additional frequencies outside that range may be included, however they will not be available in the updated
MimiTestResults.Threshold values should be within the range of -10 to 120 dB HL.
Declaration
Swift
func submitAudiogram(leftEar: MimiTestAudiogram, rightEar: MimiTestAudiogram, metadata: MimiTestAudiogramMetadata, result: MimiCoreResultHandler<MimiSubmitAudiogramResponse>)Parameters
leftEarAudiogram data for the left ear.
rightEarAudiogram data for the right ear.
metadataMetadata for the audiogram.
resultResult handler.
-
Load headphones.
Declaration
Swift
func loadHeadphones(connectionType: MimiHeadphone.ConnectionType, result: MimiCoreResultHandler<[MimiHeadphone]>)Parameters
connectionTypeConnection type of the headphone.
resultResult of load.
-
Delete a test which is associated with a test result.
Declaration
Swift
func delete(testResult: AnyMimiTestResult, result: MimiCoreResultHandler<Void>)Parameters
testResultTest result whose associated test is to be deleted.
resultResult of deletion.
-
Load test results.
The type of the tests loaded is decided by the
typeparameter.Declaration
Swift
func loadResults<RunResultData: MimiTestRunResultData>(type: RunResultData.Type, result: MimiCorePagedResultHandler<[MimiTestResult<RunResultData>]>)Parameters
typeRun result data type.
resultPaged result handler with a limit of 20 test results per page.
-
Load test results (Swift Concurrency API)
The type of the tests loaded is decided by the
typeparameter.Declaration
Swift
func loadResults<RunResultData>(type: RunResultData.Type) async throws -> MimiCoreAsyncPagedResult<[MimiTestResult<RunResultData>]> where RunResultData : MimiTestRunResultDataParameters
typeRun result data type.
Return Value
Async paged result function with a limit of 20 test results per page.
-
Load the latest test results.
Declaration
Swift
func loadLatestResults(result: MimiCoreResultHandler<MimiTestResults>)Parameters
resultResult.
MimiTestController Protocol Reference