import ctypes
from Grifo_E_1553lib.data_types.dl_target_validity import DlTargetValidity
from Grifo_E_1553lib.data_types.semicircle import Semicircle
from Grifo_E_1553lib.data_types.target_presentation_data import TargetPresentationData
from Grifo_E_1553lib.data_types.target_half_call_sign import TargetHalfCallSign
from Grifo_E_1553lib.data_types.target_position import TargetPosition

class Msg2DataLinkTarget(ctypes.Structure):
    _fields_ = [
        ("tgt_06_pos_x", TargetPosition),
        ("tgt_06_pos_y", TargetPosition),
        ("tgt_06_ground_track_angle", Semicircle),
        ("tgt_06_presentation_data", TargetPresentationData),
        ("tgt_06_call_sign", TargetHalfCallSign * 2),
        ("tgt_07_pos_x", TargetPosition),
        ("tgt_07_pos_y", TargetPosition),
        ("tgt_07_ground_track_angle", Semicircle),
        ("tgt_07_presentation_data", TargetPresentationData),
        ("tgt_07_call_sign", TargetHalfCallSign * 2),
        ("tgt_08_pos_x", TargetPosition),
        ("tgt_08_pos_y", TargetPosition),
        ("tgt_08_ground_track_angle", Semicircle),
        ("tgt_08_presentation_data", TargetPresentationData),
        ("tgt_08_call_sign", TargetHalfCallSign * 2),
        ("tgt_09_pos_x", TargetPosition),
        ("tgt_09_pos_y", TargetPosition),
        ("tgt_09_ground_track_angle", Semicircle),
        ("tgt_09_presentation_data", TargetPresentationData),
        ("tgt_09_call_sign", TargetHalfCallSign * 2),
        ("tgt_10_pos_x", TargetPosition),
        ("tgt_10_pos_y", TargetPosition),
        ("tgt_10_ground_track_angle", Semicircle),
        ("tgt_10_presentation_data", TargetPresentationData),
        ("tgt_10_call_sign", TargetHalfCallSign * 2),
    ]

    def __init__(self):
        super().__init__()
        self.tgt_06_pos_x = TargetPosition()
        self.tgt_06_pos_y = TargetPosition()
        self.tgt_06_ground_track_angle = Semicircle()
        self.tgt_06_presentation_data = TargetPresentationData()
        self.tgt_06_call_sign = (TargetHalfCallSign * 2)()
        self.tgt_07_pos_x = TargetPosition()
        self.tgt_07_pos_y = TargetPosition()
        self.tgt_07_ground_track_angle = Semicircle()
        self.tgt_07_presentation_data = TargetPresentationData()
        self.tgt_07_call_sign = (TargetHalfCallSign * 2)()
        self.tgt_08_pos_x = TargetPosition()
        self.tgt_08_pos_y = TargetPosition()
        self.tgt_08_ground_track_angle = Semicircle()
        self.tgt_08_presentation_data = TargetPresentationData()
        self.tgt_08_call_sign = (TargetHalfCallSign * 2)()
        self.tgt_09_pos_x = TargetPosition()
        self.tgt_09_pos_y = TargetPosition()
        self.tgt_09_ground_track_angle = Semicircle()
        self.tgt_09_presentation_data = TargetPresentationData()
        self.tgt_09_call_sign = (TargetHalfCallSign * 2)()
        self.tgt_10_pos_x = TargetPosition()
        self.tgt_10_pos_y = TargetPosition()
        self.tgt_10_ground_track_angle = Semicircle()
        self.tgt_10_presentation_data = TargetPresentationData()
        self.tgt_10_call_sign = (TargetHalfCallSign * 2)()