Files
tp-modelisation-problemes/src/Conveyor.hpp
2025-09-26 11:02:27 +02:00

84 lines
2.0 KiB
C++

/**
* @file Conveyor.hpp
* @author The ARTIS Development Team
* See the AUTHORS or Authors.txt file
*/
/*
* ARTIS - the multimodeling and simulation environment
* This file is a part of the ARTIS environment
*
* Copyright (C) 2013-2023 ULCO http://www.univ-littoral.fr
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ARTIS_FACTORY_CONVEYOR_HPP
#define ARTIS_FACTORY_CONVEYOR_HPP
#include "Base.hpp"
#include "Machine.hpp"
#include "ProductionOrder.hpp"
namespace artis::factory {
struct ConveyorParameters : MachineParameters {
};
class Conveyor : public Dynamics<Conveyor, ConveyorParameters> {
public:
struct inputs {
enum values {
IN
};
};
struct outputs {
enum values {
OUT
};
};
struct vars {
enum values {
};
};
Conveyor(const std::string &name, const Context<Conveyor, ConveyorParameters> &context)
: Dynamics<Conveyor, ConveyorParameters>(name, context) {
input_port({inputs::IN, "in"});
output_port({outputs::OUT, "out"});
}
~Conveyor() override = default;
void dint(const Time &t) override;
void dext(const Time &t, const Time &e, const Bag &bag) override;
void start(const Time &t) override;
Time ta(const Time &t) const override;
Bag lambda(const Time &t) const override;
artis::common::event::Value observe(const Time &t, unsigned int index) const override;
private:
// TODO (state)
};
} // namespace artis::factory
#endif