Skip to main content

PCMSValidateRouteHOS

Syntax

int PCMSValidateRouteHOS(Trip trip)

Parameters

Trip trip – Handle to a trip.

Description

Determines if a trip is HOS compliant. If the trip is not HOS compliant, an HOS report will be generated. This report will provide details about where along the route off-duty stops are required in order to satisfy HOS rules.

Note: If Hub routing is enabled, this function will generate an error message. It is NOT recommended to generate a Hub route when HOS management is enabled. Performance of this API will vary based on the length and complexity of the route.

Return Values

  • 0 indicates that the route is HOS compliant.
  • -1 indicates that an error has occurred.
  • Greater than zero indicates that the route is not HOS compliant. The number provided is the number of off-duty stops that need to be added to the route to make it HOS compliant.

Sample Code

if (PCMSValidateRouteHOS(trip) < 0)
  break;
if (PCMSGetHOSRouteReport(trip, buffer, BUFLEN) != 0)
  break;
// report not changed, loop
if (!strcmp(buffer, prevReport))
  break;
strcpy(prevReport, buffer);
PrintLogString("\nPCMSGetHOSRouteReport()----\n %s", buffer);

Supported Since: PC*Miler Connect 29

Category: Hours of Service

Last updated July 19, 2025.