#pragma once
#include <array>
#include <string>
#include "rev/config/BaseConfig.h"
#include "rev/config/ServoChannelConfig.h"
namespace rev::servohub {
class ServoHubConfig : public BaseConfig {
public:
ServoHubConfig() = default;
~ServoHubConfig() override = default;
ServoHubConfig(const ServoHubConfig&) = delete;
ServoHubConfig& operator=(const ServoHubConfig&) = delete;
ServoHubConfig(ServoHubConfig&&) noexcept = delete;
ServoHubConfig& operator=(ServoHubConfig&&) noexcept = delete;
ServoHubConfig& Apply(ServoHubConfig& config);
ServoHubConfig& Apply(ServoChannel::ChannelId channelId,
ServoChannelConfig& config);
std::string Flatten() override;
ServoChannelConfig channel0{ServoChannel::ChannelId::kChannelId0};
ServoChannelConfig channel1{ServoChannel::ChannelId::kChannelId1};
ServoChannelConfig channel2{ServoChannel::ChannelId::kChannelId2};
ServoChannelConfig channel3{ServoChannel::ChannelId::kChannelId3};
ServoChannelConfig channel4{ServoChannel::ChannelId::kChannelId4};
ServoChannelConfig channel5{ServoChannel::ChannelId::kChannelId5};
private:
const std::array<ServoChannelConfig*, ServoChannel::kNumServoChannels>
m_ChannelConfigs{&channel0, &channel1, &channel2,
&channel3, &channel4, &channel5};
};
}