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:
270e872
)
added CCECTypeUtils::PhysicalAddressIsIncluded()
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 18 Oct 2012 11:51:42 +0000
(13:51 +0200)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 18 Oct 2012 15:31:55 +0000
(17:31 +0200)
src/lib/CECTypeUtils.h
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECTypeUtils.h
b/src/lib/CECTypeUtils.h
index 21a651d59fe259fbcabcbb5683aacc3a761143c9..239fc66086ec7eb13caea24191fe9977a1f06cd1 100644
(file)
--- a/
src/lib/CECTypeUtils.h
+++ b/
src/lib/CECTypeUtils.h
@@
-819,5
+819,16
@@
namespace CEC
return "unknown";
}
}
+
+ static bool PhysicalAddressIsIncluded(uint16_t iParent, uint16_t iChild)
+ {
+ for (int iPtr = 3; iPtr >= 0; iPtr--)
+ {
+ if (((iParent >> 4*iPtr) & 0xF) > 0 &&
+ ((iParent >> 4*iPtr) & 0xF) != ((iChild >> 4*iPtr) & 0xF))
+ return false;
+ }
+ return true;
+ }
};
}