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

Method ProcessCommandScan

src/pyCecClient/pyCecClient.py:124–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122
123 # scan the bus and display devices that were found
124 def ProcessCommandScan(self):
125 print("requesting CEC bus information ...")
126 strLog = "CEC bus information\n===================\n"
127 addresses = self.lib.GetActiveDevices()
128 activeSource = self.lib.GetActiveSource()
129 x = 0
130 while x < 15:
131 if addresses.IsSet(x):
132 vendorId = self.lib.GetDeviceVendorId(x)
133 physicalAddress = self.lib.GetDevicePhysicalAddress(x)
134 active = self.lib.IsActiveSource(x)
135 cecVersion = self.lib.GetDeviceCecVersion(x)
136 power = self.lib.GetDevicePowerStatus(x)
137 osdName = self.lib.GetDeviceOSDName(x)
138 strLog += "device #" + str(x) +": " + self.lib.LogicalAddressToString(x) + "\n"
139 strLog += "address: " + str(physicalAddress) + "\n"
140 strLog += "active source: " + str(active) + "\n"
141 strLog += "vendor: " + self.lib.VendorIdToString(vendorId) + "\n"
142 strLog += "CEC version: " + self.lib.CecVersionToString(cecVersion) + "\n"
143 strLog += "OSD name: " + osdName + "\n"
144 strLog += "power status: " + self.lib.PowerStatusToString(power) + "\n\n\n"
145 x += 1
146 print(strLog)
147
148 def ReadInput(self, prompt):
149 if version_info >= (3,0,0):

Callers 1

MainLoopMethod · 0.95

Calls 10

VendorIdToStringMethod · 0.80
GetActiveDevicesMethod · 0.45
GetActiveSourceMethod · 0.45
IsSetMethod · 0.45
GetDeviceVendorIdMethod · 0.45
IsActiveSourceMethod · 0.45
GetDeviceCecVersionMethod · 0.45
GetDevicePowerStatusMethod · 0.45
GetDeviceOSDNameMethod · 0.45

Tested by

no test coverage detected