+ @classmethod
+ def response(cls, flag=2):
+ # 1 - restart
+ # 2 - shutdown
+ return cls.make_packet(pack("B", flag))
+
+
+class DEVICE(GPS303Pkt):
+ PROTO = 0x49
+ DIR = Dir.OUT
+
+ @classmethod
+ def response(cls, flag=0):
+ # 0 - Stop looking for equipment
+ # 1 - Start looking for equipment
+ return cls.make_packet(pack("B", flag))
+
+
+class ALARM_CLOCK(GPS303Pkt):
+ PROTO = 0x50
+ DIR = Dir.OUT
+
+ @classmethod
+ def response(cls, alarms=((0, "0000"), (0, "0000"), (0, "0000"))):
+ return b"".join(
+ cls("B", day) + bytes.fromhex(tm) for day, tm in alarms
+ )