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.

FSMTreppe.h 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.65
  11. // Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
  12. // C/C++ source code generated on : Tue Sep 7 08:47:00 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. uint32_T sensor_unten; // '<Root>/sensor_unten'
  43. uint32_T sensor_oben; // '<Root>/sensor_oben'
  44. uint32_T anim_beendet; // '<Root>/anim_beendet'
  45. uint32_T ldr_schwelle; // '<Root>/ldr_schwelle'
  46. uint32_T ldr_changed; // '<Root>/ldr_changed'
  47. };
  48. // External outputs (root outports fed by signals with default storage)
  49. struct ExtY_FSMTreppe_T {
  50. uint32_T laufrichtung; // '<Root>/laufrichtung'
  51. uint32_T status; // '<Root>/status'
  52. uint32_T dimmrichtung; // '<Root>/dimmrichtung'
  53. };
  54. // Real-time Model Data Structure
  55. struct RT_MODEL_FSMTreppe_T {
  56. const char_T * volatile errorStatus;
  57. };
  58. // model initialize function
  59. void initialize();
  60. // model step function
  61. void step();
  62. // model terminate function
  63. void terminate();
  64. // Constructor
  65. FSMTreppeModelClass();
  66. // Destructor
  67. ~FSMTreppeModelClass();
  68. // Root-level structure-based inputs set method
  69. // Root inports set method
  70. void setExternalInputs(const ExtU_FSMTreppe_T* pExtU_FSMTreppe_T)
  71. {
  72. FSMTreppe_U = *pExtU_FSMTreppe_T;
  73. }
  74. // Root-level structure-based outputs get method
  75. // Root outports get method
  76. const FSMTreppeModelClass::ExtY_FSMTreppe_T & getExternalOutputs() const
  77. {
  78. return FSMTreppe_Y;
  79. }
  80. // Real-Time Model get method
  81. FSMTreppeModelClass::RT_MODEL_FSMTreppe_T * getRTM();
  82. // private data and function members
  83. private:
  84. // Block states
  85. DW_FSMTreppe_T FSMTreppe_DW;
  86. // External inputs
  87. ExtU_FSMTreppe_T FSMTreppe_U;
  88. // External outputs
  89. ExtY_FSMTreppe_T FSMTreppe_Y;
  90. // Real-Time Model
  91. RT_MODEL_FSMTreppe_T FSMTreppe_M;
  92. };
  93. //-
  94. // The generated code includes comments that allow you to trace directly
  95. // back to the appropriate location in the model. The basic format
  96. // is <system>/block_name, where system is the system number (uniquely
  97. // assigned by Simulink) and block_name is the name of the block.
  98. //
  99. // Note that this particular code originates from a subsystem build,
  100. // and has its own system numbers different from the parent model.
  101. // Refer to the system hierarchy for this subsystem below, and use the
  102. // MATLAB hilite_system command to trace the generated code back
  103. // to the parent model. For example,
  104. //
  105. // hilite_system('FSM_Treppenlicht/FSMTreppe') - opens subsystem FSM_Treppenlicht/FSMTreppe
  106. // hilite_system('FSM_Treppenlicht/FSMTreppe/Kp') - opens and selects block Kp
  107. //
  108. // Here is the system hierarchy for this model
  109. //
  110. // '<Root>' : 'FSM_Treppenlicht'
  111. // '<S1>' : 'FSM_Treppenlicht/FSMTreppe'
  112. #endif // RTW_HEADER_FSMTreppe_h_
  113. //
  114. // File trailer for generated code.
  115. //
  116. // [EOF]
  117. //