(2)第三方云平台需要先部署MQTT网关、HTTPS服务、Websocket服务、对象存储等基础服务,打通与网关设备的通信链路,即可进行功能集开发实现,上云API提供的功能集主要分2部分,一部分是基于DJI Pilot 2的,有飞手操作的场景,该场景下提供的功能集有:地图元素、态势感知、直播、媒体库、航线库、设备管理。另一部分是主要面向大疆机场的场景,功能集有:固件远程升级、设备异常告警、机场远程控制等等,当然,有些功能集是两种场景均有重叠的,例如视频直播,具体使用方式详见各个功能集方案及API说明章节。
(1) Error Msg: Device is not registered.. The device has not been registered, please call the ‘SDKManager.registerDevice()’ method to register the device first. 这个问题就是在云平台上,无人机没有注册进去,这个问题也非常的奇怪,就是说每过一段时间,无人机就会掉线。
public <T> CommonTopicResponse<T> publishWithReply(Class<T> clazz, String topic, CommonTopicRequest request, int retryCount, long timeout) { AtomicIntegertime=newAtomicInteger(0); booleanhasBid= StringUtils.hasText(request.getBid()); request.setBid(hasBid ? request.getBid() : UUID.randomUUID().toString()); // Retry while (time.getAndIncrement() <= retryCount) { this.publish(topic, request);
// If the message is not received in 3 seconds then resend it again. CommonTopicResponse<T> receiver = Chan.getInstance(request.getTid(), true).get(request.getTid(), timeout); // Need to match tid and bid. if (Objects.nonNull(receiver) && receiver.getTid().equals(request.getTid()) && receiver.getBid().equals(request.getBid())) { if (clazz.isAssignableFrom(receiver.getData().getClass())) { return receiver; } thrownewTypeMismatchException(receiver.getData(), clazz); } // It must be guaranteed that the tid and bid of each message are different. if (!hasBid) { request.setBid(UUID.randomUUID().toString()); } request.setTid(UUID.randomUUID().toString()); } thrownewCloudSDKException(CloudSDKErrorEnum.MQTT_PUBLISH_ABNORMAL, "No message reply received."); }
public Result liveStart(LiveTypeDTO liveParam) { // Check if this lens is available live. Result<DeviceDTO> responseResult = this.checkBeforeLive(liveParam.getVideoId()); if (CommonConstant.SC_OK_200 != responseResult.getCode() ) { return responseResult; }
public Result liveStart(LiveTypeDTO liveParam) { // Check if this lens is available live. Result<DeviceDTO> responseResult = this.checkBeforeLive(liveParam.getVideoId()); if (CommonConstant.SC_OK_200 != responseResult.getCode()) { return responseResult; }
/** * RTMP: (rtmp://xxxxxxx) Example: rtmp://192.168.1.1:8080/live * RTSP:(uerName&password&port) Example: userName=dji-cloud-api&password=123456&port=8080 * GB28181:(serverIP&serverPort&serverID&agentID&agentPassword&localPort&channel) * Example: serverIP=192.168.1.1&serverPort=8080&serverID=34000000000000000000&agentID= * 300000000010000000000&agentPassword=0000000&localPort=7060&channel=340000000000000000000 * AGORA:(channel&sn&token&uid) * Example: channel=1ZNDH360010162_39-0-7&sn=1ZNDH360010162&token=006dca67721582a48768ec4d8 * 17b7b25a86IAB4cw2JgN6iX8BpTPdc3e4S1Iendz94IFJ56aSXKvzAJei27MqF2zyCIgCLIIoBt41+YAQAAQC3jX * 5gAgC3jX5gAwC3jX5gBAC3jX5g&uid=50000 * Notice: The token generated by Shengwang may have special characters such as '+' ' ', * and need to do url encode, otherwise there will be a parsing error on the PILOT side */ @NotBlank private String url;
/** * The format is #{uav_sn}/#{camera_id}/#{video_index}, * drone serial number/payload and mounted location enumeration value/payload lens numbering */ @NotNull private VideoId videoId;