当前位置: 首页 > news >正文

机场上云-无人机状态上报流程

Spring Integration末端处理点

/**
     * osd dock drone
     * @param request  data
     * @param headers   The headers for a {@link Message}.
     * @return status_reply
     */
    @ServiceActivator(inputChannel = ChannelName.INBOUND_OSD_DOCK_DRONE)
    public void osdDockDrone(TopicOsdRequest<OsdDockDrone> request, MessageHeaders headers)     {
        throw new UnsupportedOperationException("osdDockDrone not implemented");
    }

实际实现类

@Override
    public void osdDockDrone(TopicOsdRequest<OsdDockDrone> request, MessageHeaders headers) {
        String from = request.getFrom();
        Optional<DeviceDTO> deviceOpt = deviceRedisService.getDeviceOnline(from);
        if (deviceOpt.isEmpty()) {
            deviceOpt = deviceService.getDeviceBySn(from);
            if (deviceOpt.isEmpty()) {
                log.error("Please restart the drone.");
                return;
            }
        }

        if (!StringUtils.hasText(deviceOpt.get().getWorkspaceId())) {
            log.error("Please restart the drone.");
        }

        DeviceDTO device = deviceOpt.get();
        deviceRedisService.setDeviceOnline(device);
        deviceRedisService.setDeviceOsd(from, request.getData());

        deviceService.pushOsdDataToWeb(device.getWorkspaceId(), BizCodeEnum.DEVICE_OSD, from, request.getData());
    }

1. redis中查询是否有缓存,如果没有,根据SN码查询mysql的设备表

2. 将第一步的结果存储到redis中

3.将mqtt传递的data数据缓存到redis中

4.利用websocket将数据发送给前端,结构就是原始的报文结构,参考上云api的osd数据结构


文章转载自:
http://capricious.hyyxsc.cn
http://adequately.hyyxsc.cn
http://affray.hyyxsc.cn
http://batwoman.hyyxsc.cn
http://anhydride.hyyxsc.cn
http://bedsock.hyyxsc.cn
http://carnie.hyyxsc.cn
http://alpenglow.hyyxsc.cn
http://almsman.hyyxsc.cn
http://chit.hyyxsc.cn
http://arroba.hyyxsc.cn
http://accomplishment.hyyxsc.cn
http://capsular.hyyxsc.cn
http://bludgeon.hyyxsc.cn
http://chestnutting.hyyxsc.cn
http://beaconage.hyyxsc.cn
http://chariotee.hyyxsc.cn
http://archaistic.hyyxsc.cn
http://balinese.hyyxsc.cn
http://afterripening.hyyxsc.cn
http://chondral.hyyxsc.cn
http://bituminize.hyyxsc.cn
http://burnet.hyyxsc.cn
http://armature.hyyxsc.cn
http://budo.hyyxsc.cn
http://anguished.hyyxsc.cn
http://arriero.hyyxsc.cn
http://asciferous.hyyxsc.cn
http://bubbler.hyyxsc.cn
http://bacteriostatic.hyyxsc.cn
http://www.dtcms.com/a/83614.html

相关文章:

  • 【标准协议】RTCA标准协议解读
  • linux安装nginx详细教程
  • Java 锁机制全面解析
  • 【Linux】Ubuntu 24.04 LTS 安装 OpenJDK 8
  • 单表达式倒计时工具:datetime的极度优雅(智普清言)
  • 扩散模型算法实战——可控图像编辑
  • uniapp小程序,输入框限制输入(正整数、小数后几位)
  • `sscanf` 和 `scanf` 的区别
  • 磁盘清理工具-TreeSize Free介绍
  • 使用 QR-Code-Styling 在 Vue 3 中生成二维码
  • 【004安卓开发方案调研】之Ionic+Vue+Capacitor开发安卓
  • Z型隶属函数(Z-shaped Membership Function)的详细介绍及python示例
  • logisim安装以及可能出现的问题
  • _KiComputeTimerTableIndex函数分析
  • Excel筛选填充的正确方法
  • 在 Ubuntu 20.04 上重新启动网络
  • 掌握新编程语言的秘诀:利用 AI 快速上手 Python、Go、Java 和 Rust
  • 蓝桥杯真题 3513.岛屿个数
  • doris:时区管理
  • 学习笔记:黑马程序员JavaWeb开发教程(2025.3.22)
  • 鱼书--学习2
  • Python入门基础
  • 【数据分享】2000—2024年我国省市县三级逐年归一化植被指数(NDVI)数据(年平均值/Shp/Excel格式)
  • MySQL数据库精研之旅第二期:库操作的深度探索
  • 计算机基础:编码04,认识反码和补码
  • 深度学习3-pytorch学习
  • python学习笔记--实现简单的爬虫(二)
  • AutoImageProcessor代码分析
  • Python设计模式 - 适配器模式
  • 二十四、实战开发 uni-app x 项目(仿京东)- 前后端实现登录注册