new FSM
This commit is contained in:
@@ -16,18 +16,19 @@
|
||||
// Code generation objectives: Unspecified
|
||||
// Validation result: Not run
|
||||
//
|
||||
#include "FSMTreppe.h"
|
||||
#include "FSMTreppe_private.h"
|
||||
#include "FSMTreppe2.h"
|
||||
// #include "FSMTreppe_private.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// Named constants for Chart: '<Root>/FSMTreppe'
|
||||
const uint8_T FSMTreppe_IN_abdimmen_hoch = 1U;
|
||||
const uint8_T FSMTreppe_IN_abdimmen_runter = 2U;
|
||||
const uint8_T FSMTreppe_IN_aufdimmen_hoch = 3U;
|
||||
const uint8_T FSMTreppe_IN_aufdimmen_runter = 4U;
|
||||
const uint8_T FSMTreppe_IN_inaktiv = 5U;
|
||||
const uint8_T FSMTreppe_IN_ruhezustand = 6U;
|
||||
const uint8_T FSMTreppe_IN_warten_hoch = 7U;
|
||||
const uint8_T FSMTreppe_IN_warten_runter = 8U;
|
||||
const uint8_t FSMTreppe_IN_abdimmen_hoch = 1U;
|
||||
const uint8_t FSMTreppe_IN_abdimmen_runter = 2U;
|
||||
const uint8_t FSMTreppe_IN_aufdimmen_hoch = 3U;
|
||||
const uint8_t FSMTreppe_IN_aufdimmen_runter = 4U;
|
||||
const uint8_t FSMTreppe_IN_inaktiv = 5U;
|
||||
const uint8_t FSMTreppe_IN_ruhezustand = 6U;
|
||||
const uint8_t FSMTreppe_IN_warten_hoch = 7U;
|
||||
const uint8_t FSMTreppe_IN_warten_runter = 8U;
|
||||
|
||||
// Model step function
|
||||
void FSMTreppeModelClass::step()
|
||||
@@ -39,7 +40,7 @@ void FSMTreppeModelClass::step()
|
||||
// Inport: '<Root>/sensor_unten'
|
||||
|
||||
if (FSMTreppe_DW.temporalCounter_i1 < 511U) {
|
||||
FSMTreppe_DW.temporalCounter_i1 = static_cast<uint16_T>
|
||||
FSMTreppe_DW.temporalCounter_i1 = static_cast<uint16_t>
|
||||
(FSMTreppe_DW.temporalCounter_i1 + 1U);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
//
|
||||
#ifndef RTW_HEADER_FSMTreppe_h_
|
||||
#define RTW_HEADER_FSMTreppe_h_
|
||||
#include "rtwtypes.h"
|
||||
#include "FSMTreppe_types.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Macros for accessing real-time model data structure
|
||||
#ifndef rtmGetErrorStatus
|
||||
@@ -36,29 +36,29 @@ class FSMTreppeModelClass {
|
||||
public:
|
||||
// Block states (default storage) for system '<Root>'
|
||||
struct DW_FSMTreppe_T {
|
||||
uint16_T temporalCounter_i1; // '<Root>/FSMTreppe'
|
||||
uint8_T is_active_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
uint8_T is_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
uint16_t temporalCounter_i1; // '<Root>/FSMTreppe'
|
||||
uint8_t is_active_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
uint8_t is_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
};
|
||||
|
||||
// External inputs (root inport signals with default storage)
|
||||
struct ExtU_FSMTreppe_T {
|
||||
boolean_T sensor_unten; // '<Root>/sensor_unten'
|
||||
boolean_T sensor_oben; // '<Root>/sensor_oben'
|
||||
boolean_T anim_beendet; // '<Root>/anim_beendet'
|
||||
real_T ldr_schwelle; // '<Root>/ldr_schwelle'
|
||||
bool sensor_unten; // '<Root>/sensor_unten'
|
||||
bool sensor_oben; // '<Root>/sensor_oben'
|
||||
bool anim_beendet; // '<Root>/anim_beendet'
|
||||
double ldr_schwelle; // '<Root>/ldr_schwelle'
|
||||
};
|
||||
|
||||
// External outputs (root outports fed by signals with default storage)
|
||||
struct ExtY_FSMTreppe_T {
|
||||
uint8_T laufrichtung; // '<Root>/laufrichtung'
|
||||
uint8_T status; // '<Root>/status'
|
||||
uint8_T dimmrichtung; // '<Root>/dimmrichtung'
|
||||
uint8_t laufrichtung; // '<Root>/laufrichtung'
|
||||
uint8_t status; // '<Root>/status'
|
||||
uint8_t dimmrichtung; // '<Root>/dimmrichtung'
|
||||
};
|
||||
|
||||
// Real-time Model Data Structure
|
||||
struct RT_MODEL_FSMTreppe_T {
|
||||
const char_T * volatile errorStatus;
|
||||
const char * volatile errorStatus;
|
||||
};
|
||||
|
||||
// model initialize function
|
||||
|
||||
Reference in New Issue
Block a user