41 std::uint32_t u32Sequence,
42 std::uint32_t u32Reference)
46 int iLogLevel = logLevel.level();
48 if(iLogLevel >= 0 && iLogLevel <= 4)
52 response.set_type(EMANERemoteControlPortAPI::Response::TYPE_RESPONSE_UPDATE);
54 auto pUpdate = response.mutable_update();
60 response.set_type(EMANERemoteControlPortAPI::Response::TYPE_RESPONSE_ERROR);
62 auto pError = response.mutable_error();
64 pError->set_type(EMANERemoteControlPortAPI::Response::Error::TYPE_ERROR_PARAMETER);
66 pError->set_description(
"Log level out of allowable range [0,4]");
69 response.set_reference(u32Reference);
71 response.set_sequence(u32Sequence);
73 std::string sSerialization;
75 if(!response.SerializeToString(&sSerialization))
80 return sSerialization;
SerializationException is thrown when an exception occurs during serialization or deserialization of ...
static std::string process(const EMANERemoteControlPortAPI::Request::Update::LogLevel &logLevel, std::uint32_t u32Sequence, std::uint32_t u32Reference)
static LogService * instance()
void setLogLevel(LogLevel level)