开发 AIoT 智能眼镜SDK 开发指南 与高德地图App建联

IPC Link ErrorCode 最后更新时间: 2026年08月27日

建联Error Code

typedef NS_ENUM(NSInteger, AMapIPCLinkErrorCode) {
    AMapIPCLinkStartSocketFailed                = 100,  //创建Socket失败
    AMapIPCLinkUnvalibleHostOrPort              = 101,  //无效host或port 可尝试重新授权
    AMapIPCLinkConnectTerminated                = 102,  //link异常断联 DisconnectWithError,具体错误信息参考(AMapLinkSocketErrorCode) userInfo[connectErrorCode]
    AMapIPCLinkReConnectionToMaxRetry           = 103,  //重联达到次数 按需决定是否启动重联
    
    AMapIPCLinkReturnParseFailed                = 200,  //返回数据解析失败
    AMapIPCLinkReadDataError                    = 201,  //读数据异常
    AMapIPCLinkReadDataLengthLimit              = 202,  //所读数据长度小于2字节
    AMapIPCLinkReadDataDecryptyError            = 203,  //读取数据解密失败,可尝试重新授权
    
    AMapIPCLinkNotConnectWhileSend              = 300,  //发送数据时无链接
    AMapIPCLinkNotNullableSendData              = 301,  //发送内容不能为空
    AMapIPCLinkWriteDataEecryptyError           = 302,  //写入数据加密失败
    
    AMapIPCLinkNotFoundPort                     = 1001, // 端口缓存不存在
    AMapIPCLinkNotFoundPortExpiredTime          = 1002, // 端口缓存已过期
};

AMapIPCLinkConnectTerminated 时,对应userInfo中 Error Code

typedef NS_ENUM(NSInteger, AMapLinkSocketErrorCode) { // 更多错误码参考 errno.h
    AMapLinkSocketNoError                    = 0,   // Never used
    AMapLinkSocketBadConfigError             = 1,   // Invalid configuration
    AMapLinkSocketBadParamError              = 2,   // Invalid parameter was passed
    AMapLinkSocketTimeoutError               = 3,   // A connect operation timed out
    AMapLinkSocketReadTimeoutError           = 4,   // A read operation timed out
    AMapLinkSocketWriteTimeoutError          = 5,   // A write operation timed out
    AMapLinkSocketReadMaxedOutError          = 6,   // Reached set maxLength without completing
    AMapLinkSocketClosedError                = 7,   // The remote peer closed the connection
    AMapLinkSocketOtherError                 = 8,   // Description provided in userInfo
    AMapLinkSocketTimeout                    = 60,   // Operation timed out, 可能server未开启
    AMapLinkSocketConnRefused                = 61,   // Connection refused 连接被拒绝,可能server未开启
    AMapLinkSocketHostDown                   = 64,   // Host is down 主机关闭,可能server未开启
    AMapLinkSocketHostUnReach                = 65,   // No route to host 无法到达主机,可能server未开启
};

授权Error Code

typedef NS_ENUM(NSInteger, AMapAuthorizationErrorCode) {
    AMapAuthorizationErrorAppAuthSuccess = 1, // APP授权成功
    AMapAuthorizationErrorInvalidAPIKey,      // 无效的apiKey
    AMapAuthorizationErrorMissingAPIKey,      // 缺少apiKey
    AMapAuthorizationErrorNetworkFailed,      // 校验apikey网络异常
    AMapAuthorizationErrorAppNotInstalled,    // 请求授权APP未安装
    AMapAuthorizationErrorAppOpenFailed,      // APP跳转APP失败
    AMapAuthorizationErrorAppAuthFailed,      // APP授权失败
};

算路失败ErrorCode定义

enum RequestState {
    RequestStateDecoderUninited                 = 0,        //!< 解码器未初始化
    RequestStateSuccess                         = 1,        //!< 路径计算成功
    RequestStateNetworkError                    = 2,        //!< 网络错误
    RequestStateStartPointError                 = 3,        //!< 起点不在支持范围内
    RequestStateIlleageProtocol                 = 4,        //!< 请求协议非法
    RequestStateCallCenterError                 = 5,        //!< 从呼叫中心获取信息失败
    RequestStateEndPointError                   = 6,        //!< 终点不在支持范围内
    RequestStateEncodeFailure                   = 7,        //!< 服务端编码失败
    RequestStateLackPreviewData                 = 8,        //!< 缺少概览数据
    RequestStateBufferError                     = 9,        //!< 数据格式错误
    RequestStateStartNoRoad                     = 10,       //!< 起点抓路失败
    RequestStateEndNoRoad                       = 11,       //!< 终点抓路失败
    RequestStateHalfwayNoRoad                   = 12,       //!< 途经点抓路失败
    RequestStateUnkonw                          = 13,       //!< 在线算路失败
    RequestStateOfflineRouteFailure             = 14,       //!< 离线算路失败
    RequestStateUserCancel                      = 15,       //!< 用户取消算路
    RequestStateNetworkTimeout                  = 16,       //!< 网络请求超时
    RequestStateNoNewwork                       = 17,       //!< 无网络连接
    RequestStateLackStartCityData               = 18,       //!< 起点所在城市无数据
    RequestStateTooFar                          = 19,       //!< 相邻两个行程点直接距离过长
    RequestStateLackWayCityData                 = 20,       //!< 途经城市缺少数据
    RequestStateViaPointError                   = 21,       //!< 中途点不在支持范围内
    RequestStateUpdatingData                    = 22,       //!< 正在更新数据
    RequestStateSlilentRouteNotMeetCriteria     = 23,       //!< 静默算路不满足条件:限时禁行、道路关闭、车牌限行
    RequestStateLackEndCityData                 = 24,       //!< 终点所在城市无数据
    RequestStateLackViaCityData                 = 25,       //!< 途经点所在城市无数据
    RequestStateoOfflineRouteCalculating        = 26,       //!< 离线算路正在进行中,无法进行新的计算
    RequestStateoOfflineRouteParamError         = 27,       //!< 离线算路参数错误,无法进行新的计算
    RequestStateNoRouteEncode                   = 28,       //!< 没有路线被编码
    RequestStateNoBackupRoute                   = 29,       //!< 多路线模式(routemode=14)下没有算出备选路
    RequestStateMainRouteEmptyOrRestoreFail     = 30,       //!< 多路线模式(routemode=14)主路线ID列表为空或者还原失败
    RequestStateDynamicRouteNoBetter            = 31,       //!< 动态导航没有算出更优路线
    RequestStateNoBetterAbnormalBackupRoute     = 32,       //!< 异常动作引起的更新备选路,算出来的路依然没有消除异常动作
    RequestStateNoBetterFastBackupRoute         = 33,       //!< 前方拥堵引起的备选路更新,没有更好的能躲避拥堵的路线
    RequestStateNoSaferRoute                    = 34,       //!< 前方有危险事件 (routemode=22) 引起的重算时,没有算出安全的路线
    RequestStateCalcRouteTimeOut                = 35,       //!< 算路超时
    RequestStateParallelRouteFail               = 36,       //!< 主辅路线或高架上下切换失败
    RequestStateRestoreFail                     = 37,       //!< 服务路线还原失败。guide及多次请求会返回此错误
    RequestStateMultiViaRouteFail               = 61,       //!<多途径点超限算路失败
    RequestStateHaveHighLevelTaskWorking        = 64,       //!< 算路当前有更高优先级的任务进行中,不能开始低优先级算路
    RequestStateNotSrpportInternational         = 70,       //!< 不支持跨国规划(起终点在不同国家)
    RequestStateCustomRouteWishFail             = 71,       //!< 自定义路线想走场景交补失败,无路线
    RequestStateNotAllowSwitchOfflineOnRefresh  = 72,       //!< 手动刷新算路时,在线算路不允许切离线
    RequestStateStartEndRegionNotSupport        = 80,       //!< 国际图不支持起终点区域
    RequestStateStartRegionNotSupport           = 81,       //!< 国际图不支持起点区域
    RequestStateEndRegionNotSupport             = 82,       //!< 国际图不支持终点区域
    RequestStateViaRegionNotSupport             = 83,       //!< 国际图不支持途径点区域
    RequestStateStartNoSupportElectricBike      = 101,      //!< 起点不支持电动自行车算路
    RequestStateEndNoSupportElectricBike        = 102,      //!< 终点不支持电动自行车算路
    RequestStateCrossCityNoSupportMotorcycle    = 201,      //!< 不支持跨城市规划摩托车路线
    RequestStateCityNoSupportMotorcycle         = 202,      //!< 所在城市不支持摩托车算路
    RequestStateUncompressFail                  = 301,      //!< 解压失败
    RequestStateCanNotFoundPathIDInFirst        = 302,      //!< 二次算路中的pathID在首次中找不到
    RequestStatePBPathNumIsNotEqualToFirst      = 303,      //!< 二次下行协议中的路线个数和首次不一致
    RequestStateODDError                        = 304,      //!< ODD 下发失败
    RequestStateDataException                   = 305,      //!< 数据异常
    RequestStateViaPointNumIllegal              = 306,      //!< 途经点数目非法(离线算路判断途经点数量超过3个时返回)
    RequestStateLanePathDataEmpty               = 350,      //!< lanePath数据为空
    RequestStateLanePathDecodeFail              = 351,      //!< lanePath解析失败
    RequestStateLanePathCodeError               = 352,      //!< lanePath返回码非0
    RequestStateLanePath0Path                   = 353,      //!< lanePath返回码0条path
//    RequestStateHorusCanNotFoundPathIDInFirst   = 400,      //!< horus上云的pathID在首次中找不到
};
返回顶部 示例中心 常见问题 智能客服 公众号
二维码