-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdevstone.hpp
More file actions
56 lines (45 loc) · 2.23 KB
/
devstone.hpp
File metadata and controls
56 lines (45 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* SPDX-License-Identifier: MIT
* Copyright (c) 2022-present Guillermo Trabes
* ARSLab - Carleton University
* Copyright (c) 2022-present Román Cárdenas Rodríguez
* ARSLab - Carleton University
*/
#ifndef CADMIUM_EXAMPLE_DEVSTONE_HPP_
#define CADMIUM_EXAMPLE_DEVSTONE_HPP_
#include <cadmium/core/modeling/coupled.hpp>
#include <cadmium/core/simulation/root_coordinator.hpp>
#include <memory>
#include "devstone_coupled.hpp"
namespace cadmium::example::devstone {
//! Base class for DEVStone coupled models and DEVStone model factory function.
class DEVStone : public Coupled {
protected:
//! pointer to child DEVStoneCoupled model. By default, it is set to nullptr (i.e., no child model).
std::shared_ptr<DEVStoneCoupled> devstone;
public:
/**
* DEVStone coupled model constructor function.
* @param width width of the DEVStone coupled model.
* @param depth depth of the DEVStone coupled model.
* @param intDelay internal delay for the DEVStone atomic models.
* @param extDelay external delay for the DEVStone atomic models.
*/
DEVStone(const std::string& type, int width, int depth, int intDelay, int extDelay);
//! @return the total number of DEVStone atomic models.
[[nodiscard]] int nAtomics() const;
//! @return the total number of internal couplings in the DEVStone coupled model.
[[nodiscard]] int nICs() const;
//! @return the total number of external internal couplings in the DEVStone coupled model.
[[nodiscard]] int nEICs() const;
//! @return the total number of external output couplings in the DEVStone coupled model.
[[nodiscard]] int nEOCs() const;
//! @return the total number of internal transitions triggered by all the DEVStone atomic models.
[[nodiscard]] int nInternals() const;
//! @return the total number of external transitions triggered by all the DEVStone atomic models.
[[nodiscard]] int nExternals() const;
//! @return the total number of events received by all the DEVStone atomic models.
[[nodiscard]] int nEvents() const;
};
} //namespace cadmium::example::devstone
#endif //CADMIUM_EXAMPLE_DEVSTONE_HPP_