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

/* Task wrapper function definitions */
void Alinear_encoder_Task1(void)
{ 
    Alinear_encoder_step();
} 
/* Task descriptors */
slrealtime::TaskInfo task_1( 0u, std::bind(Alinear_encoder_Task1), slrealtime::TaskInfo::PERIODIC, 4e-05, 0, 40);

/* 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 Alinear_encoder_Info =
{
    "Alinear_encoder",
    Alinear_encoder_initialize,
    Alinear_encoder_terminate,
    []()->char const*& { return Alinear_encoder_M->errorStatus; },
    []()->unsigned char& { return Alinear_encoder_M->Timing.stopRequestedFlag; },
    { task_1 },
    slrealtime::getSegmentVector()
};

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