40 process(
const EMANERemoteControlPortAPI::Request::Update::Configuration & configuration,
41 std::uint32_t u32Sequence,
42 std::uint32_t u32Reference)
50 for(
const auto & parameter : configuration.parameters())
52 std::vector<Any> anys;
54 for(
const auto & any : parameter.values())
58 anys.push_back(
toAny(any));
62 response.set_type(EMANERemoteControlPortAPI::Response::TYPE_RESPONSE_ERROR);
64 auto pError = response.mutable_error();
66 pError->set_type(EMANERemoteControlPortAPI::Response::Error::TYPE_ERROR_PARAMETER);
68 pError->set_description(exp.
what());
76 updates.push_back(std::make_pair(parameter.name(),std::move(anys)));
85 response.set_type(EMANERemoteControlPortAPI::Response::TYPE_RESPONSE_UPDATE);
89 response.set_type(EMANERemoteControlPortAPI::Response::TYPE_RESPONSE_ERROR);
91 auto pError = response.mutable_error();
93 pError->set_type(EMANERemoteControlPortAPI::Response::Error::TYPE_ERROR_PARAMETER);
95 pError->set_description(exp.
what());
99 response.set_reference(u32Reference);
101 response.set_sequence(u32Sequence);
103 std::string sSerialization;
105 if(!response.SerializeToString(&sSerialization))
110 return sSerialization;
SerializationException is thrown when an exception occurs during serialization or deserialization of ...
ConfigurationException is thrown when an exception occurs during configuration processing.
Any toAny(EMANERemoteControlPortAPI::Any any)
const char * what() const
void update(BuildId buildId, const ConfigurationUpdate &update)
std::vector< ConfigurationNameAnyValues > ConfigurationUpdate
static std::string process(const EMANERemoteControlPortAPI::Request::Update::Configuration &configuration, std::uint32_t u32Sequence, std::uint32_t u32Reference)
AnyException is thrown when an exception occurs during creation or conversion of an Any...
static ConfigurationService * instance()