MCPcopy Create free account
hub / github.com/apohl79/audiogridder / getStateInformation

Method getStateInformation

Server/Source/ProcessorClient.cpp:522–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520double ProcessorClient::getTailLengthSeconds() { return m_tailSeconds; }
521
522void ProcessorClient::getStateInformation(String& settings) {
523 traceScope();
524
525 std::lock_guard<std::mutex> lock(m_cmdMtx);
526
527 Message<GetPluginSettings> msg(this);
528 PLD(msg).setNumber(0);
529 if (!msg.send(m_sockCmdOut.get())) {
530 logln("getStateInformation failed: can't send message");
531 return;
532 }
533
534 Message<PluginSettings> res(this);
535 MessageHelper::Error err;
536 if (res.read(m_sockCmdOut.get(), &err, 5000)) {
537 m_lastSettings = PLD(res).getString();
538 settings = m_lastSettings;
539 } else {
540 logln("getStateInformation failed: failed to read PluginSettings message: " << err.toString());
541 m_sockCmdOut->close();
542 return;
543 }
544}
545
546void ProcessorClient::setStateInformation(const String& settings) {
547 traceScope();

Callers

nothing calls this directly

Calls 7

setNumberMethod · 0.80
sendMethod · 0.45
getMethod · 0.45
readMethod · 0.45
getStringMethod · 0.45
toStringMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected