Skip to main content

General Settings

Contents

Msg_SendGenericTextData

Sends a generic data message (Msg_ID_GenericTextData) to CoPilot.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_SendGenericTextData(long lIdentifier,
   long lPayload,
   char *strPayload = 0,
   long stringLen = 0,
   long lRequestID=0,
   long lDestID = CONN_ID_NONE,
   long lSrcID = CONN_ID_NONE,
   bool bAck = false);

Parameters

Parameter Description
lIdentifier Unique identifier whose value is being sent.
lPayload Payload of identifier
strPayload String payload of identifier.
stringLen Length of the strPayLoad.
lRequestID Requested ID, Always pass 0.
lDestID Destination ID received in the callback function established for handling connection event change messages (this callback function is the first parameter passed to Msg_Startup call). Omit or set to CONN_ID_NONE when sending CoPilot control commands to same local machine.
lSrcID Unique ID of the sender of the message. Omit or set to CONN_ID_NONE when sending CoPilot control commands to same local machine.
bAck User acknowledgement, always pass false .

Return Value

  • ≤ 0 - Failed
  • Greater than 0 - Successful

Msg_GenericTextDataGet

Retrieves and decodes information received in a generic text data message (Msg_ID_GenericTextData).

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

char * Msg_GenericTextDataGet(void *pBuffer,
   unsigned long nBytes,
   long &lIdentifier,
   long &lPayload,
   long &lRequestID,
   long &lStrLen);

Parameters

Parameter Description
pBuffer Raw pointer to the buffer received by your callback function (previously set by Msg_UpdateOptions).
nBytes Number of bytes in pBuffer
lIdentifier Unique identifier whose value is being extracted.
lPayload Payload of identifier.
lRequestID Request ID, ignore this parameter.
lStrLen Size of the passing string.

Return Value

Valid char* if string is retrieved successfully otherwise NULL


GenericTextData Identifier Details

The following is a list of identifiers that can be used with this API:

#define Msg_ID_GenericTextData 0xf1000122
#define Msg_IDT_LOADPROFILE 0x0074L

Msg_IDT_LOADPROFILE

This API is use to load the profile. To retrieve all the profiles stored in CoPilot, use Msg_RequestGenericInformation with Msg_IDT_ROUTING_PROFILES.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request (Msg_IDT_LOADPROIFLE):

  • lPayload : Ignore

  • strPayload : Name of the profile to load. Profile must be present in CoPilot.

  • strLength : Length of the strPayload string

  • Once CoPilot received the load profile request, CoPilot will load the profile and provide acknowledgement by Msg_IDT_LOADPROFILE_RESULT.

Notes If profile does not exist in CoPilot, CoPilot will generate an error and send by

Msg_IDT_LOADPROFILE_RESULT.


Msg_RequestGenericInformation

Is the first message to be used in conjunction with Msg_GenericInformation* APIs. Requests information from CoPilot, Msg_ID_GenericInformation. Used to set/get the settings and request generic operation.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_RequestGenericInformation (unsigned long lIdentifier,
                                    long lPayload,
                                    long lDestID = CONN_ID_NONE,
                                    long lSrcID = CONN_ID_NONE);

Parameters

Parameter Description
lIdentifier Unique identifier whose value is being sent.
lPayload Payload of identifier.
lDestID Destination ID received in the callback function established for handling connection event change messages (this callback function is the first parameter passed to Msg_Startup call).
Omit or set to CONN_ID_NONE when sending CoPilot control commands to same local machine.
lSrcID Unique ID of the sender of the message. Omit or set to CONN_ID_NONE when sending CoPilot control commands to same local machine.

Return Value

  • < 0 - Failed to send message to CoPilot

  • 0 - Unable to send message as SDK did not find connection

  • 0 - Successful


Msg_GenericInformationParse

Decodes and retrieves the message ID from a generic information message buffer.

Use Msg_ParserDelete to free the memory when finished with ParserID.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_GenericInformationParse (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 Value

<0 - Unable to allocate message buffer ≥0 - Successful, Returned Message ID needed for subsequent calls to Msg_GenericinformationGetHeader and Msg_GenericinformationGetDetails


Msg_GenericInformationGetHeader

Decodes and retrieves the header information (item counts, message id etc.) from a generic information message buffer.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_GenericInformationGetHeader (unsigned long lMsgId,
     unsigned long &rIdentifier,
     long &rError,
     unsigned long & rCount)

Parameters

Parameter Description
lMsgId Message buffer handle returned by Msg_GenericInformationParse.
rIdentifier Unique identifier whose value is being received.
rError If any error occurred during operation.
rCount Total count.

Return Value

  • 0 - Unable to find MsgID from the cache list | 1 - Successful

Msg_GenericInformationGetDetails

Decodes and retrieves the request specific information from a generic information message buffer.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_GenericInformationGetDetails (unsigned long lMsgId,
                                       unsigned long lIndex,
                                       long &rlInfo1,
                                       long rInfo2,
                                       double &rlInfo3,
                                       double &rInfo4,
                                       char *pInfo5,
                                       unsigned long lInfoLen5,
                                       char *pInfo6,
                                       unsigned long lInfoLen6)

Parameters

Parameter Description
lMsgId Message buffer handle returned by Msg_GenericInformationParse.
lIndex Index of the item.
rInfo1 Returns (long) generic information related to the identifier.
rInfo2 Returns (long) generic information related to the identifier.
rInfo3 Returns (double) generic information related to the identifier.
rInfo4 Returns (double) generic information related to the identifier.
pInfo5 A user-allocated buffer to store generic information related to the identifier.
lInfo5 The size of the user-allocated buffer pointed to by pInfo5.
pInfo6 A user-allocated buffer to store generic information related to the identifier.
lInfo6 The size of the user-allocated buffer pointed to by pInfo6.

Return Value

  • 1 - Unable to find MsgID from the cache list

  • -1 - Invalid index value

  • 1 - Successful


GenericInformation Identifier Details

lIdentifier

#define MSG_ID_GenericInformation    0xf1000125

#define MSG_IDT_MAPDATA              0x0001L
#define MSG_IDT_COUNTRIES            0x0002L
#define MSG_IDT_STATES               0x0003L
#define MSG_IDT_POICATEGORIES        0x0004L
#define MSG_IDT_ITINERARY            0x0005L
#define MSG_IDT_ETADIST              0x0006L
#define MSG_IDT_LANGVOICES           0x0007L
#define MSG_IDT_CURRENT_LANGVOICE    0x0008L
#define MSG_IDT_GEOCODE              0x0009L
#define MSG_IDT_CPVERSION            0x000AL
#define MSG_IDT_CPMEMORY             0x000BL
#define MSG_IDT_COMPLETE_ETADIST     0x000CL
#define MSG_IDT_CO2USAGE             0x000EL
#define MSG_IDT_POIDISPLAYLIST       0x000FL
#define MSG_IDT_ROUTING_PROFILES     0x0017L
#define MSG_IDT_ROUTING_LATLONLIST   0x0018L
#define MSG_IDT_WALKINGMODE          0x0019L
#define MSG_IDT_IMAGE_DRAWER         0x001AL

Msg_IDT_MAPDATA

Returns information which contains region name and their abbreviation.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo1, rInfo2, rInfo3, rInfo4 : Unused

  • pInfo5 : Region Abbreviation

  • pInfo6 : Region Name


Msg_IDT_COUNTRIES

Returns ID, name and ISO code for the map data countries within the region – this does not represent the installed country information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo2, rInfo3, rInfo4 : Unused

  • rInfo1: Country ID

  • pInfo5: Country Name

  • pInfo6: Country ISO-2 code


Msg_IDT_STATES

Returns name and abbreviation for the map data states within the region – this does not represent the installed country information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • lPayload would be the CountryID. User can get the CountryID by requesting country i.e Msg_IDT_COUNTRIES.

Response

  • rInfo1, rInfo2, rInfo3, rInfo4 : Unused

  • pInfo5: State Abbreviation

  • pInfo6: State Name


Msg_IDT_POICATEGORIES

Returns ID and name for the POI categories.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo2, rInfo3, rInfo4, pInfo6 : Unused

  • rInfo1: Category ID

  • pInfo5: Category Name


Msg_IDT_ITINERARY

Returns information to the client application providing the itinerary of turn instructions and street names to the next destination.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1
enum ETurnCode
{
  EStraight = 0,
  ELeft,
  ERight,
  EBearLeft,
  EBearRight,
  ESharpLeft,
  ESharpRight,
  EUTurn,
  EWayPoint,
  EStartPoint,
  EEndPoint,
  EUKRoundAboutStraight,
  EUKRoundAboutLeft,
  EUKRoundAboutRight,
  EUKRoundAboutBearLeft,
  EUKRoundAboutBearRight,
  EUKRoundAboutSharpLeft,
  EUKRoundAboutSharpRight,
  EUKRoundAboutUTurn,
  ERoundAboutStraight,
  ERoundAboutLeft,
  ERoundAboutRight,
  ERoundAboutBearLeft,
  ERoundAboutBearRight,
  ERoundAboutSharpLeft,
  ERoundAboutSharpRight,
  ERoundAboutUTurn,
  ERightSideUTurn,
  EMergeLeft,
  EMergeRight,
  EEUOffRamp,
  EOffRamp,
  EIntermediateStop = 33
};

Request

  • No payload while requesting information

Response

  • rInfo4, pInfo6 : Unused

  • rInfo1: Stop No (-1 in it is not stop no.)

  • rInfo2: Turn code (Any value in ETurnCode)

  • rInfo3: Distance

  • pInfo5: Street name


Msg_IDT_ETADIST

Provides the complete ETA and distance for all destinations. This should be the first request for ETA and distance. For one destination or one off ETA/Dist, needs to use Msg_IDT_ETADIST

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • pInfo5, pInfo6 : Unused

  • rInfo1: Stop No

  • rInfo2: ETA (Absolute ETA in minutes since midnight)

  • rInfo3: ETA (Difference in minutes between current time and ETA)

  • rInfo4: Distance

For subsequent ETA and DIST, use Msg_IDT_COMPLETE_ETADIST

After the trip is completed, before you start a new trip, you no longer require the ETA and distance for the current trip. Use Msg_SendGenericData with Msg_IDT_RELEASE_CACHEMEMORY to release the memory.

Please note the Distance returned will be provided using the same Miles or Kilometers setting currently used within CoPilot. For current unit setting within CoPilot please refer to documentation setting Msg_IDT_DISTUNIT

Crossing Time Zones

All stops are given in local time. Therefore, for a route that contains two stops, and travels across time zones with stop A in time zone X and stop B in time zone Y, then:

  • The ETA for stop A is given in time zone X

  • The ETA for stop B is given in time zone Y


Msg_IDT_COMPLETE_ETADIST

Provides the ETA and distance for the next destination, and should be used for all subsequent requests for ETA and distance. We recommend using Msg_GetTurnDistances instead of Msg_IDT_COMPLETE_ETADIST

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • Response with Message ID “Msg_ID_ETADIST”

Msg_IDT_LANGVOICES

Returns the ID and name for all languages and voices available.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo3, rInfo4 : Unused
  • rInfo1: Language ID for the voice
  • rInfo2: Voice index
  • rInfo3: VoiceStorage (Voice is on device of not - Check eVoiceStorage in alkmsg.cs)
  • pInfo5: Language name
  • pInfo6: Voice Name

Msg_IDT_GEOCODE

If address is geocoded successfully, it will provide stop name, latitude, longitude, address errors, place errors for each geocode request or sending trip. If request is to delete the trip, lError will be Msg_GEORESULT_GENERAL.

If error in geocoding, it will provide stop name and geocode error.

This identifier will be send by CoPilot in the following 2 APIs. By using any of these API, CoPilot will send the Msg_IDT_GEOCODE along with all the description.

  1. Msg_RequestGeocode

  2. Msg_SendTrip

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10

Response

  • rInfo1 : Latitude of the stop (expressed as an integer value in millionths of a degree

  • rInfo2: Longitude of the stop (expressed as an integer value in millionths of a degree)

  • rInfo3: Place errors (It will provide detail information about parsing and mismatch of city/postcode and state). Please find the following table for detail error code.

  • rInfo4: Address errors (It will provide detail information about street parsing and lookup). Please find the following table for detail error code.

  • pInfo5: Stop Name

  • pInfo6 : Unused

Error code: Part of Msg_GenericInformationGetHeader, lError

Identifier Error Code Description
#define Msg_GEORESULT_GENERAL 0x0000L No error
#define Msg_GEORESULT_NODATA 0x0001L No data found
#define Msg_GEORESULT_INSUFPARAM 0x0002L Insufficient parameter
#define Msg_GEORESULT_INVLDOSGRDPAR 0x0003L Invalid OS grid parameter
#define Msg_GEORESULT_INVLDSTRTNAME 0x0004L Invalid street name
#define Msg_GEORESULT_INVLDSTRTTYP 0x0005L Invalid street type
#define Msg_GEORESULT_INVLDSTRTDIR 0x0006L Invalid street directory
#define Msg_GEORESULT_INVLDSTABRV 0x0007L Invalid state abbreviation
#define Msg_GEORESULT_INVLDSTZIP 0x0008L Invalid state/ zip code
#define Msg_GEORESULT_INVLDCITYZIP 0x0009L Invalid city /zip code
#define Msg_GEORESULT_NOTEXCTMATCH 0x000AL No exact match found
#define Msg_GEORESULT_NOMAPDATA 0x000BL No map data for given lat / long
#define Msg_GEORESULT_STATEONLY 0x000CL No city /zip
#define Msg_GEORESULT_BADZIP 0x000DL Postal code in bad format
#define Msg_GEORESULT_UNKNOWNERROR 0x000EL Unknown error
#define Msg_GEORESULT_DIFFADDRLATLONG 0x0010L Given Lat/long and address are >0.5 mile and CoPilot geocoded based on lat/long
#define Msg_GEORESULT_MULTIPLEMATCH 0x00FFL Multiple match found, however CoPilot has chosen the best stop

Success Error code for Place errors (rInfo3):

Identifier Error Value Description
#define SDK_ERR_PLACE_PARSE_NOTOKEN (1<< 0) Input place is empty
#define SDK_ERR_PLACE_PARSE_STATEONLY (1<< 1) Input is missing a city and/or postal code, only has a state
#define SDK_ERR_PLACE_PARSE_BADZIP (1<< 2) Postal code in an unknown format
#define SDK_ERR_BADSTATE (1<< 3) State is in a bad format or is not found in region
#define SDK_ERR_PLACE_CALC_BADZIP (1<< 4) Postal code is in a bad format or not found in region
#define SDK_ERR_PLACE_CALC_BADCITY (1<< 5) City is in a bad format or not found in region
#define SDK_ERR_PLACE_CALC_STATEZIP (1<< 6) Postal code not found in input state/country
#define SDK_ERR_PLACE_CALC_CITYZIP (1<< 7) Postal code not found in input city
#define SDK_ERR_PLACE_CALC_NOEXACT (1<< 8) Exact match for city name not found
#define SDK_ERR_PLACE_CALC_NOZIPS (1<< 9) No postal code found for city, state/country
#define SDK_ERR_PLACE_CALC_NOGRIDS (1<<10) No addresses found for input place
#define SDK_ERR_PLACE_CALC_POBOXNOADDR (1<<11) Input has a PO box postal code but no address
#define SDK_ERR_PLACE_CALC_DIFFADDRLATLONG (1<<12) Input lat/lon is far from input address
#define SDK_ERR_PLACE_CALC_BADSPLC (1<<13) Input SPLC is bad or not found in region

Success Error code for Address errors (rInfo4):

Identifier Error Value Description
#define SDK_ERR_ADDR_PARSE_NOTOKEN (1 << 0) Input address is empty
#define SDK_ERR_ADDR_PARSE_NONUM (1 << 1) Input does not contain a house or building number
#define SDK_ERR_ADDR_PARSE_NONAME (1 << 2) Input does not contain a street name
#define SDK_ERR_ADDR_CALC_NUMRANGE (1 << 3) Location along street is approximate
#define SDK_ERR_ADDR_CALC_NUMPAR (1 << 4) Side of street is uncertain in location returned
#define SDK_ERR_ADDR_CALC_AFXBAD (1 << 5) Multiple errors regarding street prefix/suffix
#define SDK_ERR_ADDR_CALC_TYPBAD (1 << 6) Input street type differs from match
#define SDK_ERR_ADDR_CALC_NAMESPELL (1 << 7) Input street name spelling differs from match
#define SDK_ERR_ADDR_CALC_NAMEMATCH (1 << 8) No match found for input street name
#define SDK_ERR_ADDR_CALC_MULTOK (1 << 9) Multiple best matches found for input
#define SDK_ERR_ADDR_CALC_ZIPMATCH (1 << 10) Postal code differs from match
#define SDK_ERR_ADDR_CALC_ZIPCENT (1 << 11) Location is postal code centroid
#define SDK_ERR_ADDR_CALC_NUMUNKNOWN (1 << 12) Location along street returned is unknown

Note

  • All Latitude and Longitude values are sent as long integers. These values are encoded as millionths of a degree. North and East are positive values, South and West are negative values. For example, the Trimble Maps London office is located at 0.122805W & 51.518220N so it should be pass as a -122805 longitude & 51518220 latitude.

  • If geocode successfully, lError will contain Msg_GEORESULT_GENERAL or Msg_GEORESULT_DIFFADDRLATLONG or Msg_GEORESULT_MULTIPLEMATCH as well contain the place errors and address errors.

  • If any error on geocode, lError will contain geocoding error except Msg_GEORESULT_GENERAL or Msg_GEORESULT_DIFFADDRLATLONG or Msg_GEORESULT_MULTIPLEMATCH. It will not contain any address or place error.


Msg_IDT_CPVERSION

Provides the CoPilot version number.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo1, rInfo2, rInfo3, rInfo4, pInfo6: Unused

  • pInfo5: CoPilot version string


Msg_IDT_CPMEMORY

Returns CoPilot memory usage information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo4, pInfo5, pInfo6: Unused

  • rInfo1: Memory Load between 0 and 100 (0 indicates no memory consumption and 100 indicates full memory consumption)

  • rInfo2: Available physical memory(KB) to CoPilot

  • rInfo3: Available virtual memory(KB) to CoPilot

Example

//Request to retrieve county list
Msg_RequestGenericInformation(MSG_IDT_COUNTRIES, 0);

//Receiving side either by callback or through message queue //mechanism
if ( msgID == MSG_ID_MSG_ID_GenericInformation)
{
    long lMsgId = Msg_GenericInformationParse (pBytes,bytes);

    //Get Header information like identifier, error, count
    Msg_GenericInformationGetHeader (lMsgId, &rIdentifier, &rError, &rCount)

    switch (rIdentifier)
    {
        case MSG_IDT_MAPDATA;
        break;

        case MSG_IDT_STATES;
        break;

        case MSG_IDT_COUNTRIES:
        //Retrieve individual information
        for(int index=0; index<rCount; index++)
        {
            Msg_GenericInformationGetDetails(lMsgId, index,_.);
        }
        break;
    }
    Msg_ParserDelete(lMsgId);
}

Msg_IDT_ROUTING_PROFILES

Retrieve all the profiles in CoPilot. Use Msg_SendGenericTextData with Msg_IDT_LOADPROFILE to load the profile.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo1: Value 1 to show that current profile is active in CoPilot else -1

  • rInfo6: Name of the Routing Profile stored in CoPilot

  • rInfo2, rInfo3, rInfo4, rInfo6 : Unused


Msg_IDT_ROUTE_LATLONLIST

Retrieve lat/lon values (expressed as an integer value in millionths of a degree) for a calculated route in CoPilot. This could be used to plot the planned route onto an external mapping system for later review of CoPilot’s planned route.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Request

  • No payload while requesting information

Response

  • rInfo1: Latitude

  • rInfo2: longitude

  • rInfo3: Unused

  • rInfo4: Unused

  • pInfo5: Unused

  • pInfo6: Unused

Note

For a calculated long route, a high number of lat/lon pairs will be returned by CoPilot. It is recommended that one should not iterate through every lat/lon pair as it will not add value to the data representation and will negatively impact performance. For long routes one can programmatically iterate every nth lat/lon pair. The table below illustrates the number of lat/lon pairs returned for routes of varying distances.

This API can be use in coordination with Msg_SendManagedRoute. This API can retrieve lat/long for the given route which can be pass to Msg_SendManagedRoute to verify the that Msg_SendManagedRoute follows exactly same route for test environment.

TRIP Trip Calculation Time Mileage in miles ETA in hours LAT/LONG generated Time to generate Lat/Long
London Bloomsbury to Hatton Garden 2 s 0.8 00:03 43 instantly
London to Glasgow 10 s 399.9 07:16 2390 30 s
Berlin to Toulouse 1 min 1071.1 18:39 5037 2 min

Msg_IDT_IMAGE_DRAWER

This identifier provides result of the API Msg_DrawImageAtCoordinates, Msg_DeleteAllCategory and Msg_DeleteCategory which uses to add/delete the image drawer category to the CoPilot.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10

Response

  • rInfo1: Error code. Please see the following description
  • rInfo2: Unused
  • rInfo3: Unused
  • rInfo4: Unused
  • pInfo5: Unused
  • pInfo6: Unused

Error codes

#define Msg_IMAGE_DRAWER_SUCCESS          0x0000L
#define Msg_IMAGE_DRAWER_FAILED           0x0001L
#define Msg_IMAGE_DRAWER_CATEGORY_EXIST   0x0002L
#define Msg_IMAGE_DRAWER_INVALID_CATEGORY 0x0003L
#define Msg_IMAGE_DRAWER_INVALID_POINTS   0x0004L
#define Msg_IMAGE_DRAWER_INVALID_IMAGE    0x0005L
Error Code Description
Msg_IMAGE_DRAWER_SUCCESS Image drawer category added/deleted successfully.
Msg_IMAGE_DRAWER_FAILED CoPilot failed to delete single or all image drawer category.
Msg_IMAGE_DRAWER_CATEGORY_EXIST bOverWrite pass as a false and image drawer category is already exist, it will return this error code.
Msg_IMAGE_DRAWER_INVALID_CATEGORY Category name is invalid or blank. For Msg_DeleteCategory, category is not exist in CoPilot.
Msg_IMAGE_DRAWER_INVALID_POINTS Format of the lat/longs points are incorrect or lat/longs are not being passed
Msg_IMAGE_DRAWER_INVALID_IMAGE Image name is incorrect or not in proper format.

Msg_IDT_POLYGON_PROPERTY

This identifier provides result of the API Msg_GetPolygonSetProperty, Msg_GetPolygonProperty, Msg_SetPolygonSetProperty and Msg_SetPolygonProperty which uses to set/get the property of the PolygonSet and Individual Polygon.

Supported Since Minimum Operating System
CoPilot 9.6 Windows 10

Response

  • rInfo1: Identifier. Please see the following description.
  • rInfo2: Result of the operation. Please see the following description.
  • rInfo3: Unused
  • rInfo4: Unused
  • pInfo5:
  • pInfo6: Unused

Identifier

#define Msg_IDT_GETPOLYGONSETPROPERTY_RESULT   0x0001
#define Msg_IDT_GETPOLYGONPROPERTY_RESULT      0x0002
#define Msg_IDT_SETPOLYGONSETPROPERTY_RESULT   0x0003
#define Msg_IDT_SETPOLYGONPROPERTY_RESULT      0x0004
Error Code Description
Msg_IDT_GETPOLYGONSETPROPERTY_RESULT This will be return in context of Msg_GetPolygonSetProperty.
Msg_IDT_GETPOLYGONPROPERTY_RESULT This will be return in context of Msg_GetPolygonProperty.
Msg_IDT_SETPOLYGONSETPROPERTY_RESULT This will be return in context of Msg_SetPolygonSetProperty.
Msg_IDT_SETPOLYGONPROPERTY_RESULT This will be return in context of Msg_SetPolygonProperty.

Results

#define Msg_IDT_POLYGONSUCCESS           0
#define Msg_IDT_POLYGONOBJNOTFOUND      -1
#define Msg_IDT_POLYGONPROPNOTFOUND     -2
#define Msg_IDT_POLYGONPROPVALUEINVALID -3
Error Code Description
Msg_IDT_POLYGONSUCCESS Success
Msg_IDT_POLYGONOBJNOTFOUND Requested polygon not found in CoPilot
Msg_IDT_POLYGONPROPNOTFOUND Requested polygon property not found in CoPilot
Msg_IDT_POLYGONPROPVALUEINVALID Invalid property value.

Msg_CreateGenericInformation

Creates a generic message with a particular ID to be sent from client application to CoPilot to change the current settings for language, voice, lane assist and POI categories to be displayed.

Create the generic data message (Msg_ID_GenericInformation) to be sent to CoPilot.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Note

This call should be followed by Msg_GenericInformationAddDetail and then by Msg_SendGenericInformation

Use Msg_ParserDelete to free the memory when finished with ParserID.

Syntax (Prototyped in alkmsg.h)

long Msg_CreateGenericInformation (unsigned long lIdentifier)

Parameters

lIdentifier: Unique identifier whose value is being sent.

Acceptable Values

Identifier:

#define Msg_IDT_LANEASSIST        0x0049L
#define Msg_IDT_SPEEDLIMIT        0x004CL
#define Msg_IDT_CURRENT_LANGVOICE 0x0008L
#define Msg_IDT_POIDISPLAYLIST    0x000FL
#define Msg_IDT_WALKINGMODE       0x0019L

Return Value

Long value (lMsgID) that is to be used in the Msg_GenericInformationAddDetail and Msg_SendGenericInformation call.


Msg_GenericInformationAddDetail

Encodes the information and adds it to the Msg ID returned from the Msg_CreateGenericInformation. Please note this API is Available within CoPilot V9 and CoPilot V10, further details are included within each parameter detailing the CoPilot versions that they are supported in.

Add details to the data buffer created using Msg_CreateGenericInformation.

Note

This call should be followed by Msg_SendGenericInformation.

Syntax (Prototyped in alkmsg.h)

long Msg_GenericInformationAddDetail(unsigned long lMsgId,
   long rInfo1,
   long rInfo2,
   double rInfo3,
   double rInfo4,
   const char *pInfo5,
   const char *pInfo6)

Parameters

Parameter Description
lMsgID Same ID that is returned by Msg_CreateGenericInformation
rInfo1 Long value associated with the message (lMsgID)
rInfo2 Long value associated with the message (lMsgID)
rInfo3 Double value associated with the message (lMsgID)
rInfo4 Double value associated with the message (lMsgID)
pInfo5 Text value associated with the message (lMsgID)
pInfo6 Text value associated with the message (lMsgID)

MSG_IDT_SPEEDLIMIT

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

rInfo1: Corresponds to show speed limit in CoPilot speed limit setting screen Query = -1 [Query the current setting] Turn Off = 0 [Don’t show speed limit] Turn On = 1 [Always Show Speed Limit]

rInfo2: Corresponds to show speed warning in CoPilot setting screen Query = -1 [Query the current setting] Turn Off = 0 [Don’t show speed limit warning] Turn On = 1 [Always Show Speed Limit warning]

rInfo3: Corresponds to allowed values for speed warning distance

rInfo4: Corresponds to Sound warning in CoPilot speed limit setting screen Query = -1 [Query the current setting] Turn Off = 0 [Don’t show speed limit sound warning] Turn On = 1 [Always Show Speed limit sound warning]

pInfo5, pInfo6: null (not used)

Return Value

Returns the message with Msg_IDT_SPEEDLIMIT identifier containing current settings.

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete.

rInfo1: current speed limit settings in CoPilot

Turn Off = 0 [Don’t show speed limit] Turn On = 1 [Always Show Speed Limit]

rInfo2: current speed warning setting CoPilot

Turn Off = 0 [Don’t show speed limit warning] Turn On = 1 [Always Show Speed Limit warning] rInfo3: current speed limit threshold setting rInfo4: current speed limit Sound warning setting in CoPilot Turn Off = 0 [Don’t use speed limit sound warning] Turn On = 1 [Always use Speed limit sound warning]

pInfo5, pInfo6: null (not used)

Note

  1. if rInfo1, rInfo2 , rInfo3 or rInfo4 is -1 then it returns the current Settings

  2. Use Msg_Subscribe with (Msg_Id_OverSpeedLimitEvent) in the application to get the message as an event .

// For querying the acceptable value by CoPilot
uint lMsgID = (uint) Msg.Msg_CreateGenericInformation(Msg.MSG_IDT_SPEEDLIMIT);
Msg.Msg_GenericInformationAddDetail(lMsgID, -1, -1, -1, 0, null, null);
Msg.Msg_SendGenericInformation(lMsgID, -1, -1)
Msg.Msg_ParserDelete(lMsgID);

Please refer to the Sample Application for further explanation.


Msg_IDT_CURRENT_LANGVOICE

Enables the ability to change the current language and voice set within CoPilot.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Parameters

Parameter Description
rInfo1 language ID
rInfo2 not used
rInfo3 not used
rInfo4 not used
rInfo5 not used
rInfo6 “voice name”

Error Codes

rError: -1 If user selected the voice which is not downloaded on device it will give this error rError: 0 Language/voice successfully set

Note

Use Msg_IDT_LANGVOICES for finding the acceptable values of language ID and “voice name” [Voice name is case sensitive]

Example –

Msg.Msg_RequestGenericInformation(Msg.MSG_IDT_LANGVOICES, -1, -1, -1);

Pass langID as -1 for querying current settings

Return Value

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete. rInfo1: language ID rInfo2: voice ID rInfo3: not used rInfo4: not used rInfo5: “Language name” rInfo6: “voice name”

Example –

private void OnGenericInformation(uint pData, uint bytes)
{
    uint lMsgID = (uint)Msg.Msg_CreateGenericInformation(Msg.MSG_IDT_LANEASSIST);
    Msg.Msg_GenericInformationAddDetail(lMsgID, -1, 0, 0, 0, null, null);
    Msg.Msg_SendGenericInformation(lMsgID, -1, -1);
    Msg_ParserDelete(lMsgID);
}

Please refer to the Sample Application for further explanation.


Msg_IDT_LANEASSIST

Enables the ability to change the current setting to show or not show the Lane Assist information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Parameters

Parameter for Msg_GenericInformationAddDetail

Parameter Description
lMsgID lMsgID returned by Msg_CreateGenericInformation (identifier Msg_IDT_LANEASSIST)
rInfo1 0 if don’t show lane assist 1 if show lane assist -1 it will return current lane assist settings
rInfo2 not used (pass 0)
rInfo3 Value for ShowLaneAssistDistances
rInfo4 Value for HindLaneAssistDistances
rInfo5 Not used (pass null)
rInfo6 Not used (pass null)

Return Value

Returns the message with Msg_IDT_LANEASSIST identifier containing current settings

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete.

rInfo1. rInfo3 and rInfo 4 will have the return value.

Note – For acceptable values of rInfo3 and rInfo4, use

private void OnGenericInformation(uint pData, uint bytes)
{
uint MsgID = (uint)Msg.Msg_GenericInformationParse(pData, (uint)bytes);
Msg.Msg_GenericInformationGetHeader(MsgID, out identifier, out error, out itemCount);
Msg.Msg_GenericInformationGetDetails(MsgID, 1, out languageVoice.languageID, out languageVoice.voiceID,
                                     out fTemp, out fTemp, language, 100, voice, 100);

Msg.Msg_ParserDelete(MsgID);
}

Please refer to the Sample Application for further explanation.


Msg_IDT_POIDISPLAYLIST

Enables the ability to change the current settings for POI categories being displayed on screen to the end user.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Parameters

Parameter for Msg_GenericInformationAddDetail

Parameter Description
lMsgID lMsgID returned by Msg_CreateGenericInformation (identifier Msg_IDT_LANEASSIST)
rInfo1 POI Category ID
rInfo2 0 Don’t Display Category 1 Display Category
rInfo3 Not used
rInfo4 Not used
rInfo5 Not used (pass null)
rInfo6 Not used (pass null)

If the client application needs to query the current POI list being displayed, please do not use Msg_GenericInformationAddDetail. Instead you should use CreateGenericInformation followed by Msg_SendGenericInformation.

Return Value

returns the message with Msg_IDT_POIDISPLAYLIST identifier containing current settings

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete.

Note

private void OnGenericInformation(uint pData, uint bytes)
{
    //Example: query current POI display list with flag
    uint lMsgID = (uint)Msg.Msg_CreateGenericInformation(Msg.MSG_IDT_POIDISPLAYLIST);
    Msg.Msg_GenericInformationAddDetail(lMsgID, 5, 1, 0, 0, null, null);
    Msg.Msg_SendGenericInformation(lMsgID, -1, -1);
    Msg.Msg_ParserDelete(lMsgID);
}

Please refer to the Sample Application for further explanation.


Msg_IDT_WALKINGMODE

This identifier allows to query the current state of walking mode as well set the walking mode in CoPilot.

Supported Since Minimum Operating System
CoPilot 9.2, Deprecated CoPilot 10 Windows 10, Android 4.1

Parameters

Parameter for Msg_GenericInformationAddDetail

Parameter Description
lMsgID lMsgID returned by Msg_CreateGenericInformation (identifier Msg_IDT_WALKINGMODE)
rInfo1 Walking mode status -1 Query the current status 1 Set the CoPilot in walking mode
rInfo2 Breadcrumb Status -1 Query the current status 0 Don’t Show walking Breadcrumb 1 Show walking Breadcrumb
rInfo3 Not used
rInfo4 Not used
rInfo5 Not used (pass null)
rInfo6 Not used (pass null)

Return Value

Returns the message with Msg_IDT_WALKINGMODE identifier containing current settings

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete.

Note

You can not disable the walking mode. In order to change from walking mode to other profile, please use Msg_SendRoutingProfile or Msg_SendTruckRoutingProfileEx.

Please refer to the Sample Application for further explanation.


Msg_IDT_POI_ALERT_SETTINGS

This identifier allows to query the current state of poi alert settings as well as set POI alert settings in CoPilot.

Supported Since Minimum Operating System
CoPilot 9.6 Windows 10, Android 4.1

Parameters

Parameter for Msg_GenericInformationAddDetail

Parameter Description
lMsgID lMsgID returned by Msg_CreateGenericInformation (identifier Msg_IDT_POI_ALERT_SETTINGS)
rInfo1 A POI category ID for which to enable POI alerts
rInfo2 Whether POI alert settings are enabled or disabled -1 Query the current status 0 Disable POI alerts 1 Enable POI alerts
rInfo3 Whether to alert of POIs along the route or near the route -1 Query the current status 0 On Route 1 Near Route
rInfo4 The distance away a POI must be before an alert for it is sent -1 Query the current setting 0 2/10ths mile 1 ½ mile 2 1 mile 3 3 miles 4 10 miles 5 26 miles 6 ½ kilometer 7 1 kilometer 8 2 kilometers 9 5 kilometers 10 16 kilometers 11 40 kilometers
rInfo5 Not used (pass null)
rInfo6 Not used (pass null)

Return Value

Returns the message with Msg_IDT_POI_ALERT_SETTINGS identifier containing current settings

Use Msg_GenericInformationParse, Msg_GenericInformationGetHeader, Msg_GenericInformationGetDetail and Msg_ParserDelete.


Msg_IDT_SUSPEND_NAVIGATION

Suspends navigation in CoPilot. Guidance will stop and the current position will not be updated, but the GPS receiver will continue to run in the background.

Supported Since Minimum Operating System
CoPilot 9.6 Windows 10, Android 4.1
#define Msg_IDT_SUSPEND_NAVIGATION = 0x001DL

Parameters

Parameter for Msg_GenericInformationAddDetail

Parameter Description
lMsgID lMsgID returned by Msg_CreateGenericInformation (identifier Msg_IDT_SUSPEND_NAVIGATION)
rInfo1 0 to enable navigation, 1 to disable navigation

Motion Lock

Msg_IDT_MOTIONLOCK

Motion lock is enabled when traveling above a set speed the interaction with the CoPilot UI is restricted. Different modes dictate the level of restriction which is enforced when traveling above a defined threshold speed.

Supported Since Minimum Operating System
CoPilot 10.9.0 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

int Msg_SendGenericData(int lIdentifier, int lPayload, int lDestID, int lSrcID);

Parameters

Parameter Value Description
lIdentifier MSG_IDT_MOTIONLOCK_MODECHNG Change the motion lock mode
lIdentifier MSG_IDT_MOTIONLOCK_MODE Get current motion lock mode
lIdentifier MSG_IDT_MOTIONLOCK_SPEEDTHRESHOLDCHNG Change the motion lock engage speed limit
lIdentifier MSG_IDT_MOTIONLOCK_SPEEDTHRESHOLD Get current motion lock engage speed limit
lPayload ALL_UI_UNLOCK Unlock all UI, do not lock any UI elements when traveling above the threshold speed.
lPayload
lPayload
lPayload
lPayload
Mode Description
ALL_UI_UNLOCK Unlock all UI, do not lock any UI elements when traveling above the threshold speed.
ALL_UI_LOCK Lock all UI when traveling above the defined threshold speed. This will also disable all pop ups except for the destination arrival pop up. All action required pop-ups have a default decision which will be followed if they are shown.
ONLY_DRIVING_UI_ACCESS Only allow access to driving functions. This will Lock access to the entire UI with the exception of the following:

Driving Menu → 2D/3D
Driving menu → Directions/Safety
Driving Menu → Clear Destination
Driving Menu → Close
Zoom buttons on map
Reset to current location button on map
POI Alert button on map
Popups
Map drag/swipe/pan/multi touch
Sound mute button
Mapsure button on navigation dialog

This is the default mode available within the CoPilot UI.

ONLY_DRIVING_UI_ACCESS_EXTEND ONLY_DRIVING_UI_ACCESS plus access to the following (disable keyboard):

Driving Menu → Find POIs
Main POI categories
Search All
More Categories
Driving Menu → My Route → Alternate
Go (Green circular button on plan trip screen)
Traffic Bar and traffic refresh button
Buttons in flow traffic map except for the setting button

PASSENGER_MODE Allow a temporary disablement of Motion Lock when used by a passenger. Motion Lock settings should be resumed upon restarting CoPilot.
When this mode is set, all UI will be unlocked. Once the application is re-launched CoPilot will resume in the previous MotionLock mode.
To enable this mode the following configuration is required to be set within the user.cfg:

[User Settings]
“EnablePassengerMode”=1

Once this is set this mode being passed will replicate the user selecting the passenger mode button within the UI.


Msg_SendGenericInformation

Sends a generic message with a particular ID to be sent from client application to CoPilot to change the current settings for language, voice, lane assist and POI categories to be displayed.

Sends the data buffer created by Msg_CreateGenericInformation

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_SendGenericInformation(unsigned long lMsgId,
                                long lDestID,
                                long lSrcID)

Parameters

Parameter Description
lMsgId Same ID that is returned by Msg_CreateGenericInformation
lDestID -1
lSrcID -1

Return Value = 1 if successful otherwise 0

Note

This should be used with Msg_CreateGenericInformation and Msg_GenericInformationAddDetail

Example

private void OnGenericInformation(uint pData, uint bytes)
{
    uint lMsgID = (uint)Msg.Msg_CreateGenericInformation(Msg.MSG_IDT_LANEASSIST);
    Msg.Msg_GenericInformationAddDetail(lMsgID, -1, 0, 0, 0, null, null);
    Msg.Msg_SendGenericInformation(lMsgID, -1, -1);
    Msg_ParserDelete(lMsgID);
}

Please refer to the Sample Application for further explanation.


Msg_GetVersionInfo

Decodes the version information received from CoPilot in response to a Msg_RequestVersionInfo() call. In order to receive a response from Msg_RequestVersionInfo(), establish a callback using Msg_UpdateOptions() with message ID Msg_ID_VersionInfo, and then use this API to decode the version information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

SDK_EXPORT long _CONVENTION Msg_GetVersionInfo(const void *pBuffer,
   unsigned long lBufLen,
   char *pCopilotVersion,
   unsigned long lCopilotVersionLen,
   char* pDataVersion,
   unsigned long lDataVersionLen,
   char *pCityVersion,
   unsigned long lCityVersionLen,
   char *pPOIVersion,
   unsigned long lPOIVersion);

Parameters

Parameter Description
pBuffer The message buffer passed by the system to the user-specified callback function, set by Msg_UpdateOptions().
lBufLen The size of the message buffer in bytes, passed by the system to the user specified callback function, set by Msg_UpdateOptions().
pCopilotVersion A user-allocated buffer to store CoPilot version
lCopilotVersionLen Length of the buffer to hold CoPilot version
pDataVersion A user-allocated buffer to store data version
lDataVersionLen Length of buffer to hold data version
pCityVersion A user-allocated buffer to store city version
lCityVersionLen Length of buffer to hold city version
pPOIVersion A user-allocated buffer to store POI version
lPOIVersionLen Length of buffer to hold POI Version

Return Value

  • = 0 Failed

  • 0 Success


Msg_RequestVersionInfo

This API is used to request CoPilot, Data, City and POI version information. To receive the response, establish a callback using Msg_UpdateOptions() for message ID Msg_ID_VersionInfo, and then within the callback use Msg_GetVersionInfo() to decode the version information.

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1

Syntax (Prototyped in alkmsg.h)

long Msg_RequestVersionInfo(long lDestID = CONN_ID_NONE,
                            long lSrcID = CONN_ID_NONE);

Parameters

Parameter Description
lDestID Always use CONN_ID_NONE
lSrcID Always use CONN_ID_NONE

Return Value

  • = 0 - Failed

  • 0 - Success


Msg_ID_VoiceEvent

Related to Msg_Subscribe. Raises an event with message identifier Msg_ID_VoiceEvent, when CoPilot voice instruction is being played. See also Msg_IDT_TURNINSTRUCTIONALERT

Supported Since Minimum Operating System
CoPilot 9.2 Windows 10, Android 4.1
Last updated February 13, 2024.