(self)
| 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): |
no test coverage detected