1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // Created by huli on 2021/3/16.
- //
- #ifndef NNXX_TESTS_PASSAGEWAY_H
- #define NNXX_TESTS_PASSAGEWAY_H
- #include "../dispatch/passageway_task.h"
- #include "../dispatch/dispatch_device_base.h"
- //一楼的出入口,通道口
- class Passageway:public Dispatch_device_base
- {
- public:
- Passageway();
- Passageway(const Passageway& other)= default;
- Passageway& operator =(const Passageway& other)= default;
- ~Passageway();
- public://API functions
- //检查任务类型, 子类必须重载, 用来检查输入的任务是否为子类所需的.
- Error_manager check_task_type(std::shared_ptr<Task_Base> p_task);
- public://get or set member variable
- //获取硬件设备的状态, 必须子类继承
- Hardware_device_status get_actual_device_status();
- protected://member functions
- //把任务单写入到内存中, 子类必须重载
- Error_manager write_task_to_memory(std::shared_ptr<Task_Base> p_task);
- //更新设备底层通信数据, 子类必须重载
- Error_manager update_device_communication();
- //从内存中读数据到任务单, 子类必须重载
- Error_manager check_and_read_memory_to_task(std::shared_ptr<Task_Base> p_task);
- //取消下发的指令, 子类必须重载, 用来向下发送命令取消任务.
- Error_manager cancel_command();
- protected://member variable
- public:
- //调度下发到plc
- std::string m_request_key; //请求唯一码, 用作识别
- //请求的目标坐标和动作
- Door_motion m_request_inside_door_motion; //通道口 内门动作
- Door_motion m_request_outside_door_motion; //通道口 外门动作
- Turntable_direction m_request_turntable_direction; //通道口 转台方向
- //plc反馈给调度
- std::string m_respons_key; //应答的唯一码, 用作识别
- Respons_status m_respons_status; //指令完成状态, 搬运器答复指令, 返回任务完成的情况
- //答复的实际坐标和动作
- Door_motion m_respons_inside_door_motion; //通道口 内门动作
- Door_motion m_respons_outside_door_motion; //通道口 外门动作
- Turntable_direction m_respons_turntable_direction; //通道口 转台方向
- //硬件状态, 目前只做显示判断
- std::chrono::system_clock::time_point m_status_updata_time; //状态更新时间点
- unsigned char m_last_heartbeat; //上一次的心跳
- //搬运器的设备状态数据,
- Hardware_device_status m_actual_device_status; //通道口的硬件设备状态
- Load_status m_actual_inside_load_status; //通道口的内部负载状态, 门内地感是否有车.
- Load_status m_actual_outside_load_status; //通道口的外部负载状态, 门外地感是否有车.
- Overstep_the_boundary m_actual_front_overstep_the_boundary; //通道口 汽车前边界
- Overstep_the_boundary m_actual_back_overstep_the_boundary; //通道口 汽车前边界
- Overstep_the_boundary m_actual_height_overstep_the_boundary; //通道口 车辆是否超高
- Load_status m_actual_outside_door_sensor; //通道口 的外门处的传感器, 判断是否有车经过外门
- //通道口的真实状态, 可能是路径中间的坐标
- Door_motion m_actual_inside_door_motion; //通道口 内门动作
- Door_motion m_actual_outside_door_motion; //通道口 外门动作
- Load_status m_actual_turntable_load_status; //通道口 转盘负载状态, 是否有车.
- Turntable_direction m_actual_turntable_direction; //通道口 转台方向
- //搬运器设备的错误码
- unsigned char m_actual_error_code[50]; //搬运器设备的故障信息位
- unsigned char m_actual_warning_code[50]; //搬运器设备的警告信息位
- std::string m_actual_error_description;//搬运器设备的错误描述
- private:
- };
- #endif //NNXX_TESTS_PASSAGEWAY_H
|