Skip to main content

PCMSNumTollDiscounts

Syntax

int PCMSNumTollDiscounts(PCMServerID serv)

Parameters

PCMServerID serv – The PC*Miler server ID.

Description

Returns the number of available toll discount programs (for example, EZPass, FasTrak, etc.). (A license for the Tolls add-on is required.) Only discount programs that are selected in File > Application Settings > Tolls in the PC*Miler user interface are available, and discount programs must be enabled. Note that the total includes cash mode, which technically is not a discount.

Return Values

Returns the number of available discount programs. Negative one (-1) indicates an invalid server ID.

Sample Code

/* get breakdown of tolls by cash part (i=0) and each discount program */
PCMSSetTollMode(trip1, TOLL_DISCOUNT);
numPrograms = PCMSNumTollDiscounts(server);
for (i=0; i<numPrograms; ++i)
{
  PCMSGetTollDiscountName(server, i, programName, 20);
  programTolls = PCMSGetTollBreakdown(trip1, i, " ")/ 100.0;
  printf("%s Tolls = $%.2f\n", programName, programTolls);
}

Supported Since: PC*Miler Connect 21

Category: Administration

Last updated July 8, 2025.