ITrafficDataManager Interface

Provides editing capabilities for creating or deleting dynamic traffic files.

Members

Name Description
Method ConvertTMCToKey Converts a TMC string to a unique integer key value.
Method DeleteData Deletes all dynamic traffic files in the specified folder which are older than the specified cutoff date.
Method Insert Inserts the speed values per time slice for the specified TMC key.
Method StartEditing Starts a new edit session for tracking edits to a new dynamic traffic file.
Method StopEditing Stops the current edit session and writes all current edits to a new dynamic traffic file in the specified folder.

ITrafficDataManager.ConvertTMCToKey Method

Converts a TMC string to a unique integer key value.

Public Function ConvertTMCToKey ( _
    ByVal tmcCode As String _
) As Integer
public uint ConvertTMCToKey (
    string tmcCode
);

Remarks

The alpha-numeric TMC string values must be converted to unique integer key values in order to be used by Insert to place associated speeds in a dynamic traffic file.

ITrafficDataManager.DeleteData Method

Deletes all dynamic traffic files in the specified folder which are older than the specified cutoff date.

Public Sub DeleteData ( _
    ByVal feedFolderPath As String, _
    ByVal utcCutoffDate As DateTime _
)
public void DeleteData (
    string feedFolderPath,
    DateTime utcCutoffDate
);

Remarks

When real-time traffic is updated regularly, there is the potential for the dynamic traffic files to accumulate beyond what is needed. Use DeleteData to clean up the dynamic traffic file folder to only contain the files referring to traffic after a specified date and time.

FeedFolderPath is a path to an existing directory that contains dynamic traffic files.

Any files that represent traffic from before the UTCCutoffDate will be deleted.

ITrafficDataManager.Insert Method

Inserts the speed values per time slice for the specified TMC key.

Public Sub Insert ( _
    ByVal key As Integer, _
    ByVal pTimeSliceSpeeds As IDoubleArray _
)
public void Insert (
    uint key,
    IDoubleArray pTimeSliceSpeeds
);

Remarks

StartEditingmust be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.

The Key value should be retrieved by passing a TMC to ConvertTMCToKey. Keys are used to replace TMC values, in order to change the alpha-numeric TMC value into a unique unsigned integer.

pTimeSliceSpeeds is an array of double values that must have an equivalent number of entries as the value passed to TimeSliceCount in StartEditing. The values in the array represent the speed associated with the TMC for each of the time slices.

ITrafficDataManager.StartEditing Method

Starts a new edit session for tracking edits to a new dynamic traffic file.

Public Sub StartEditing ( _
    ByVal feedUTCStartTime As DateTime, _
    ByVal estimatedKeyCount As Integer, _
    ByVal timeSliceCount As Integer, _
    ByVal firstTimeSliceUTCStartTime As DateTime, _
    ByVal TimeSliceDurationInMinutes As Integer, _
    ByVal speedUnits As esriNetworkAttributeUnits, _
    ByVal updateIntervalInMinutes As Integer, _
    ByVal feedVersionNumber As Integer _
)
public void StartEditing (
    DateTime feedUTCStartTime,
    int estimatedKeyCount,
    int timeSliceCount,
    DateTime firstTimeSliceUTCStartTime,
    int TimeSliceDurationInMinutes,
    esriNetworkAttributeUnits speedUnits,
    int updateIntervalInMinutes,
    int feedVersionNumber
);

Remarks

StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.

EstimatedKeyCountshould be a value close to the number of keys that are going to be inserted into the traffic file. This value is used to help manage memory allocation for inserts.

TimeSliceCount is the number of time ranges for which each key will have a speed.

FirstTimeSliceUTCStartTime is the time associated with the first time range for each inserted key.

TimeSliceDurationInMinutes is the duration, in minutes, that each time slice should represent.

SpeedUnitsis the units of measurement that will be associated with the speed values included in key inserts.

UpdateIntervalInMinutes is used by the solver to know when it should attempt to retrieve the next available DTF. When scheduling traffic updates that repeat periodically, make this update interval value match how often new data updates occur.

The combination of TimeSliceCount, TimeSliceDurationInMinutes, and FirstTimeSliceUTCStartTime give the TrafficDataManager the information it needs to set up the schema of the dynamic traffic file. For example, 2 time slices of 15 minutes each that start at 08:00 will create 2 ranges of time from 08:00 to 08:14:59 and 08:15 to 08:29:59.

ITrafficDataManager.StopEditing Method

Stops the current edit session and writes all current edits to a new dynamic traffic file in the specified folder.

Public Sub StopEditing ( _
    ByVal feedFolderPath As String, _
    ByVal createCompressedFile As Boolean _
)
public void StopEditing (
    string feedFolderPath,
    bool createCompressedFile
);

Remarks

StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.

FeedFolderPath is a path to the directory that will hold the dynamic traffic files.

Classes that implement ITrafficDataManager

Classes Description
TrafficDataManager A class for creating/managing dynamic traffic files for dynamic traffic feeds.

Remarks

ITrafficDataManager is used to generate the files that contain real-time traffic speed values associated with the edges in a network dataset.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.