Syntax 

void PCMSSetTollMode(Trip trip, int mode)


Parameters 

Trip trip – Handle to a trip.

int mode – Sets which toll mode will be used to calculate tolls: 0 – no toll information is calculated; 1 – cash toll amount; 2 – discount toll amount


Description

Sets whether no tolls are calculated, tolls are to be calculated on an all-cash basis, or discount programs are to be used in toll calculations.


If discount programs are used (e.g. EZPass, SunPass), you must first select them in the Application Settings > Tolls dialog in the PC*MILER user interface. You must also make sure the use of discount programs is enabled in the default Route Profile: select Routes > Profiles > Default (click on pencil icon) > Reporting Preferences and make sure Use Toll Discount Programs is checked. 


Return Values 

None


Sample Code

/* get total tolls on all-cash basis */
    PCMSSetTollMode(trip1, TOLL_CASH);
    TollsTotal = PCMSGetToll(trip1) / 100.0;
    printf("All-cash tolls = $%.2f\n", TollsTotal); 

/* get total tolls using discount programs */
    PCMSSetTollMode(trip1, TOLL_DISCOUNT);
    TollsTotal = PCMSGetToll(trip1) / 100.0;
    printf("Discounted tolls = $%.2f\n", TollsTotal);


Supported Since: PC*MILER|Connect 21

Category: Trip Options