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.

FSMTreppe3.h 3.7KB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.51
  11. // Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
  12. // C/C++ source code generated on : Wed Jul 7 18:54:01 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 <stdint.h>
  22. // Class declaration for model FSMTreppe
  23. class FSMTreppeModelClass {
  24. // public data and function members
  25. public:
  26. // Block states (default storage) for system '<Root>'
  27. struct DW_FSMTreppe_T {
  28. uint16_t temporalCounter_i1=0; // '<Root>/FSMTreppe'
  29. uint8_t is_active_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
  30. uint8_t is_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
  31. };
  32. // External inputs (root inport signals with default storage)
  33. struct ExtU_FSMTreppe_T {
  34. uint32_t sensor_unten=0; // '<Root>/sensor_unten'
  35. uint32_t sensor_oben=0; // '<Root>/sensor_oben'
  36. uint32_t anim_beendet=0; // '<Root>/anim_beendet'
  37. uint32_t ldr_schwelle=0; // '<Root>/ldr_schwelle'
  38. };
  39. // External outputs (root outports fed by signals with default storage)
  40. struct ExtY_FSMTreppe_T {
  41. uint32_t laufrichtung=0; // '<Root>/laufrichtung'
  42. uint32_t status=0; // '<Root>/status'
  43. uint32_t dimmrichtung=0; // '<Root>/dimmrichtung'
  44. };
  45. // model initialize function
  46. void initialize();
  47. // model step function
  48. void step();
  49. // model terminate function
  50. void terminate();
  51. // Constructor
  52. FSMTreppeModelClass();
  53. // Destructor
  54. ~FSMTreppeModelClass();
  55. // Root-level structure-based inputs set method
  56. // Root inports set method
  57. void setExternalInputs(const ExtU_FSMTreppe_T* pExtU_FSMTreppe_T)
  58. {
  59. FSMTreppe_U.anim_beendet = pExtU_FSMTreppe_T->anim_beendet;
  60. FSMTreppe_U.ldr_schwelle = pExtU_FSMTreppe_T->ldr_schwelle;
  61. FSMTreppe_U.sensor_oben = pExtU_FSMTreppe_T->sensor_oben;
  62. FSMTreppe_U.sensor_unten = pExtU_FSMTreppe_T->sensor_unten;
  63. }
  64. // Root-level structure-based outputs get method
  65. // Root outports get method
  66. const FSMTreppeModelClass::ExtY_FSMTreppe_T getExternalOutputs() const
  67. {
  68. return FSMTreppe_Y;
  69. }
  70. // private data and function members
  71. private:
  72. // Block states
  73. DW_FSMTreppe_T FSMTreppe_DW;
  74. // External inputs
  75. ExtU_FSMTreppe_T FSMTreppe_U;
  76. // External outputs
  77. ExtY_FSMTreppe_T FSMTreppe_Y;
  78. };
  79. //-
  80. // The generated code includes comments that allow you to trace directly
  81. // back to the appropriate location in the model. The basic format
  82. // is <system>/block_name, where system is the system number (uniquely
  83. // assigned by Simulink) and block_name is the name of the block.
  84. //
  85. // Note that this particular code originates from a subsystem build,
  86. // and has its own system numbers different from the parent model.
  87. // Refer to the system hierarchy for this subsystem below, and use the
  88. // MATLAB hilite_system command to trace the generated code back
  89. // to the parent model. For example,
  90. //
  91. // hilite_system('FSM_Treppenlicht/FSMTreppe') - opens subsystem FSM_Treppenlicht/FSMTreppe
  92. // hilite_system('FSM_Treppenlicht/FSMTreppe/Kp') - opens and selects block Kp
  93. //
  94. // Here is the system hierarchy for this model
  95. //
  96. // '<Root>' : 'FSM_Treppenlicht'
  97. // '<S1>' : 'FSM_Treppenlicht/FSMTreppe'
  98. #endif // RTW_HEADER_FSMTreppe_h_
  99. //
  100. // File trailer for generated code.
  101. //
  102. // [EOF]
  103. //