123 lines
3.7 KiB
C++
123 lines
3.7 KiB
C++
//
|
|
// Academic License - for use in teaching, academic research, and meeting
|
|
// course requirements at degree granting institutions only. Not for
|
|
// government, commercial, or other organizational use.
|
|
//
|
|
// File: FSMTreppe.h
|
|
//
|
|
// Code generated for Simulink model 'FSMTreppe'.
|
|
//
|
|
// Model version : 1.51
|
|
// Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
|
|
// C/C++ source code generated on : Wed Jul 7 18:54:01 2021
|
|
//
|
|
// Target selection: ert.tlc
|
|
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
|
|
// Code generation objectives: Unspecified
|
|
// Validation result: Not run
|
|
//
|
|
#ifndef RTW_HEADER_FSMTreppe_h_
|
|
#define RTW_HEADER_FSMTreppe_h_
|
|
|
|
#include <stdint.h>
|
|
|
|
// Class declaration for model FSMTreppe
|
|
class FSMTreppeModelClass {
|
|
// public data and function members
|
|
public:
|
|
// Block states (default storage) for system '<Root>'
|
|
struct DW_FSMTreppe_T {
|
|
uint16_t temporalCounter_i1=0; // '<Root>/FSMTreppe'
|
|
uint8_t is_active_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
|
|
uint8_t is_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
|
|
};
|
|
|
|
// External inputs (root inport signals with default storage)
|
|
struct ExtU_FSMTreppe_T {
|
|
uint32_t sensor_unten=0; // '<Root>/sensor_unten'
|
|
uint32_t sensor_oben=0; // '<Root>/sensor_oben'
|
|
uint32_t anim_beendet=0; // '<Root>/anim_beendet'
|
|
uint32_t ldr_schwelle=0; // '<Root>/ldr_schwelle'
|
|
};
|
|
|
|
// External outputs (root outports fed by signals with default storage)
|
|
struct ExtY_FSMTreppe_T {
|
|
uint32_t laufrichtung=0; // '<Root>/laufrichtung'
|
|
uint32_t status=0; // '<Root>/status'
|
|
uint32_t dimmrichtung=0; // '<Root>/dimmrichtung'
|
|
};
|
|
|
|
// model initialize function
|
|
void initialize();
|
|
|
|
// model step function
|
|
void step();
|
|
|
|
// model terminate function
|
|
void terminate();
|
|
|
|
// Constructor
|
|
FSMTreppeModelClass();
|
|
|
|
// Destructor
|
|
~FSMTreppeModelClass();
|
|
|
|
// Root-level structure-based inputs set method
|
|
|
|
// Root inports set method
|
|
void setExternalInputs(const ExtU_FSMTreppe_T* pExtU_FSMTreppe_T)
|
|
{
|
|
FSMTreppe_U.anim_beendet = pExtU_FSMTreppe_T->anim_beendet;
|
|
FSMTreppe_U.ldr_schwelle = pExtU_FSMTreppe_T->ldr_schwelle;
|
|
FSMTreppe_U.sensor_oben = pExtU_FSMTreppe_T->sensor_oben;
|
|
FSMTreppe_U.sensor_unten = pExtU_FSMTreppe_T->sensor_unten;
|
|
}
|
|
|
|
// Root-level structure-based outputs get method
|
|
|
|
// Root outports get method
|
|
const FSMTreppeModelClass::ExtY_FSMTreppe_T getExternalOutputs() const
|
|
{
|
|
return FSMTreppe_Y;
|
|
}
|
|
|
|
// private data and function members
|
|
private:
|
|
// Block states
|
|
DW_FSMTreppe_T FSMTreppe_DW;
|
|
|
|
// External inputs
|
|
ExtU_FSMTreppe_T FSMTreppe_U;
|
|
|
|
// External outputs
|
|
ExtY_FSMTreppe_T FSMTreppe_Y;
|
|
};
|
|
|
|
//-
|
|
// The generated code includes comments that allow you to trace directly
|
|
// back to the appropriate location in the model. The basic format
|
|
// is <system>/block_name, where system is the system number (uniquely
|
|
// assigned by Simulink) and block_name is the name of the block.
|
|
//
|
|
// Note that this particular code originates from a subsystem build,
|
|
// and has its own system numbers different from the parent model.
|
|
// Refer to the system hierarchy for this subsystem below, and use the
|
|
// MATLAB hilite_system command to trace the generated code back
|
|
// to the parent model. For example,
|
|
//
|
|
// hilite_system('FSM_Treppenlicht/FSMTreppe') - opens subsystem FSM_Treppenlicht/FSMTreppe
|
|
// hilite_system('FSM_Treppenlicht/FSMTreppe/Kp') - opens and selects block Kp
|
|
//
|
|
// Here is the system hierarchy for this model
|
|
//
|
|
// '<Root>' : 'FSM_Treppenlicht'
|
|
// '<S1>' : 'FSM_Treppenlicht/FSMTreppe'
|
|
|
|
#endif // RTW_HEADER_FSMTreppe_h_
|
|
|
|
//
|
|
// File trailer for generated code.
|
|
//
|
|
// [EOF]
|
|
//
|