import ctypes

ICD1553_TIMETAG_MICROSECONDS_LSB = 64

class RelativeTimetag(ctypes.Union):
    _fields_ = [
        ("raw", ctypes.c_uint16),
        ("timetag", ctypes.c_uint16),
        ("ptaz_tt", ctypes.c_uint16),
        ("roll_tt", ctypes.c_uint16),
        ("pitch_tt", ctypes.c_uint16),
        ("ppos_timetag", ctypes.c_uint16),
                ]

    def get(self):
        return self.raw

    def set(self, value):
        self.raw = value