-- Generated by EML-lang AADL backend
-- Source module: aerospace_actuator_guard_band
-- Kernel digest: sha256:0b0ef5a5baecb59acc7d28dc64bc959d9f3378cfbc278204c737cef5bc755aaa
-- Threads:       1

package Aerospace_Actuator_Guard_Band
public

with Base_Types;

system Aerospace_Actuator_Guard_Band_System
features
  actuator_command_within_band_error : in data port Base_Types::Float_64;
  actuator_command_within_band_integral : in data port Base_Types::Float_64;
  actuator_command_within_band_deriv : in data port Base_Types::Float_64;
  actuator_command_within_band_kp : in data port Base_Types::Float_64;
  actuator_command_within_band_ki : in data port Base_Types::Float_64;
  actuator_command_within_band_kd : in data port Base_Types::Float_64;
  actuator_command_within_band_u_min : in data port Base_Types::Float_64;
  actuator_command_within_band_u_max : in data port Base_Types::Float_64;
  actuator_command_within_band_result : out data port Base_Types::Float_64;
end Aerospace_Actuator_Guard_Band_System;

system implementation Aerospace_Actuator_Guard_Band_System.impl
subcomponents
  actuator_command_within_band : thread ActuatorCommandWithinBand_T;
end Aerospace_Actuator_Guard_Band_System.impl;

thread ActuatorCommandWithinBand_T
features
  error : in data port Base_Types::Float_64;
  integral : in data port Base_Types::Float_64;
  deriv : in data port Base_Types::Float_64;
  kp : in data port Base_Types::Float_64;
  ki : in data port Base_Types::Float_64;
  kd : in data port Base_Types::Float_64;
  u_min : in data port Base_Types::Float_64;
  u_max : in data port Base_Types::Float_64;
  result : out data port Base_Types::Float_64;
properties
  Period => 0.010 us;
  Compute_Execution_Time => 0 us .. 8 us;  -- upper bound from the profiler's FPGA latency estimate (2 cycles per level of EML depth)
  Dispatch_Protocol => Periodic;
end ActuatorCommandWithinBand_T;

thread implementation ActuatorCommandWithinBand_T.impl
properties
  Source_Language => (C);  -- the Forge C backend supplies the binary
end ActuatorCommandWithinBand_T.impl;

end Aerospace_Actuator_Guard_Band;
