huli f6b86908d9 20240812 3 ay önce
..
communication f6b86908d9 20240812 3 ay önce
dispatch f6b86908d9 20240812 3 ay önce
error_code c31ee96983 20230112, huli 优化 1 yıl önce
message f6b86908d9 20240812 3 ay önce
network_communication f6b86908d9 20240812 3 ay önce
rabbitmq f6b86908d9 20240812 3 ay önce
setting 8a97004478 20230112, huli 优化 1 yıl önce
snap7_communication f6b86908d9 20240812 3 ay önce
system b45a729962 20221025, 整理代码 2 yıl önce
task 9fb7e9396f 20221008, new create 2 yıl önce
tool 0a9e5e6094 20221208, dispatch, communication measure_infor, translate_time 1 yıl önce
CMakeLists.txt f6b86908d9 20240812 3 ay önce
README.md 6e6b6d751f 20221025, 修改 readme 2 yıl önce
hulitest.sh 6e6b6d751f 20221025, 修改 readme 2 yıl önce
main.cpp f6b86908d9 20240812 3 ay önce
proto.sh c31ee96983 20230112, huli 优化 1 yıl önce
run_dispatch.sh 6e6b6d751f 20221025, 修改 readme 2 yıl önce
与上位接口表20210315_H.xlsx 9fb7e9396f 20221008, new create 2 yıl önce
普爱车库的车位模型(2)(1).xlsx 9fb7e9396f 20221008, new create 2 yıl önce
楚天出入口硬件配置参数表_徐晓东_胡力_20210716.xlsx b1100572e3 20240812 3 ay önce
楚天调度plc与上位接口表20220616.xlsx 31f096fec1 20221021, dispatch 优化 2 yıl önce
楚天调度plc与上位接口表20221025.xlsx 087521152a 20221102_B, plc入口转盘状态公开 2 yıl önce
楚天调度plc与上位接口表20221102.xlsx 1dbed41ea3 20230213, huli add plc wheel base to vehicle 1 yıl önce
楚天车位.xlsx b1100572e3 20240812 3 ay önce
需求_预估调度时间.docx 9fb7e9396f 20221008, new create 2 yıl önce

README.md

1,功能描述

调度负责配合plc, 执行存车取车的指令

维护数据库
    commmand_queue              指令表
    space                       车位表
    vehicle                     车辆表
接受rabbitmq 状态信息
    in_mcpu_N_statu_port        入口单片机
    out_mcpu_N_statu_port       出口单片机
    measure_N_statu_port        感测雷达
发送rabbitmq 状态信息
    dispatch_N_statu_port       调度

2,流程介绍:

a, 周期性 查询数据库 command_queue 指令表

如果有状态为0(排队中)的指令, 选取最优解,
并执行

b1, 存车指令, 查询 space表, 找到合适的空闲车位, 并写入车牌号 表示占有该车位

将车位信息 填充到 command_queue 指令表, 并将状态改为1(工作中)
生成 park_table 存车表单 交给 plc执行
plc执行完成后, 清除存车指令 command_queue, 并保存车辆信息到 vehicle

b2, 取车指令, 查询 vehicle表, 找到之前保存的感测信息, 查询空闲出口id

将感测信息和出口id 填充到 command_queue 指令表, 并将状态改为1(工作中)
生成 pick_table 取车表单 交给 plc执行
plc执行完成后, 修改 command_queue表, 指令状态写2 ,
清除 车辆信息到 vehicle, 清除车位信息 space,

3,使用平台:

linux x64 / linux-arm

4,业务逻辑

5,编译

cd xxx/plc调度节点
./proto.sh
mkdir ./build
cd ./build
cmake ..
make

6,运行

指定运行调度单元
cd xxx/plc调度节点/build
开3个终端界面
./terminal 0
./terminal 1
./terminal 2

一键运行所有单元
cd xxx/plc调度节点
./run_dispatch.sh

7,部署

依赖三方库
rabbitmq
protobuf
mysql cpp connect 1.1
glog
gflag
snap7