SOLA
Loading...
Searching...
No Matches
daisi
src
material_flow
model
material_flow.h
1
// Copyright 2023 The SOLA authors
2
//
3
// This file is part of DAISI.
4
//
5
// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6
// General Public License as published by the Free Software Foundation; version 2.
7
//
8
// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10
// Public License for more details.
11
//
12
// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13
// <https://www.gnu.org/licenses/>.
14
//
15
// SPDX-License-Identifier: GPL-2.0-only
16
17
#ifndef DAISI_MATERIAL_FLOW_MATERIAL_FLOW_H_
18
#define DAISI_MATERIAL_FLOW_MATERIAL_FLOW_H_
19
20
#include <functional>
21
#include <variant>
22
#include <vector>
23
24
#include "cpps/logical/message/material_flow_update.h"
25
#include "cpps/model/order_states.h"
26
#include "solanet/serializer/serialize.h"
27
#include "task.h"
28
29
namespace
daisi::material_flow {
30
31
// TODO just placeholder for now
32
class
MFDLScheduler
{
33
public
:
34
MFDLScheduler
() =
default
;
35
36
MFDLScheduler
(
37
const
std::string &
/*mfdl_program*/
,
38
std::function<
void
(
const
daisi::cpps::logical::MaterialFlowUpdate
&)> log_update_fct)
39
: log_order_state_update_fct_(std::move(log_update_fct)) {}
40
41
void
processOrderUpdate(
const
daisi::cpps::logical::MaterialFlowUpdate
&update);
42
43
bool
isFinished()
const
;
44
45
SERIALIZE(tasks_);
46
47
void
addTask(
Task
task);
48
49
private
:
50
std::vector<Task> tasks_;
51
52
std::function<void(
const
daisi::cpps::logical::MaterialFlowUpdate
&)> log_order_state_update_fct_;
53
};
54
55
}
// namespace daisi::material_flow
56
57
#endif
daisi::material_flow::MFDLScheduler
Definition
material_flow.h:32
daisi::material_flow::Task
Definition
task.h:34
daisi::cpps::logical::MaterialFlowUpdate
Definition
material_flow_update.h:30
Generated by
1.9.8