2018-02-09 21:31:05 +00:00
|
|
|
//
|
|
|
|
// MultiConfigurable.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 09/02/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-02-09 21:31:05 +00:00
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2018-02-09 21:31:05 +00:00
|
|
|
|
|
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
2020-03-16 03:48:53 +00:00
|
|
|
#include "../../../../Configurable/Configurable.hpp"
|
2018-02-09 21:31:05 +00:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Analyser::Dynamic {
|
2018-02-09 21:31:05 +00:00
|
|
|
|
2018-02-19 21:03:17 +00:00
|
|
|
/*!
|
|
|
|
Provides a class that multiplexes the configurable interface to multiple machines.
|
|
|
|
|
|
|
|
Makes a static internal copy of the list of machines; makes no guarantees about the
|
|
|
|
order of delivered messages.
|
|
|
|
*/
|
2018-02-09 21:31:05 +00:00
|
|
|
class MultiConfigurable: public Configurable::Device {
|
|
|
|
public:
|
|
|
|
MultiConfigurable(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
|
|
|
|
2018-02-19 21:03:17 +00:00
|
|
|
// Below is the standard Configurable::Device interface; see there for documentation.
|
2020-03-16 03:48:53 +00:00
|
|
|
void set_options(const std::unique_ptr<Reflection::Struct> &options) final;
|
2020-03-17 03:25:05 +00:00
|
|
|
std::unique_ptr<Reflection::Struct> get_options() final;
|
2018-02-09 21:31:05 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<Configurable::Device *> devices_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|