Beispiel #1
0
    def __init__(self, network_id=0, flag=0, pos=Coordinates()):
        """
        Initializes the DeviceCoordinates object.

        Kwargs:
            network_id: Network ID of the device
            flag: Type of the device. Tag or anchor.
            pos: Coordinates of the device. Coordinates().
        """
        self.data = [network_id, flag, int(pos.x), int(pos.y), int(pos.z)]
Beispiel #2
0
 def load(self, data):
     self.data = data
     self.network_id = data[0]
     self.flag = data[1]
     self.pos = Coordinates(data[2], data[3], data[4])
Beispiel #3
0
 def __init__(self, network_id=0, flag=0, pos=Coordinates()):
     """Initializes the DeviceCoordinates object."""
     self.network_id = network_id
     self.flag = flag
     self.pos = pos
     self.data = [network_id, flag, pos.x, pos.y, pos.z]
Beispiel #4
0
 def pos(self):
     return Coordinates(self.data[2], self.data[3], self.data[4])