QPSignal
public class QPSignal : Decodable
Data Model class representing a vSign.
-
CoreLocation circular region representing the geographic area covered by the vSign
Declaration
Swift
public var region: QPCodableCircularRegion? { get set } -
API id for the vSign
Declaration
Swift
public let id: String -
List of bearings associated the vSign
Declaration
Swift
public var bearings: [QPBearing]? -
List of messages (TTS text)
Declaration
Swift
public var messages: [QPSignalMessage]? -
Stores if the vSign has been entered by the user
Declaration
Swift
public var entered: Bool? -
Stores if the vSign has been notified to the user
Declaration
Swift
public var notified: Bool? -
Coordinates of vSign
Declaration
Swift
public let point: QPPoint? -
Radius of vSign
Declaration
Swift
public let radius: Int? -
Date object storing when the vSign has been last entered by the user. Nil if the user has not entered the vSign yet.
Declaration
Swift
public var lastEnteredAt: Date? -
Date object storing when the vSign has been last notified to the user. Nil if this vSign has not been notified yet.
Declaration
Swift
public var lastNotifiedAt: Date? -
Returns the first item from the list of bearings linked to the vSign. Currently we use only one value per vSign, but the API supports multiple values.
Declaration
Swift
public var mainBearing: Double? { get } -
Determines if the vSign has any bearing value associated to it.
Declaration
Swift
public var hasBearings: Bool { get } -
Number of seconds since the vSign was last notified
Declaration
Swift
public var notificationAgeInSeconds: Int { get } -
Number of seconds since the vSign was last entered.
Declaration
Swift
public var enteredAgeInSeconds: Int { get } -
Object that stores number of seconds since the vSign was last actived.
Declaration
Swift
public let reactivate: QPReactivateTimeout? -
Determines if the vSign has any action value associated to it.
Declaration
Swift
public let action: QPSignalAction? -
The category identifier of the signal.
Declaration
Swift
public let category: Int? -
Anticipate AVS calculation
Declaration
Swift
public let anticipate: QPSignalAnticipate? -
Returns a matching message - if any - for the given language code
Declaration
Swift
public func getMessage(byLang: QPLangCode, fallbackLang: QPLangCode?) -> QPSignalMessage? -
Mark the vSign as notified. Called by the Engine after the logic to match vSign is run.
Declaration
Swift
public func markAsNotified() -
Resets the internal notification status for a vSign. Normally this happens when the user move away from the vSign coverage area or if the latest notification age is greater than the treshold value stored in the Settings.
Declaration
Swift
public func resetNotified() -
Marks the vSign as entered by the user. Manily used to avoid notifying the user again once the area has been entered.
Declaration
Swift
public func markAsEntered() -
Resets the
enteredstatusDeclaration
Swift
public func resetEntered() -
Updates some of the current properties from another vSign instance. Used to update the vSign with new data from the API for the same vSign ID.
Declaration
Swift
public func updateFrom(otherSignal: QPSignal) -
Calculates the distance between the given point and the center of the vSign.
Declaration
Swift
public func distanceFromCenter(point: CLLocation) -> CLLocationDistance? -
Calculates the distance between the given point and the border of the coverage area.
Declaration
Swift
public func distanceFromArea(point: CLLocation) -> CLLocationDistance?
QPSignal Class Reference