| | |
| | | |
| | | return MqttBrokerDTO.builder() |
| | | .address(getMqttAddress(mqtt.get(MqttUseEnum.DRC))) |
| | | .username(username) |
| | | .username("root") |
| | | .clientId(clientId) |
| | | .expireTime(System.currentTimeMillis() / 1000 + age) |
| | | .password(token) |
| | | .password("root") |
| | | .build(); |
| | | } |
| | | |
| | |
| | | public ResponseResult controlDockDebug(String sn, String serviceIdentifier, RemoteDebugParam param) { |
| | | RemoteDebugMethodEnum controlMethodEnum = RemoteDebugMethodEnum.find(serviceIdentifier); |
| | | if (RemoteDebugMethodEnum.UNKNOWN == controlMethodEnum) { |
| | | return ResponseResult.error("The " + serviceIdentifier + " method does not exist."); |
| | | return ResponseResult.error(" 没有找到" + serviceIdentifier + " 这个指令。"); |
| | | } |
| | | |
| | | RemoteDebugHandler data = checkDebugCondition(sn, param, controlMethodEnum); |
| | | |
| | | boolean isExist = deviceRedisService.checkDeviceOnline(sn); |
| | | if (!isExist) { |
| | | return ResponseResult.error("The dock is offline."); |
| | | return ResponseResult.error("设备离线"); |
| | | } |
| | | String bid = UUID.randomUUID().toString(); |
| | | ServiceReply serviceReply = messageSenderService.publishServicesTopic(sn, serviceIdentifier, data, bid); |
| | |
| | | path: |
| | | # Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",". |
| | | # inbound-topic: sys/product/+/status,thing/product/+/requests |
| | | inbound-topic: sys/product/+/status,thing/product/+/requests |
| | | inbound-topic: sys/product/+/+,thing/product/+/+ |
| | | DRC: |
| | | protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum |
| | | host: 182.106.212.58 |
| | | port: 15675 |
| | | port: 35675 |
| | | path: /ws |
| | | |
| | | url: |