TrafficTpegConfiguration

data class TrafficTpegConfiguration(val apiKey: String, val initSessionUrl: String, val updateFrequency: Duration = 60.toDuration(DurationUnit.SECONDS), val innerRadius: Distance = Distance.kilometers(10), val outerRadius: Distance = Distance.kilometers(150), val maxNumberOfEvents: Int = 1000, val trafficCacheEnabled: Boolean = false, val fileFeedDirectory: String? = null, val fileFeedPattern: String = ".*", val webRequestDumpDirectory: String? = null)

Represents a configuration for traffic engine.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

apiKey

API key used to create a session.

initSessionUrl

The resource/page on the server requested in the InitSession request.

updateFrequency

Time to wait before sending the next GetMessage request (defaults to 60s).

innerRadius

The Inner Radius (defaults to 10km).

outerRadius

Outer Radius (defaults to 150km).

maxNumberOfEvents

Maximum number of messages the client can handle at a time (defaults to 1000).

trafficCacheEnabled

Enable or disable the traffic cache feature. If enabled, onboard traffic information is persisted between sessions, providing faster access to road closure information after starting the app. Defaults to false (disabled).

fileFeedDirectory

The path to the directory containing files for file feed communication. If set, the onboard traffic subsystem will not communicate with an external server and instead generates responses from files matching the given pattern based on alphanumerical order. Sub-directories are not included. Defaults to null (disabled).

fileFeedPattern

The pattern of files to be used by file feed communication. Only files for which the name matches the given regular expression are considered. Defaults to ".*"

webRequestDumpDirectory

The path to the directory in which dumps are stored. If this setting is not provided, dumping is disabled.

Constructors

Link copied to clipboard
fun TrafficTpegConfiguration(apiKey: String, initSessionUrl: String, updateFrequency: Duration = 60.toDuration(DurationUnit.SECONDS), innerRadius: Distance = Distance.kilometers(10), outerRadius: Distance = Distance.kilometers(150), maxNumberOfEvents: Int = 1000, trafficCacheEnabled: Boolean = false, fileFeedDirectory: String? = null, fileFeedPattern: String = ".*", webRequestDumpDirectory: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard