Syntax
int PCMSGetHOSRouteReport(Trip trip, char *buffer, int bufSize)
Parameters
Trip trip – Handle to a trip.
char *buffer – An empty, allocated string buffer that will be filled up with the HOS report.
int bufSize – The number of bytes in the buffer.
Description
Gets the full Hours of Service (HOS) report for a given trip. If the route is HOS compliant, then the report buffer will be left empty. Otherwise, the report will contain one line for each location in the trip where an off-duty stop needs to be inserted. Each line will contain the following information:
1. Time along the route in minutes when an HOS stop must occur. The actual computed drive time to get to an off-duty stop must be less than or equal to this value. For example, if the value is 480 that means an off-duty stop must be inserted such that it takes less than or equal to 480 minutes (8 hours) to reach.
- This value can be used as the end time value of a PCMSFindPOIsAlongRoute search window to find a set of POIs along the route that could be used as the required stop.
- When searching for POIs the user can define the starting point of that window. We recommend setting it to at least one hour before the end value to account for unexpected delays along the route.
2. Minimum duration, in minutes, of the off duty stop required to satisfy the HOS rules. For example, if the value is 30, the stop duration must be at least 30 minutes of off duty time to satisfy the HOS rules.
An example of the report is: "427,30|603,600|1044,30|1205,600". Rest stops are separated by a pipe “|”. Each stop has two numbers separated by a comma. The first number is the time value where the rest stop should be inserted, as indicated by the total time along the route in minutes. (Note that this is an estimated time, it may change after the stop is inserted and the route is run.) The second number is the required stop duration (in minutes).
Return Values
A negative value indicates an error has occurred.
Any other return values indicate how many characters of the HOS report were put into the buffer. If the provided buffer was NULL, the number of characters in the full HOS report will be returned.
Sample Code
int drivingTimeUntilRestBreak = 480; int drivingTimeUntilEOD = 660; int onDutyTimeUntilEOD = 840; int onDutyTimeUntilEOW = 3600; //60 hours PCMSSetHOSAvailableTime(trip,drivingTimeUntilRestBreak,drivingTimeUntilEOD, onDutyTimeUntilEOD, onDutyTimeUntilEOW); PCMSValidateRouteHOS(trip); memset(buffer,0,BUFLEN); PCMSGetHOSRouteReport(trip, buffer,BUFLEN); Log_Pcmstest("PCMSGetHOSRouteReport()----\n %s", buffer);
Supported Since: PC*MILER|Connect 29
Category: Hours of Service