MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / ProcessCommandSTATS

Function ProcessCommandSTATS

src/cec-client/cec-client.cpp:981–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979
980#if CEC_LIB_VERSION_MAJOR >= 5
981bool ProcessCommandSTATS(ICECAdapter *parser, const std::string &command, std::string & UNUSED(arguments))
982{
983 if (command == "stats")
984 {
985 cec_adapter_stats stats;
986 if (parser->GetStats(&stats))
987 {
988 std::string strLog;
989 strLog += StringUtils::Format("tx acked: %u\n", stats.tx_ack);
990 strLog += StringUtils::Format("tx nacked: %u\n", stats.tx_nack);
991 strLog += StringUtils::Format("tx error: %u\n", stats.tx_error);
992 strLog += StringUtils::Format("rx total: %u\n", stats.rx_total);
993 strLog += StringUtils::Format("rx error: %u\n", stats.rx_error);
994 PrintToStdOut(strLog.c_str());
995 }
996 else
997 {
998 PrintToStdOut("not supported\n");
999 }
1000 return true;
1001 }
1002 return false;
1003}
1004#endif
1005
1006bool ProcessConsoleCommand(ICECAdapter *parser, std::string &input)

Callers 1

ProcessConsoleCommandFunction · 0.85

Calls 2

PrintToStdOutFunction · 0.85
GetStatsMethod · 0.45

Tested by

no test coverage detected