Site
Contents
The APIs below retrieve information about Site events. A Site is a geofence of coordinates around the perimeter of a location, such as a yard or a distribution center. A Site event is triggered when a driver enters or exits that polygon.
Supported Since | Minimum Operating System |
---|---|
CoPilot 10.9.0.1268 | Windows 10, Android 4.1 |
Msg_SiteBoundaryParse
This method is required to retrieve results of a Site event callback. It decodes and retrieves the message ID from a Site event message buffer.
Syntax (Prototyped in alkmsg.h)
long lSiteEventMsgId = Msg_SiteBoundaryParse(const void *pBytes, unsigned long bytes);
Parameters
Parameter | Description |
---|---|
pBytes | The message buffer passed by the system to the user-specified callback function, set by Msg_UpdateOptions(). |
bytes | The size of the message buffer in bytes, passed by the system to the user specified callback function, set by Msg_UpdateOptions(). |
Return Values
- Less than 0 = Unable to allocate message buffer
- Greater than or equal to 0 = Successful, Returned Message ID needed for subsequent calls to Msg_SiteBoundaryGetHeader and Msg_SiteBoundaryGetDetails
Msg_SiteBoundaryGetHeader
This method is required to retrieve results of a Site Event callback. It decodes and retrieves the information using the message ID retrieved from Site event message buffer.
Syntax (Prototyped in alkmsg.h)
long Msg_SiteBoundaryGetHeader(unsigned long lSiteBoundaryMsgId,
unsigned long& rCount,
int& rSiteID,
int& rbIsPublic,
int& rbIsInSite,
char* pSiteName, unsigned long lSiteNameLen,
char* pStreetAddress, unsigned long lStreetAddressLen,
char* pCity, unsigned long lCityLen,
char* pState, unsigned long lStateLen,
char* pPostalCode, unsigned long lPostalCodeLen);
Parameters
Parameter | Description |
---|---|
lSiteBoundaryMsgId | The Message ID of the Site event |
rCount | The number of SiteBoundary details |
rSiteID | The Site ID |
rbIsPublic | Shows the Site is a public place—a Site created by Trimble, not a user—if it has a value of 1. |
rbIsInSite | Shows the driver has entered the Site if it contains a value of 1. |
pSiteName | The Site name |
lSiteNameLen | Length of the Site name message |
pStreetAddress | Address of the Site |
lStreetAddressLen | Length of the address message |
pCity | City of the Site |
lCityLen | Length of the city message |
pState | State of the Site message |
lStateLen | Length of the state message |
pPostalCode | Postal code of the Site |
lPostalCodeLen | Length of the postal code message |
Return Values
- 0 - Unable to find POIAlterMsgID from the cache list
- 1 - Successful
Msg_SiteBoundaryGetDetails
This message is required to retrieve details of the SiteBoundary of a Site event callback. It decodes and retrieves the information using the message ID from a Site Events message buffer.
Syntax (Prototyped in alkmsg.h)
long Msg_SiteBoundaryGetDetails(
unsigned long lSiteBoundaryMsgId,
unsigned long lIndex,
char* pNotes, unsigned long lNotesLen,
int& rGateID,
int& rGateType,
int& rAutoRestriction,
int& rTruckRestriction,
int& rPhysicalLat,
int& rPhysicalLon,
int& rSnapLat,
int& rSnapLon);
Parameters
Parameter | Description |
---|---|
lSiteBoundaryMsgId | Message ID of a Site event |
lIndex | Index of date to retrieve |
pNotes | The details of a Note |
lNotesLen | Length of the Note details |
rGateID | Gate ID |
rGateType | Gate Type |
rAutoRestriction | Autos are restricted for this Gate if the value is 1. |
rTruckRestriction | Trucks are restricted for this Gate if the value is 1. |
rPhysicalLat | The latitude of the Gate |
rPhysicalLon | The longitude of the Gate |
rSnapLat | The latitude of the Gate snapped onto the public road network. |
rSnapLon | The longitude of the Gate snapped onto the public road network. |
Return Values
- 0 - Unable to find lSiteBoundaryMsgId from the cache list
- -1 - Invalid index value
- 1 - Successful