예제 #1
0
파일: test_zcl.py 프로젝트: pvizeli/zigpy
def test_deserialize_general():
    tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x00\x01\x00')
    assert tsn == 1
    assert command_id == 0
    assert is_reply is False
예제 #2
0
파일: test_zcl.py 프로젝트: pvizeli/zigpy
def test_deserialize_cluster_command_unknown():
    tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x01\x01\xff')
    assert tsn == 1
    assert command_id == 255 + 256
    assert is_reply is False
예제 #3
0
파일: test_zcl.py 프로젝트: pvizeli/zigpy
def test_deserialize_cluster():
    tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x01\x01\x00xxx')
    assert tsn == 1
    assert command_id == 256
    assert is_reply is False
예제 #4
0
파일: test_zcl.py 프로젝트: pvizeli/zigpy
def test_deserialize_cluster_client():
    tsn, command_id, is_reply, args = zcl.deserialize(3, b'\x09\x01\x00AB')
    assert tsn == 1
    assert command_id == 256
    assert is_reply is True
    assert args == [0x4241]
예제 #5
0
파일: test_zcl.py 프로젝트: pvizeli/zigpy
def test_deserialize_general_unknown():
    tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x00\x01\xff')
    assert tsn == 1
    assert command_id == 255
    assert is_reply is False