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
|
|
|
*
|
|
|
|
* @file
|
2022-12-14 17:41:58 +01:00
|
|
|
* @author Steffen Vogel <post@steffenvogel.de>
|
2022-03-15 09:28:57 -04:00
|
|
|
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
|
2022-07-04 18:20:03 +02:00
|
|
|
* @license 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:
|
|
|
|
int parse(json_t *json);
|
|
|
|
|
|
|
|
int prepare(NodeList &nodes);
|
|
|
|
|
|
|
|
int remap(struct Sample *remapped, const struct Sample *original) const;
|
|
|
|
|
|
|
|
int update(const MappingEntry::Ptr me, struct Sample *remapped, const struct Sample *original);
|
|
|
|
};
|
2020-08-17 17:04:55 +02:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
} /* namespace node */
|
|
|
|
} /* namespace villas */
|