# RS422 **Repository Path**: SpidermanW/rs422 ## Basic Information - **Project Name**: RS422 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-27 - **Last Updated**: 2025-09-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 协议 (智能计算模块 -> 运载器 -> 地面站) ![alt text](image.png) ## windows 环境下编译 ``` windows 环境配置 step1: install CMake step2: install w64devkit step3: install ninja-win ``` [CMake_Link](https://cmake.org/download/) [w64devkit_w64devkit-x64-2.4.0.7z.exe](https://github.com/skeeto/w64devkit/releases) [ninja-win](https://github.com/ninja-build/ninja/releases) 软件安装完 记得!!! 配置环境变量 ![alt text](image-1.png) 编译: - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja .. - ninja ------- ------- ## Linux 环境下编译 ``` Linux 环境配置 sudo apt install cmake g++ gcc -y 编译 mkdir build cmake .. make ``` ## Ethernet 测试 >> 默认端口8888 - ./udp_receiver >> 指定端口 - ./udp_receiver 9999 >> 默认发送到本地回环 - ./udp_sender >> 发送到指定IP和端口 - ./udp_sender 192.168.1.100 8888 500 >> 广播发送 - ./udp_sender 255.255.255.255 8888 1000 >> Ethernet 测试结果 - ./udp_receiver - ./udp_sender ![alt text](image-3.png) ## 串口测试 >> windows 本地回环测试: - 本地串口回环测试 需要安装虚拟串口 [Virtual Serial Port Driver Installation Link ](https://www.virtual-serial-port.org/user-guides/standard/installation.html) 安装并配置: 配置结果 可在设备管理器中查看: ![alt text](image-4.png) >> 串口测试结果 - ./rs422_receiver.exe - ./rs422_sender.exe ![alt text](image-2.png) ## Windows or Linux Platform ``` 1-在设计 C++ 程序时,兼顾 Windows 和 Linux 平台以实现代码通用性,是一种非常实用的开发策略。 2-Windows 上快速开发与调试 3-快速迁移至 Linux 生产环境(一旦代码具备跨平台能力,部署到 Linux 时只需简单编译,无需重写。) ```