/* Main generated for Simulink Real-Time model speedgoat_test_SN10564_R2024a */
#include <ModelInfo.hpp>
#include <utilities.hpp>
#include "rte_speedgoat_test_SN10564_R2024a_parameters.h"
#include "speedgoat_test_SN10564_R2024a.h"

/* Task wrapper function definitions */
void speedgoat_test_SN10564_R2024a_Task1(void)
{ 
    speedgoat_test_SN10564_R2024a_step();
} 
extern void S4_InterruptSetup1_fc(void);
void speedgoat_test_SN10564_R2024a_Task2(void)
{ 
    S4_InterruptSetup1_fc();
} 
/* Task descriptors */
slrealtime::TaskInfo task_1( 0u, std::bind(speedgoat_test_SN10564_R2024a_Task1), slrealtime::TaskInfo::PERIODIC, 0.001, 0, 40);
slrealtime::TaskInfo task_2( 1u, std::bind(speedgoat_test_SN10564_R2024a_Task2), slrealtime::TaskInfo::ASYNCHRONOUS, -1, -2, 254);

/* Executable base address for XCP */
#ifdef __linux__
extern char __executable_start;
static uintptr_t const base_address = reinterpret_cast<uintptr_t>(&__executable_start);
#else
/* Set 0 as placeholder, to be parsed later from /proc filesystem */
static uintptr_t const base_address = 0;
#endif

/* Model descriptor */
slrealtime::ModelInfo speedgoat_test_SN10564_R2024a_Info =
{
    "speedgoat_test_SN10564_R2024a",
    speedgoat_test_SN10564_R2024a_initialize,
    speedgoat_test_SN10564_R2024a_terminate,
    []()->char const*& { return speedgoat_test_SN10564_R2024a_M->errorStatus; },
    []()->unsigned char& { return speedgoat_test_SN10564_R2024a_M->Timing.stopRequestedFlag; },
    { task_1, task_2 },
    slrealtime::getSegmentVector()
};

int main(int argc, char *argv[]) {
    slrealtime::BaseAddress::set(base_address);
    return slrealtime::runModel(argc, argv, speedgoat_test_SN10564_R2024a_Info);
}
