- 添加多端口通信支持:TR360-3-60(10195)和TR360-4-60(20295) - 实现TCP命令服务器,支持带\r\n的雷达命令 - 添加命令历史记录功能 - 支持status、history、set_port等内置命令 - 更新launch文件配置双雷达节点 - 添加测试脚本和文档
41 lines
963 B
Bash
Executable File
41 lines
963 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Testing TR360 Radar Command Interface"
|
|
echo "===================================="
|
|
|
|
# TR360-3-60 命令端口: 10195 + 1000 = 11195
|
|
# TR360-4-60 命令端口: 20295 + 1000 = 21295
|
|
|
|
HOST="192.168.1.193"
|
|
PORT_3_60=11195
|
|
PORT_4_60=21295
|
|
|
|
echo ""
|
|
echo "1. Testing TR360-3-60 commands (port $PORT_3_60):"
|
|
echo "-----------------------------------------------"
|
|
|
|
# 测试基本命令
|
|
echo "Testing status command:"
|
|
echo "status" | nc -w 3 $HOST $PORT_3_60
|
|
echo ""
|
|
|
|
echo "Testing history command:"
|
|
echo "history" | nc -w 3 $HOST $PORT_3_60
|
|
echo ""
|
|
|
|
echo "Testing set_port command:"
|
|
echo "set_port 10195" | nc -w 3 $HOST $PORT_3_60
|
|
echo ""
|
|
|
|
echo "2. Testing TR360-4-60 commands (port $PORT_4_60):"
|
|
echo "-----------------------------------------------"
|
|
|
|
echo "Testing status command:"
|
|
echo "status" | nc -w 3 $HOST $PORT_4_60
|
|
echo ""
|
|
|
|
echo "Testing custom command:"
|
|
echo "get_config" | nc -w 3 $HOST $PORT_4_60
|
|
echo ""
|
|
|
|
echo "Command testing completed!" |