Syntax
int PCMSGetTravelTimes (Trip trip, int day, unsigned long *pDurationArray, unsigned long arrayCount)
Parameters
Trip trip – Handle to a trip.
int day – The day of week. Value range is 0 – 6, where 0 represents Sunday.
unsigned long *pDurationArray – A pre-allocated memory buffer that will be filled with trip durations.
long arrayCount – The size of the memory buffer pDurationArray supplied by the user must equal 96.
Description
Gets an array of travel times for a trip. The function returns a trip duration array for 15-minute increments throughout a particular day of the week, using historical road speeds. In total, it returns 96 trip durations for that given day of week.
Return Values
An integer return code. Negative one (-1) indicates that the product is not licensed for RouteMatrix.
Sample Code
for (int day = 0; day < 7; day++)
               {
               ret = PCMSGetTravelTimes(trip, day, pDurationArray, arrayCount);
               if (ret >= 0)
               {
                   Log_Pcmstest("Testing Day of Week : %d \n", day);
                   for (int i = 0; i < 24; i++)
                   {
                               char line[1024] = { 0 };
                               sprintf(line, "hour %d:", i);
                               for (int j = 0; j < 4; j++)
                               {
                                   char str[256] = { 0 };
                                   sprintf(str, "%d  ", pDurationArray[i * 4 + j]);
                                   strcat(line, str);
                                                             }Supported Since: PC*MILER|Connect 27
Category: Matrix Functions