import ctypes
from .enums import DlTargetValidity

class DlTargetValidity(ctypes.Structure):
    _fields_ = [("raw", ctypes.c_uint16)]

    def get_dl_target_validity_01(self):
        return (self.raw >> 15) & 0x01

    def set_dl_target_validity_01(self, value):
        self.raw &= ~(0x01 << 15)
        self.raw |= (value << 15)

    def get_dl_target_validity_02(self):
        return (self.raw >> 14) & 0x01

    def set_dl_target_validity_02(self, value):
        self.raw &= ~(0x01 << 14)
        self.raw |= (value << 14)

    def get_dl_target_validity_03(self):
        return (self.raw >> 13) & 0x01

    def set_dl_target_validity_03(self, value):
        self.raw &= ~(0x01 << 13)
        self.raw |= (value << 13)

    def get_dl_target_validity_04(self):
        return (self.raw >> 12) & 0x01

    def set_dl_target_validity_04(self, value):
        self.raw &= ~(0x01 << 12)
        self.raw |= (value << 12)

    def get_dl_target_validity_05(self):
        return (self.raw >> 11) & 0x01

    def set_dl_target_validity_05(self, value):
        self.raw &= ~(0x01 << 11)
        self.raw |= (value << 11)

    def get_dl_target_validity_06(self):
        return (self.raw >> 10) & 0x01

    def set_dl_target_validity_06(self, value):
        self.raw &= ~(0x01 << 10)
        self.raw |= (value << 10)

    def get_dl_target_validity_07(self):
        return (self.raw >> 9) & 0x01

    def set_dl_target_validity_07(self, value):
        self.raw &= ~(0x01 << 9)
        self.raw |= (value << 9)

    def get_dl_target_validity_08(self):
        return (self.raw >> 8) & 0x01

    def set_dl_target_validity_08(self, value):
        self.raw &= ~(0x01 << 8)
        self.raw |= (value << 8)

    def get_dl_target_validity_09(self):
        return (self.raw >> 7) & 0x01

    def set_dl_target_validity_09(self, value):
        self.raw &= ~(0x01 << 7)
        self.raw |= (value << 7)

    def get_dl_target_validity_10(self):
        return (self.raw >> 6) & 0x01

    def set_dl_target_validity_10(self, value):
        self.raw &= ~(0x01 << 6)
        self.raw |= (value << 6)

    def get_spare(self):
        return (self.raw >> 0) & 0x3F

    def set_spare(self, value):
        self.raw &= ~(0x3F << 0)
        self.raw |= (value << 0)