1 Star 0 Fork 3

ros-org/agv_dispatch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
taskmaker.cpp 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
#include "taskmaker.h"
#include "qunchuang/qunchuangtaskmaker.h"
#include "qingdao/qingdaotaskmaker.h"
#include "Dongyao/dytaskmaker.h"
#include "Anting/attaskmaker.h"
#include "common.h"
TaskMaker::TaskMaker()
{
}
TaskMaker::~TaskMaker()
{
}
TaskMaker* TaskMaker::getInstance()
{
if(GLOBAL_AGV_PROJECT == AGV_PROJECT_QINGDAO){
//不同的AGV,调用不同的子类,即可
static QingdaoTaskMaker *m_ins = nullptr;
if (m_ins == nullptr) {
m_ins = new QingdaoTaskMaker("127.0.0.1", 12345);
}
return m_ins;
}else if(GLOBAL_AGV_PROJECT == AGV_PROJECT_QUNCHUANG){
//不同的AGV,调用不同的子类,即可
static QunChuangTaskMaker *m_ins = nullptr;
if(m_ins == nullptr){
m_ins = new QunChuangTaskMaker();
}
return m_ins;
}
else if(GLOBAL_AGV_PROJECT == AGV_PROJECT_DONGYAO){
static DyTaskMaker *m_ins = nullptr;
if(m_ins == nullptr){
m_ins = new DyTaskMaker("127.0.0.1", 12345);
}
return m_ins;
}
else if(GLOBAL_AGV_PROJECT == AGV_PROJECT_ANTING){
static AtTaskMaker *m_ins = nullptr;
if(m_ins == nullptr){
m_ins = new AtTaskMaker("127.0.0.1", 12345);
}
return m_ins;
}
return nullptr;
}
//群创接口//非群创不需要重写
void TaskMaker::makeTask(std::string from ,std::string to,std::string dispatch_id,int ceid,std::string line_id, int agv_id, int all_floor_info)
{
}
bool TaskMaker::makeChargeTask(int agv)
{
return false;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ros-org/agv_dispatch.git
git@gitee.com:ros-org/agv_dispatch.git
ros-org
agv_dispatch
agv_dispatch
master

搜索帮助