Class TrafficDataManagerClass
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
[Guid("95EEE584-D873-491A-8248-49A4ED60E35D")]
[ClassInterface(ClassInterfaceType.None)]
public class TrafficDataManagerClass : TrafficDataManager, ITrafficDataManager
- Inheritance
-
TrafficDataManagerClass
- Implements
- Inherited Members
Constructors
TrafficDataManagerClass()
public TrafficDataManagerClass()
Explicit Interface Implementations
ConvertTMCToKey(string)
Converts a TMC string to a unique integer key value.
virtual uint ConvertTMCToKey(string tmcCode)
Parameters
tmcCodestring
Returns
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.
DeleteData(string, DateTime)
Deletes all dynamic traffic files in the specified folder which are older than the specified cutoff date.
virtual void DeleteData(string feedFolderPath, DateTime utcCutoffDate)
Parameters
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.
Insert(uint, IDoubleArray)
Inserts the speed values per time slice for the specified TMC key.
virtual void Insert(uint key, IDoubleArray pTimeSliceSpeeds)
Parameters
keyuintpTimeSliceSpeedsIDoubleArray
Remarks
StartEditing must 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.
StartEditing(DateTime, int, int, DateTime, int, esriNetworkAttributeUnits, int, int)
Starts a new edit session for tracking edits to a new dynamic traffic file.
virtual void StartEditing(DateTime feedUTCStartTime, int estimatedKeyCount, int timeSliceCount, DateTime firstTimeSliceUTCStartTime, int TimeSliceDurationInMinutes, esriNetworkAttributeUnits speedUnits, int updateIntervalInMinutes, int feedVersionNumber)
Parameters
feedUTCStartTimeDateTimeestimatedKeyCountinttimeSliceCountintfirstTimeSliceUTCStartTimeDateTimeTimeSliceDurationInMinutesintspeedUnitsesriNetworkAttributeUnitsupdateIntervalInMinutesintfeedVersionNumberint
Remarks
StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.
EstimatedKeyCount should 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.
SpeedUnits is 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.
StopEditing(string, bool)
Stops the current edit session and writes all current edits to a new dynamic traffic file in the specified folder.
virtual void StopEditing(string feedFolderPath, bool createCompressedFile)
Parameters
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.