| 979 | |
| 980 | #if CEC_LIB_VERSION_MAJOR >= 5 |
| 981 | bool 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 | |
| 1006 | bool ProcessConsoleCommand(ICECAdapter *parser, std::string &input) |
no test coverage detected