repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b4d1b3
)
added CCECTypeUtils::ToString(const cec_command& command)
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 18 Mar 2013 15:04:48 +0000
(16:04 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 18 Mar 2013 15:04:48 +0000
(16:04 +0100)
src/lib/CECTypeUtils.h
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECTypeUtils.h
b/src/lib/CECTypeUtils.h
index 4b406f12edf271a641f01f1d9d7855688191932d..68ef5d1838406793d77021a14e9b19decf0f0cfa 100644
(file)
--- a/
src/lib/CECTypeUtils.h
+++ b/
src/lib/CECTypeUtils.h
@@
-31,6
+31,8
@@
* http://www.pulse-eight.net/
*/
* http://www.pulse-eight.net/
*/
+#include "lib/platform/util/StdString.h"
+
namespace CEC
{
class CCECTypeUtils
namespace CEC
{
class CCECTypeUtils
@@
-852,5
+854,16
@@
namespace CEC
}
return true;
}
}
return true;
}
+
+ static CStdString ToString(const cec_command& command)
+ {
+ CStdString dataStr;
+ dataStr.Format(">> %1x%1x", command.initiator, command.destination);
+ if (command.opcode_set == 1)
+ dataStr.AppendFormat(":%02x", command.opcode);
+ for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
+ dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
+ return dataStr;
+ }
};
}
};
}