#ifndef REMOTE_DATA_COMPONENT_HPP_
#define REMOTE_DATA_COMPONENT_HPP_

#include <cstdint>
#include <functional>
#include <MachineComponent/DataCableComponent/DataCableComponent.hpp>
#include <Controller/Controller.hpp>

/**
 * @brief Remote calls for controlling a data component.
 */
class RemoteDataComponent final
{
private:
    std::function<DataCableComponent&()> getDataComponent;

public:
    RemoteDataComponent(Controller *ctrl, std::function<DataCableComponent&()> componentGetter);

    Controller::Command<uint32_t, DataCableComponent::InputRule> addInputRule;
    Controller::Command<uint32_t, uint32_t> removeInputRule;
    Controller::Command<uint32_t, uint32_t, DataLink::Channel> setInputRuleChannel;
    Controller::Command<uint32_t, uint32_t, bool> setInputRuleDestState;
    Controller::Command<uint32_t, uint32_t, std::string> setInputRuleVerb;
};

#endif