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

Function ProcessCommandAT

src/cec-client/cec-client.cpp:854–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852}
853
854bool ProcessCommandAT(ICECAdapter *parser, const std::string &command, std::string &arguments)
855{
856 if (command == "at")
857 {
858 std::string strType;
859 if (GetWord(arguments, strType))
860 {
861 cec_device_type type = CEC_DEVICE_TYPE_TV;
862 if (strType == "a")
863 type = CEC_DEVICE_TYPE_AUDIO_SYSTEM;
864 else if (strType == "p")
865 type = CEC_DEVICE_TYPE_PLAYBACK_DEVICE;
866 else if (strType == "r")
867 type = CEC_DEVICE_TYPE_RECORDING_DEVICE;
868 else if (strType == "t")
869 type = CEC_DEVICE_TYPE_TUNER;
870
871 PrintToStdOut("device %d is %s", type, (parser->IsActiveDeviceType(type) ? "active" : "not active"));
872 return true;
873 }
874 }
875
876 return false;
877}
878
879bool ProcessCommandR(ICECAdapter *parser, const std::string &command, std::string & UNUSED(arguments))
880{

Callers 1

ProcessConsoleCommandFunction · 0.85

Calls 3

GetWordFunction · 0.85
PrintToStdOutFunction · 0.85
IsActiveDeviceTypeMethod · 0.45

Tested by

no test coverage detected