]> www.average.org Git - loctrkd.git/blobdiff - gps303/zmsg.py
Partly revert "Broadcast location, gps and approximated"
[loctrkd.git] / gps303 / zmsg.py
index 56392007f1ff74ecd61cf59b8a95b1b9c2c06c48..211011392a296f200cc6cbce99188ceda20c1f44 100644 (file)
@@ -58,15 +58,20 @@ class _Zmsg:
             ),
         )
 
+    def __eq__(self, other):
+        return all(
+            [getattr(self, k) == getattr(other, k) for k, _ in self.KWARGS]
+        )
+
     def decode(self, buffer):
-        raise RuntimeError(
-            self.__class__.__name__ + "must implement `encode()` method"
+        raise NotImplementedError(
+            self.__class__.__name__ + "must implement `decode()` method"
         )
 
     @property
     def packed(self):
-        raise RuntimeError(
-            self.__class__.__name__ + "must implement `encode()` method"
+        raise NotImplementedError(
+            self.__class__.__name__ + "must implement `packed()` property"
         )