Skip to main content

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 SinceMinimum Operating System
CoPilot 10.9.0.1268Windows 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

ParameterDescription
pBytesThe message buffer passed by the system to the user-specified callback function, set by Msg_UpdateOptions().
bytesThe 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

ParameterDescription
lSiteBoundaryMsgIdThe Message ID of the Site event
rCountThe number of SiteBoundary details
rSiteIDThe Site ID
rbIsPublicShows the Site is a public place—a Site created by Trimble, not a user—if it has a value of 1.
rbIsInSiteShows the driver has entered the Site if it contains a value of 1.
pSiteNameThe Site name
lSiteNameLenLength of the Site name message
pStreetAddressAddress of the Site
lStreetAddressLenLength of the address message
pCityCity of the Site
lCityLenLength of the city message
pStateState of the Site message
lStateLenLength of the state message
pPostalCodePostal code of the Site
lPostalCodeLenLength 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

ParameterDescription
lSiteBoundaryMsgIdMessage ID of a Site event
lIndexIndex of date to retrieve
pNotesThe details of a Note
lNotesLenLength of the Note details
rGateIDGate ID
rGateTypeGate Type
rAutoRestrictionAutos are restricted for this Gate if the value is 1.
rTruckRestrictionTrucks are restricted for this Gate if the value is 1.
rPhysicalLatThe latitude of the Gate
rPhysicalLonThe longitude of the Gate
rSnapLatThe latitude of the Gate snapped onto the public road network.
rSnapLonThe 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
Last updated April 12, 2023.
Contents