RiskProvidingConfiguration
struct RiskProvidingConfiguration
Used to configure a RiskLevelProvider
.
-
The duration a conducted exposure detection is considered valid.
Declaration
Swift
var exposureDetectionValidityDuration: DateComponents
-
Time interval between exposure detections.
Declaration
Swift
var exposureDetectionInterval: DateComponents
-
The mode of operation
Declaration
Swift
var detectionMode: DetectionMode
-
Undocumented
Declaration
Swift
func exposureDetectionValidUntil(lastExposureDetectionDate: Date?) -> Date
-
Undocumented
Declaration
Swift
func nextExposureDetectionDate(lastExposureDetectionDate: Date?, currentDate: Date = Date()) -> NextExposureDetection
-
Undocumented
Declaration
Swift
func exposureDetectionIsValid(lastExposureDetectionDate: Date = .distantPast, currentDate: Date = Date()) -> Bool
-
Checks, whether a new exposureDetection may be triggered
Declaration
Swift
func shouldPerformExposureDetection(activeTracingHours: Int, lastExposureDetectionDate: Date?, currentDate: Date = Date()) -> Bool
Parameters
activeTracingHours
The amount of hours where the contact tracing protocol has been active within the relevant timeframe.
lastExposureDetectionDate
The timestamp when the last exposureDetection completed successfully.
currentDate
Current timestamp.
-
Checks, whether a new exposureDetection may be triggered manually by the user.
Declaration
Swift
func manualExposureDetectionState(activeTracingHours: Int, lastExposureDetectionDate detectionDate: Date?) -> ManualExposureDetectionState?
Parameters
activeTracingHours
The amount of hours where the contact tracing protocol has been active within the relevant timeframe.
lastExposureDetectionDate
The timestamp when the last exposureDetection completed successfully.