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