2021-08-10 10:12:48 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/* Sample value remapping for path source muxing.
|
2020-07-04 18:16:03 +02:00
|
|
|
*
|
2022-03-15 09:18:01 -04:00
|
|
|
* Author: Steffen Vogel <post@steffenvogel.de>
|
2022-03-15 09:28:57 -04:00
|
|
|
* SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
2022-07-04 18:20:03 +02:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2020-07-04 18:16:03 +02:00
|
|
|
*/
|
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
#include <list>
|
2020-07-04 18:16:03 +02:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
#include <villas/mapping.hpp>
|
|
|
|
#include <villas/node_list.hpp>
|
2020-08-17 17:04:55 +02:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
namespace villas {
|
|
|
|
namespace node {
|
2020-08-17 17:04:55 +02:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
class MappingList : public std::list<MappingEntry::Ptr> {
|
2020-08-17 17:04:55 +02:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
public:
|
2023-09-07 11:46:39 +02:00
|
|
|
int parse(json_t *json);
|
2021-08-10 10:12:48 -04:00
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
int prepare(NodeList &nodes);
|
2021-08-10 10:12:48 -04:00
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
int remap(struct Sample *remapped, const struct Sample *original) const;
|
2021-08-10 10:12:48 -04:00
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
int update(const MappingEntry::Ptr me, struct Sample *remapped,
|
|
|
|
const struct Sample *original);
|
2021-08-10 10:12:48 -04:00
|
|
|
};
|
2020-08-17 17:04:55 +02:00
|
|
|
|
2023-08-28 09:34:02 +02:00
|
|
|
} // namespace node
|
|
|
|
} // namespace villas
|