import ctypes
from Grifo_E_1553lib.data_types.rdr_mode_command import RdrModeCommandWord
from Grifo_E_1553lib.data_types.rdr_fun_and_param1 import RdrFunAndParam1
from Grifo_E_1553lib.data_types.rdr_fun_and_param2 import RdrFunAndParam2

class MsgRdrOperationCommand(ctypes.Structure):
    """
    A2: Radar Operation Command.

    Contains commands for radar mode, functions, and parameters.
    """
    _pack_ = 1  # Forza l'allineamento a 1 byte
    _fields_ = [
        ("rdr_mode_command", RdrModeCommandWord),
        ("param1", RdrFunAndParam1),
        ("param2", RdrFunAndParam2)
    ]

    def __init__(self):
        super().__init__()  # Chiama il costruttore della classe base
        self.rdr_mode_command = RdrModeCommandWord()
        self.param1 = RdrFunAndParam1()
        self.param2 = RdrFunAndParam2()