ESP8266 Treppenlichtsteuerung mit OTA zum Firmware Upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FSMTreppe2.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. //
  2. // Academic License - for use in teaching, academic research, and meeting
  3. // course requirements at degree granting institutions only. Not for
  4. // government, commercial, or other organizational use.
  5. //
  6. // File: FSMTreppe.h
  7. //
  8. // Code generated for Simulink model 'FSMTreppe'.
  9. //
  10. // Model version : 1.28
  11. // Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
  12. // C/C++ source code generated on : Sat Jul 3 13:50:17 2021
  13. //
  14. // Target selection: ert.tlc
  15. // Embedded hardware selection: ARM Compatible->ARM Cortex-M
  16. // Code generation objectives: Unspecified
  17. // Validation result: Not run
  18. //
  19. #ifndef RTW_HEADER_FSMTreppe_h_
  20. #define RTW_HEADER_FSMTreppe_h_
  21. #include "rtwtypes.h"
  22. #include "FSMTreppe_types.h"
  23. // Macros for accessing real-time model data structure
  24. #ifndef rtmGetErrorStatus
  25. #define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
  26. #endif
  27. #ifndef rtmSetErrorStatus
  28. #define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
  29. #endif
  30. // Class declaration for model FSMTreppe
  31. class FSMTreppeModelClass {
  32. // public data and function members
  33. public:
  34. // Block states (default storage) for system '<Root>'
  35. struct DW_FSMTreppe_T {
  36. uint16_T temporalCounter_i1; // '<Root>/FSMTreppe'
  37. uint8_T is_active_c3_FSMTreppe; // '<Root>/FSMTreppe'
  38. uint8_T is_c3_FSMTreppe; // '<Root>/FSMTreppe'
  39. };
  40. // External inputs (root inport signals with default storage)
  41. struct ExtU_FSMTreppe_T {
  42. boolean_T sensor_unten; // '<Root>/sensor_unten'
  43. boolean_T sensor_oben; // '<Root>/sensor_oben'
  44. boolean_T anim_beendet; // '<Root>/anim_beendet'
  45. real_T ldr_schwelle; // '<Root>/ldr_schwelle'
  46. };
  47. // External outputs (root outports fed by signals with default storage)
  48. struct ExtY_FSMTreppe_T {
  49. uint8_T laufrichtung; // '<Root>/laufrichtung'
  50. uint8_T status; // '<Root>/status'
  51. uint8_T dimmrichtung; // '<Root>/dimmrichtung'
  52. };
  53. // Real-time Model Data Structure
  54. struct RT_MODEL_FSMTreppe_T {
  55. const char_T * volatile errorStatus;
  56. };
  57. // model initialize function
  58. void initialize();
  59. // model step function
  60. void step();
  61. // model terminate function
  62. void terminate();
  63. // Constructor
  64. FSMTreppeModelClass();
  65. // Destructor
  66. ~FSMTreppeModelClass();
  67. // Root-level structure-based inputs set method
  68. // Root inports set method
  69. void setExternalInputs(const ExtU_FSMTreppe_T* pExtU_FSMTreppe_T)
  70. {
  71. FSMTreppe_U = *pExtU_FSMTreppe_T;
  72. }
  73. // Root-level structure-based outputs get method
  74. // Root outports get method
  75. const FSMTreppeModelClass::ExtY_FSMTreppe_T & getExternalOutputs() const
  76. {
  77. return FSMTreppe_Y;
  78. }
  79. // Real-Time Model get method
  80. FSMTreppeModelClass::RT_MODEL_FSMTreppe_T * getRTM();
  81. // private data and function members
  82. private:
  83. // Block states
  84. DW_FSMTreppe_T FSMTreppe_DW;
  85. // External inputs
  86. ExtU_FSMTreppe_T FSMTreppe_U;
  87. // External outputs
  88. ExtY_FSMTreppe_T FSMTreppe_Y;
  89. // Real-Time Model
  90. RT_MODEL_FSMTreppe_T FSMTreppe_M;
  91. };
  92. //-
  93. // The generated code includes comments that allow you to trace directly
  94. // back to the appropriate location in the model. The basic format
  95. // is <system>/block_name, where system is the system number (uniquely
  96. // assigned by Simulink) and block_name is the name of the block.
  97. //
  98. // Note that this particular code originates from a subsystem build,
  99. // and has its own system numbers different from the parent model.
  100. // Refer to the system hierarchy for this subsystem below, and use the
  101. // MATLAB hilite_system command to trace the generated code back
  102. // to the parent model. For example,
  103. //
  104. // hilite_system('FSM_Treppenlicht/FSMTreppe') - opens subsystem FSM_Treppenlicht/FSMTreppe
  105. // hilite_system('FSM_Treppenlicht/FSMTreppe/Kp') - opens and selects block Kp
  106. //
  107. // Here is the system hierarchy for this model
  108. //
  109. // '<Root>' : 'FSM_Treppenlicht'
  110. // '<S1>' : 'FSM_Treppenlicht/FSMTreppe'
  111. #endif // RTW_HEADER_FSMTreppe_h_
  112. //
  113. // File trailer for generated code.
  114. //
  115. // [EOF]
  116. //