Пример #1
0
 def test_dst(self):
     cc = CecCommand("1f:90:02")
     self.assertEqual(cc.dst, 0xf)
     cc = CecCommand("52:90:02")
     self.assertEqual(cc.dst, 0x2)
     cc = CecCommand(0x8f, 0x5, 0x3)
     self.assertEqual(cc.dst, 0x5)
     cc = CecCommand("52:90:02")
     cc.dst = 0x4
     self.assertEqual(("%s" % cc), "54:90:02")
     cc = CecCommand(0x8f, 0x5, 0x3, raw="78:a5:89:45")
     self.assertEqual(cc.dst, 0x8)
Пример #2
0
def test_dst():
    cc = CecCommand("1f:90:02")
    assert cc.dst == 0xF
    cc = CecCommand("52:90:02")
    assert cc.dst == 0x2
    cc = CecCommand(0x8F, 0x5, 0x3)
    assert cc.dst == 0x5
    cc = CecCommand("52:90:02")
    cc.dst = 0x4
    assert ("%s" % cc) == "54:90:02"
    cc = CecCommand(0x8F, 0x5, 0x3, raw="78:a5:89:45")
    assert cc.dst == 0x8
Пример #3
0
 def async_send_command(self, command: CecCommand):
     command.dst = self._logical_address
     yield from self._network.async_send_command(command)
Пример #4
0
 async def async_send_command(self, command: CecCommand):
     command.dst = self._logical_address
     await self._network.async_send_command(command)