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 3.5KB

3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 <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; // '<Root>/FSMTreppe'
  29. uint8_t is_active_c3_FSMTreppe; // '<Root>/FSMTreppe'
  30. uint8_t is_c3_FSMTreppe; // '<Root>/FSMTreppe'
  31. };
  32. // External inputs (root inport signals with default storage)
  33. struct ExtU_FSMTreppe_T {
  34. bool sensor_unten; // '<Root>/sensor_unten'
  35. bool sensor_oben; // '<Root>/sensor_oben'
  36. bool anim_beendet; // '<Root>/anim_beendet'
  37. double ldr_schwelle; // '<Root>/ldr_schwelle'
  38. };
  39. // External outputs (root outports fed by signals with default storage)
  40. struct ExtY_FSMTreppe_T {
  41. uint8_t laufrichtung; // '<Root>/laufrichtung'
  42. uint8_t status; // '<Root>/status'
  43. uint8_t dimmrichtung; // '<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 = *pExtU_FSMTreppe_T;
  60. }
  61. // Root-level structure-based outputs get method
  62. // Root outports get method
  63. const FSMTreppeModelClass::ExtY_FSMTreppe_T & getExternalOutputs() const
  64. {
  65. return FSMTreppe_Y;
  66. }
  67. // private data and function members
  68. private:
  69. // Block states
  70. DW_FSMTreppe_T FSMTreppe_DW;
  71. // External inputs
  72. ExtU_FSMTreppe_T FSMTreppe_U;
  73. // External outputs
  74. ExtY_FSMTreppe_T FSMTreppe_Y;
  75. };
  76. //-
  77. // The generated code includes comments that allow you to trace directly
  78. // back to the appropriate location in the model. The basic format
  79. // is <system>/block_name, where system is the system number (uniquely
  80. // assigned by Simulink) and block_name is the name of the block.
  81. //
  82. // Note that this particular code originates from a subsystem build,
  83. // and has its own system numbers different from the parent model.
  84. // Refer to the system hierarchy for this subsystem below, and use the
  85. // MATLAB hilite_system command to trace the generated code back
  86. // to the parent model. For example,
  87. //
  88. // hilite_system('FSM_Treppenlicht/FSMTreppe') - opens subsystem FSM_Treppenlicht/FSMTreppe
  89. // hilite_system('FSM_Treppenlicht/FSMTreppe/Kp') - opens and selects block Kp
  90. //
  91. // Here is the system hierarchy for this model
  92. //
  93. // '<Root>' : 'FSM_Treppenlicht'
  94. // '<S1>' : 'FSM_Treppenlicht/FSMTreppe'
  95. #endif // RTW_HEADER_FSMTreppe_h_
  96. //
  97. // File trailer for generated code.
  98. //
  99. // [EOF]
  100. //