18 lines
475 B
Python
18 lines
475 B
Python
IP = "192.168.88.69"
|
|
PORT = 2000
|
|
|
|
import socket
|
|
from .command_packets import CommandPacket, Settings, PacketParser
|
|
|
|
def main():
|
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
sock.connect((IP, PORT))
|
|
sock.send(CommandPacket(False, Settings.Gain, 125).serialize())
|
|
|
|
data = sock.recv(1024)
|
|
|
|
parser = PacketParser()
|
|
data, packet = parser.parse_bytearray(data)
|
|
if packet is not None:
|
|
print(packet)
|